The code begins with comments that are descriptions of variables used in the program and that will give results of several different situations. When we study this problem, the steady state probability is what we are seeking. This is same number of customers entering the system as are being served. This can be attained. Once this is found, by choosing a certain number of customers entering the system, we can decide the service rate. This will determine how many customers we are able to service. Next, once you decide how many customers to prepare for, then the steady state formula tells us the expected time in the queue, the expected time in system, the expected length of the line, and the expected number of customers in line. The decision is made on how long it takes to get 90% of customers through the queue and through the system. The variable indicating arrival rate in hours is lambda; mu indicates the service rate (how many customers are serviced in one hour); psi indicates traffic intensity and the number of customers divided by the time it takes to be serviced. If lambda is bigger than mu, the length of the line will approach infinity, which would render our model useless. We use n to represent the number of customers used in the for loop that will find the steady state probability using the M/M/1 model and creates a table of numbers that could be graphed. We can only expect 90% of the customers to fall within our formulae and get through the queue in timely fashion. We have no control over some situations. A manager can analyze this output and would realize that you must have more people servicing customers than customers entering the system. Next: Original Achievement > |