Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. Length (in minutes) of the simulation (int, user must enter a number >= 10)
  2.  
  3. Number of customers expected to enter the store during each hour (integer between 1 and 60)
  4.  
  5. If customers are ready to check out (when their checkOutArrivalTime == simulation clock)
  6.  
  7. Remove the customer from the customer list and add the customer to cashier with shortest checkout line. Keep in mind more than one customer could be ready to check out during each clock cycle.
  8.  
  9. Update cashiers. For each cashier:
  10.  
  11. If the cashier’s finishTime <= simulation clock, the cashier is available to handle another customer from the queue. If that cashier’s line is not empty:
  12.  
  13. Call the serveNextCustomer method for that cashier
  14.  
  15. Increment number of customers served
  16.  
  17. Calculate how long this customer was waiting since entering the checkout line and increment totalWaitTime accordingly.
  18.  
  19. Output the customer details to the details output file.
  20.  
  21. Number of customers waiting in a checkout line but not yet being served
  22.  
  23. Number of customers who have been or are currently being served by cashiers
  24.  
  25. Average wait time for all customers who have been or are currently being served (rounded to two places to the right of the decimal)
  26.  
  27. If the number is less than or equal to the arrivalProbability, assume a new customer has arrived.
  28.  
  29. If the number is greater than the arrivalProbability, no customer has arrived.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement