Using Simscript on Linux

Setting Things Up To set up your Linux account to use SIMSCRIPT II.5 do the following:

Using Simscript

Writing and Modifying SIMSCRIPT II.5 Programs

Save the following programs to your directory:

  1. Follow the instructions above to compile and run mm1ss.sim.

  2. Adding Utilization: Open mm1ss.sim in emacs and add code to compute the utilization of the server. Utilization of the server is a time-average statistic so you need an accumulate statement. Furthermore, utilization is the proportion of time the server is busy. As you recall to compute utilization you compute the area under the curve B(t) where B(t) is the number of servers busy at time t. In SIMSCRIPT this number is one of the attributes of a resource -- in this program, it is N.X.SERVER (this is the number of servers busy at a given time). So, add to the preamble the statement
       accumulate UTILIZATION as the average of N.X.SERVER
    
    Now all you need to do is add a statement to print UTILIZATION at the end of the simulation (where should this go?). Compile and run the program to make sure it works.

  3. Now copy mm1ss.sim into the file tandem.sim.

  4. Modeling the Tandem System: Open tandem.sim in emacs and modify it as discussed in class to simulate the tandem queuing system in problem 1.14. Remember the SERVER resource declaration in the preamble doesn't change; however, you need to change the creation of the resources in main. You also need to modify the CUSTOMER process. SIMSCRIPT will automatically keep the average in queue statistics and utilization for each of the servers (for each queue created for the resource). When the results are printed you now need to use subscripts to print out utilizations for each queue --- UTILIZATION(1) and UTILIZATION(2) instead of just UTILIZATION (similar for queue length). Be sure to label each in the output!

    Finally, since DELAY is just an ordinary variable you need to have two separate variables -- say DELAY1 and DELAY2 -- for the delay and two separate variables for the average delays (you could use arrays but we'll wait for that). Add this in the appropriate places and be sure to print out both averages.

  5. A Bus Maintenance Facility: Copy tandem.sim to a file bus.sim. Modify bus.sim to model the bus facility described in problem #1.30 on page 105. There are very few changes needed -- two changes involve random number functions. Note also that it would be best to express time in hours since all parameters are given in hours. Finally, note that there are now 2 servers at the second queue (for the repair station) and hence the utilization needs to be divided by 2 to get the per worker utilization.

  6. Modeling Phone Calls: The program phones.sim models a system such as a call center with phone calls coming in. The center has a certain number of phone lines with no facility for putting someone on hold. If a call comes in and all lines are busy the call is lost. Since there is no queuing of calls, no resource is needed to model the calls. An integer indicating the number of busy lines and one indicating the total number of available lines suffices. Study the code for the program. Note that the main routine is written with a loop that runs the simulation several different times for different numbers of phone lines. The user enters the maximum and minimum number of lines to simulate. Compile and run the program to see how it works. Try input of 8 calls per minute with an average length of a call of 4 minutes. Run the simulation for 20 to 25 lines and for 24 hours.

    Now revise the program to do problem #1.29 on pages 104-105 of the text.

DUE DATES: Problems #1 - 5 above should be completed by Thursday, March 13. Problem #6 by Tuesday, March 18.

Using the Simulations to Answer Questions

Both problems 1.29 and 1.30 ask questions to be answered. That means analyzing the output which, of course, means using confidence intervals.

  1. For #1.29, run the program with various numbers of lines until you get a reasonable range that you think the answer would fall in. Then for some lines in that range (for example, you may decide the number of lines should be in the range 25 - 30) run the program at least 10 times (10 replications --- each with different stream combinations). Use Minitab to construct confidence intervals from your results. Then use your confidence intervals to determine the number of lines. Give reasons for your answer.

  2. Problem 1.30 says replicate the simulation 5 times -- that's not enough. You should replicate it at least 10 times, then construct confidence intervals for each of the performance measures. To make this easier, add a loop to main to perform the replication and add code to print the results (only the numbers) to a file that is suitable for importing into Minitab. Run the program with at least 10 replications and construct t-confidence intervals for each performance measure.

  3. Problem 1.30 asks whether the facility could handle a quadrupling of buses into the system.
  4. Run your program to test each of the following scenarios. In each case, run the program 10 times and compute t-confidence intervals for the performance measures.

    State your conclusions: would the facility be able to handle either of the above scenarios? why or why not?

DUE DATE: Thursday, March 20, 2003