In a bank, a customer may enter randomly. He has to join a queue. He has to wait for sometime before his turn comes. Each customer may require 5 minutes of service.
The manager of the bank wants to know, how to reduce the waiting time? How many windows should be kept open? What is the average waiting time for a customer? etc,.
One may write a computer program to simulate the queue situation in the bank and get answers.
We have to simulate the situation minute by minute.
ROUGH ALGORITHM
A minute begins:
A customer may arrive(based on a random number)
If the customer arrives, we have to increase the length of the queue by 1
.
A customer is being served (duration of 5 minutes)
Or, if the service ends for a person, we have to add a new customer to the window and reduce the queue by 1.
Calculate the waiting time for a customer.
Next minute-to beginning:
We have to run the above algorithm at least thousand times(1000 minutes). Then based on the output, the manager may arrive at some conclusions.
Today, we have HD graphics. We can simulate real life biological and physical phenomena and study deeply.
Science update:
NASA discovered seven earth like planets. They are 40 light years away from earth. They circle the dwarf star named Trappist 1. This discovery has given a new hope for the search of life outside the earth.
The manager of the bank wants to know, how to reduce the waiting time? How many windows should be kept open? What is the average waiting time for a customer? etc,.
One may write a computer program to simulate the queue situation in the bank and get answers.
We have to simulate the situation minute by minute.
ROUGH ALGORITHM
A minute begins:
A customer may arrive(based on a random number)
If the customer arrives, we have to increase the length of the queue by 1
.
A customer is being served (duration of 5 minutes)
Or, if the service ends for a person, we have to add a new customer to the window and reduce the queue by 1.
Calculate the waiting time for a customer.
Next minute-to beginning:
We have to run the above algorithm at least thousand times(1000 minutes). Then based on the output, the manager may arrive at some conclusions.
Today, we have HD graphics. We can simulate real life biological and physical phenomena and study deeply.
Science update:
NASA discovered seven earth like planets. They are 40 light years away from earth. They circle the dwarf star named Trappist 1. This discovery has given a new hope for the search of life outside the earth.
Comments
Post a Comment