I am having problem with code in generating random customer arrival. So the problem is suppose a store is expected to get 15 customers per hour. (that's .25 customer a min) So my logic here is 25% chance of getting a customer that minute of time.
pseudocode generate a random float number 0.0 - 1.0 <= .25 Add customer to queue
My first problem here is suppose a store expected 60 customer a hr so that's (1 customer a min) looking at my code above 0.0 - 1.0 will always be <= to 1 thus 60 customer WILL be added to queue 100% of time.
Second problem is suppose store expected 15 customer a hr there are chances they can get 1 or more customer at that min. How can i implement that on my code.
I have been looking into queue theory (Poisson, exponential distribution) for past 2 days but have not made a progress in finding my solution. Any help will be appropriated thanks
Aucun commentaire:
Enregistrer un commentaire