DECISION MODELING WITH MICROSOFT EXCEL Chapter 10 DISCRETE EVENT SIMULATION Part 2 Copyright 2001 Prentice Hall EXAMPLE 4 – HERVIS CAR RENTAL MODEL REVISITED Based on the previous results, Hervis came up with an idea of pulling some of the car service people off the car lot to staff more rental stations whenever the queue of customers became large. In this way, the staffing of the rental stations would increase to three or even four clerks whenever a peak in customer demand occurred. To model this dynamic change in behavior in Extend, we would need a way to alter the value in the Maximum Number in Activity field of the Activity, Multiple block dialog during the simulation. To do this, double-click the Queue, FIFO block to display its dialog window. For explanations, click on the Help button. The L value output connector reads out the queue length throughout the simulation run. The C connector can be used to input a capacity value that overrides the number recorded in the Maximum Number in Activity field. What is needed is a way to convert the L value from the Queue, FIFO block into the desired number of rental stations and feed that dynamic number into the C connector of the Activity, Multiple block during the simulation. Extend’s Conversion Table block is similar to Excel’s VLOOKUP in that it will map the input L values to the output C values. To open the Conversion Table block, click on GENERIC.lix - Math - Conversion Table. Connect the L value output connector of the Queue, FIFO block to the Conversion Table’s input connector. Next, connect the Conversion Table’s output connector to the C value of the Activity, Multiple block. The text box shows Hervis’ proposed decision rule for increasing the number of rental station clerks. Double-click on the Conversion Table block to open its dialog window. Choose Stepped under the Table is: option. These values (0 - 30 for x in and 1 - 4 for y out) represent the proposed decision rule. A value of 4 for y out is assigned to values of x in greater than 6. This places a cap on the maximum number of rental clerks. Click on the Run Simulation icon. Here is the resulting graph. Remember, results will differ due to the random effects. Now, compare the following results for the Queue, FIFO block: Up to 4 Clerks during 2 Clerks peak periods Compare the following results for the Activity, Multiple block: Up to 4 Clerks during 2 Clerks peak periods To verify these results, we could run the simulation many more times. However, it would be difficult to compare each set of results. Extend’s Queue Stats block, will collect queuing statistics from multiple runs of a simulation model. Using this, we can systematically assess the influence of the model’s inherent randomness on a performance measure. Open this block by going to the Library – Open Library menu and choosing Stats.lrx from the resulting dialog. Now, open the Queue Stats block and place it anywhere in the Extend model window. Double-click on the Queue Stats block to open its dialog window: To tabulate the results of multiple runs, select the Append new updates and Update at end of simulation options. Now, go to Run – Simulation Setup dialog and change the Number of runs to say, 20. This instructs Extend to make 20 independent runs of the model, tabulating the queuing statistics from each run into the Queue Stats block. Clicking on the Run Simulation icon will now cause the model to automatically run 20 times. After starting the simulation, a status bar and small graph will appear on the bottom of the screen, from which you can monitor the progress of the simulations. After the runs are finished, double-click on the Queue Stats block to open the dialog and review the results. These results confirm that increasing the number of clerks will not help the model. Clicking on the Confidence Interval button in this dialog will further summarize the results giving 95% confidence intervals. EXAMPLE 5 – FINAL HERVIS CAR RENTAL MODEL Now, return to the original 2 clerk rental station policy. Instead of increasing the number of clerks at the rental station, let’s consider serving only two types of customers: Those who desire smaller compact cars (Economy cars) Those who desire larger, more powerful cars (Deluxe cars) Assume that 70% of customers will opt for economy cars and the balance for deluxe cars. The challenge is to decide how many of each type of car to have available at the beginning of the week to avoid car shortages during the week and ultimately customer dissatisfaction. Past data on car rentals shows: Economy car customers rent their car for between one and two days. Deluxe car customers rent their cars typically for two days plus or minus a half day. Since the time interval for economy car rentals is fairly evenly distributed, we can approximate the distribution as being Uniform. For deluxe car renters, a Normal distribution for the rental times is a good fit to the data, with a standard deviation of ½ a day. We will use Extend’s Hierarchical blocks to minimize visual complexity. This will allow us to create models made up of submodels (logical groupings of Extend blocks). To do this, select all of the blocks except the Executive and Exit blocks and choose the Make Selection Hierarchical item on the Model menu. A dialog will appear in which you can specify a name for the new super-block. Enter the name and click on Make H-Block to create the super-block. You can double-click on the super-block to expand it into a new window and add a label. Now, begin building the expanded model in place of the original Exit block, so that customers flowing out of the Rental Office submodel will enter the rental car lot of the simulated model. Delete the Exit block in the Extend model and add two new blocks: Input Random Number block This block uses an Empirical Table to assign a 0 value (to signify an economy car rental) with probability .7 and a 1 value (deluxe car rental) with probability .3. Select DE Output block This block splits the stream of customers to one of two output connectors based upon the value present at its Select connector. To insert the Input Random Number block, go to Library – GENERIC.lix – Inputs/Outputs – Input Random Number. Double-click on this icon to open the respective dialog. Choose Empirical Table as the Distribution. Give the block a label. Specify the values which signify whether an economy or deluxe car is rented and the respective probabilities. To insert the Select DE Output block, go to Library – DE.lix – Routing – Select DE Output. Double-click on this icon to open the respective dialog. The incoming customer is directed to the top (“a” connector) output if the random number at its Select connector is 0 and is directed to the bottom (“b” connector) output if the random number at its Select connector is 1. Connect the blocks accordingly: Now, introduce a Resource Pool block from the DE.lix library, A Resource Pool is a variable that indicates how many of a named constrained resource (e.g., Deluxe cars) are available. Double click on the Resource Pool block to open its dialog window. Initialize the resource pool of Deluxe Cars to 100, based on the weekly maximum demand for deluxe cars. Insert a special form of a queuing block, a Queue, Resource Pool block (from DE.lix – Queues). The Queue, Resource Pool block will hold items (deluxe car customers) until the specified number of Resource Pool units from the Deluxe Cars pool are available (one in this case). The item is then released and the count in the pool is decremented, thus in effect, a deluxe car is assigned to the customer. Note that the Resource Pool block is a globally accessible variable, tracking the number of deluxe cars on hand in this case, and has no drawn connections to other bocks. Now that a deluxe customer has received a deluxe car, we must model the rental interval until it is returned. We will do this using the Activity, Multiple block and a new Input Random Number block. Specify a normal distribution with a mean of 2 days (2880 minutes) and standard dev. of .5 days (720 minutes). The capacity of the Activity, Multiple block defaults to a large number, 1000, to assure that no items would be stopped from entering this block. After the rental time random delay, the car is returned to the deluxe car pool to be available for re-renting by the Release Resource Pool block (from the DE.lix – Resources menu). Now, model the economy car customers similar to the deluxe car customers. Add another Resource Pool block and set the initial capacity to 140. Add another Queue, Resource Pool block to assign economy cars from the pool, if available. Next, add an Activity, Multiple block, Input Random Number block and a Release Resource Pool block to return the economy car to its pool. Finally, insert an Exit (4) block (from DE.lix – Routing menu) to allow both streams of customer types to exit the model. To preserve customer goodwill, let’s implement a policy of upgrading an economy car to receive a deluxe car, if possible, in the event no economy cars are available. Open the Queue, Resource Pool block’s dialog window for the economy car. Specify Car Type under pool name: by clicking on the edit field and entering it in the resulting dialog. Extend will start at the top of the Pool name list and attempt to assign a car from the Economy Car pool. If that pool is empty, it will go to the Deluxe Car pool and assign a deluxe car if available. Otherwise, it will hold the customer until one of either car type becomes available. During the simulation run, economy car customers assigned a car from one of the two pools will have the name of that pool carried with them as a Car Type attribute for later reference. In the Release Resource Pool block, the returned rental car is credited to whatever pool name was used earlier and carried by the attribute Car Type. The Input Random Number block shows the random rental time (from 1440 to 2880 minutes) from a Uniform distribution, for an economy car customer. Now, to complete the model, add Queue Stats (from STATS.lrx), Help (from GENERIC.lix Inputs/Outputs) and Plotter, Discrete Event (from PLOTTER.lix) blocks. An Activity Stats block (from STATS.lrx) has been added to record statistics for the Activity delay blocks just as the Queue Stats block does for the Queue blocks. After running the simulation (with initial resource pools of 140 economy cars and 100 deluxe cars), double click on the Plotter, Discrete Event block to view the graph below: This line Thisrepresents is the the number of Economy cars number being rented of during the week. Deluxe Car customers arriving on the This is the lot to find it number of empty of Economy Car deluxe cars. customers arriving on the lot to find it This line represents the number of Deluxeempty of any cars being rented during the week. car to rent. The graph indicates (by the thick line traces) that the initial car pool sizes are grossly inadequate for customer demands. The Queue Stats and Activity Stats windows confirm this conclusion. For example, after 20 simulation runs, the 95% confidence interval for the average wait by a deluxe car customer was 140 + 49 minutes. In order to improve on the wait time in this model, we need to increase the pool size. Let’s experimentally increase each pool’s initial size by about 15%, increasing the Deluxe Cars pool to 115 and the Economy cars pool to 160 and the re-run the simulation. This increase in pool size shows much improvement as illustrated by the average and maximum wait time. In order to reduce the maximum wait time, change the initial resource pools to 170 Economy Cars and 125 Deluxe Cars and re-run the simulation. These results are even better. It seems though, that waiting times may be sensitive to small underestimates in the distributions’ parameter assumptions and that much more simulation analysis is needed.