Question: In Java Write a program called Simulation. The parameters controlling how the simulation goes are: the arrival probability ap: This is a positive integer with

In Java Write a program called Simulation. The parameters controlling how the simulation goes are: the arrival probability ap: This is a positive integer with the interpretation that the probability that a customer arrives at any given second is 1/ap. For this simulation, set it to 30.the number of servers sn: Set this to 4.the number of seconds needed to provide service st: This is the number of seconds it takes for a server to complete a transaction with a customer. Set it to 150. This is different than the value mentioned in class.the total time of the simulation simt: This is the length of time in seconds that the simulation will run. Set it to 3600.

For simt seconds do Randomly generate an integer between 0 and ap-1 If that integer is equal to 0 then // A customer has arrived! Put the current time, which is the customer's arrival time, onto the queue end if For each server If that server's wait time is 0 then // The server is available. If there is a customer waiting in the queue then // Start serving that customer. Dequeue that customer's arrival time Compute the customer's wait time, which is the current time minus that arrival time Add that wait time to total Add 1 to number of customers served Set server's wait time to st end if else Decrement that server's wait time end if end for end for compute and print the average wait time

Can someone help me with this?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!