0% found this document useful (0 votes)
85 views44 pages

CH 16

Simulation is one of the most frequently employed management science techniques. It is typically used to model random processes that are too complex to be solved by analytical methods. Simulation is, in effect, a trial and error method of comparing different policy inputs.

Uploaded by

Virender Singh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views44 pages

CH 16

Simulation is one of the most frequently employed management science techniques. It is typically used to model random processes that are too complex to be solved by analytical methods. Simulation is, in effect, a trial and error method of comparing different policy inputs.

Uploaded by

Virender Singh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 44

Anderson

Sweeney

Williams

QUANTITATIVE METHODS FOR BUSINESS 8e


Slides Prepared by JOHN LOUCKS

2001 South-Western College Publishing/Thomson Learning South-

Slide 1

Chapter 16 Simulation
      

Advantages and Disadvantages of Simulation Modeling Random Variables and Pseudo-Random Numbers PseudoTime Increments Simulation Languages Validation and Statistical Considerations Examples

Slide 2

Simulation


Simulation is one of the most frequently employed management science techniques. It is typically used to model random processes that are too complex to be solved by analytical methods.

Slide 3

Advantages of Simulation


Among the advantages of simulation is the ability to gain insights into the model solution which may be impossible to attain through other techniques. Also, once the simulation has been developed, it provides a convenient experimental laboratory to perform "what if" and sensitivity analysis.

Slide 4

Disadvantages of Simulation


A large amount of time may be required to develop the simulation. There is no guarantee that the solution obtained will actually be optimal. Simulation is, in effect, a trial and error method of comparing different policy inputs. It does not determine if some input which was not considered could have provided a better solution for the model.

Slide 5

Simulation Modeling


One begins a simulation by developing a mathematical statement of the problem. The model should be realistic yet solvable within the speed and storage constraints of the computer system being used. Input values for the model as well as probability estimates for the random variables must then be determined.

Slide 6

Random Variables


Random variable values are utilized in the model through a technique known as Monte Carlo simulation. simulation. Each random variable is mapped to a set of numbers so that each time one number in that set is generated, the corresponding value of the random variable is given as an input to the model. The mapping is done in such a way that the likelihood that a particular number is chosen is the same as the probability that the corresponding value of the random variable occurs.

Slide 7

PseudoPseudo-Random Numbers


Because a computer program generates random numbers for the mapping according to some formula, the numbers are not truly generated in a random fashion. However, using standard statistical tests, the numbers can be shown to appear to be drawn from a random process. These numbers are called pseudo-random numbers. pseudonumbers.

Slide 8

Time Increments


In a fixed-time simulation model, time periods are fixedmodel, incremented by a fixed amount. For each time period a different set of data from the input sequence is used to calculate the effects on the model. In a next-event simulation model, time periods are nextmodel, not fixed but are determined by the data values from the input sequence.

Slide 9

Simulation Programs


 

The computer program that performs the simulation is called a simulator. simulator. Flowcharts can be useful in writing such a program. While this program can be written in any general purpose language (e.g. BASIC, FORTRAN, C++, etc.) special languages which reduce the amount of code which must be written to perform the simulation have been developed. Special simulation languages include SIMSCRIPT, SPSS, DYNAMO, and SLAM.

Slide 10

Model Verification/Validation


Verification/validation of both the model and the method used by the computer to carry out the calculations is extremely important. Models which do not reflect real world behavior cannot be expected to generate meaningful results. Likewise, errors in programming can result in nonsensical results. Validation is generally done by having an expert review the model and the computer code for errors. Ideally, the simulation should be run using actual past data. Predictions from the simulation model should be compared with historical results.
Slide 11

Experimental Design


Experimental design is an important consideration in the simulation process. Issues such as the length of time of the simulation and the treatment of initial data outputs from the model must be addressed prior to collecting and analyzing output data. Normally one is interested in results for the steady state (long run) operation of the system being modeled. The initial data inputs to the simulation generally represent a start-up period for the process and it may be startimportant that the data outputs for this start-up period startbe neglected for predicting this long run behavior.

Slide 12

Experimental Design


For each policy under consideration by the decision maker, the simulation is run by considering a long sequence of input data values (given by a pseudopseudorandom number generator). Whenever possible, different policies should be compared by using the same sequence of input data.

Slide 13

Example: Probablistics, Inc.


The price change of shares of Probablistics, Inc. has been observed over the past 50 trades. The frequency distribution is as follows: Number of Trades Price Change -3/8 4 -1/4 2 -1/8 8 0 20 +1/8 10 +1/4 3 +3/8 2 +1/2 1 Total = 50
Slide 14

Example: Probablistics, Inc.




Relative Frequency Distribution and Random Number Mapping Price Change Relative Frequency Random Numbers -3/8 .08 00 - 07 -1/4 .04 08 - 11 -1/8 .16 12 - 27 0 .40 28 - 67 +1/8 .20 68 - 87 +1/4 .06 88 - 93 +3/8 .04 94 - 97 98 - 99 +1/2 .02 TOTAL 1.00
Slide 15

Example: Probablistics, Inc.


If the current price per share of Probablistics is 23, use random numbers to simulate the price per share over the next 10 trades. Use the following stream of random numbers: 21, 84, 07, 30, 94, 57, 57, 19, 84, 84

Slide 16

Example: Probablistics, Inc.




Simulation Worksheet Trade Random Number Number 1 21 2 84 3 07 4 30 5 94 6 57 7 57 8 19 9 84 10 84

Price Change -1/8 +1/8 -3/8 0 +3/8 0 0 -1/8 +1/8 +1/8

Stock Price 22 7/8 23 22 5/8 22 5/8 23 23 23 22 7/8 23 23 1/8


Slide 17

Example: Probablistics, Inc.



1 2 3 4 5 6 7 8 9 10 11 12

Spreadsheet for Stock Price Simulation


A B C D E Lower Upper Trade Price Random Random Price Number Change Number Number Change 1 0.125 0.00 0.08 -0.375 2 0.250 0.08 0.12 -0.250 3 0.500 0.12 0.28 -0.125 4 0.125 0.28 0.68 0.000 5 0.375 0.68 0.88 0.125 6 0.125 0.88 0.94 0.250 7 0.000 0.94 0.98 0.375 8 0.125 0.98 1.00 0.500 9 0.125 10 0.125 F Stock Price 23.125 23.375 23.875 24.000 24.375 24.500 24.500 24.625 24.750 24.875

Slide 18

Example: Probablistics, Inc.




Theoretical Results and Observed Results Based on the probability distribution, the expected price change per trade can be calculated by: (.08)((.08)(-3/8) + (.04)(-1/4) + (.16)(-1/8) + (.40)(0) (.04)((.16)(+ (.20)(1/8) + (.06)(1/4) + (.04)(3/8) + (.02)(1/2) = +.005 The expected price change for 10 trades is (10)(.005) = .05. Hence, the expected stock price after 10 trades is 23 + .05 = 23.05. Compare this ending price with the spreadsheet simulation and manual simulation results on the previous slides.
Slide 19

Example: Mark Offs Process


Mark Off is a specialist at repairing large metalmetalcutting machines that use laser technology. His repair territory consists of the cities of Austin, San Antonio, and Houston. His day-to-day repair assignment day-tolocations can be modeled as a Markov process. The transition matrix is: Next Day's Location Austin San Antonio Houston Austin This Day's San Antonio Location Houston .60 .20 .15 .15 .75 .05 .25 .05 .80
Slide 20

Example: Mark Offs Process




Random Number Mappings

Currently in Currently in Currently in Austin San Antonio Houston NextNext-Day Random Next-Day Random Next-Day Random NextNextLocation Numbers Location Numbers Location Numbers Austin 00 - 59 Austin 00 - 19 Austin 00 - 14 San Ant. 60 - 74 San Ant. 20 - 94 San Ant. 15 - 19 Houston 75 - 99 Houston 95 - 99 Houston 20 - 99

Slide 21

Example: Mark Offs Process


Assume Mark is currently in Houston. Simulate where Mark will be over the next 16 days. What percentage of time will Mark be in each of the three cities? Use the following random numbers: 93, 63, 26, 16, 21, 26, 70, 55, 72, 89, 49, 64, 91, 02, 52, 69

Slide 22

Example: Mark Offs Process




Simulation Worksheet Starting in Houston Random Day's Random Day Number Day Number Location 1 93 Houston 9 72 2 63 Houston 10 89 3 26 Houston 11 49 4 16 San Ant. 12 64 5 21 San Ant. 13 91 6 26 San Ant. 14 02 7 70 San Ant. 15 52 8 55 San Ant. 16 69

Day's Location San Ant. San Ant. San Ant. San Ant. San Ant. Austin Austin San Ant.
Slide 23

Example: Mark Offs Process


Repeat the simulation with Mark currently in Austin. Use the following random numbers: 13, 08, 60, 13, 68, 40, 40, 27, 23, 64, 36, 56, 25, 88, 18, 74 Compare the percentages with those found with Mark starting in Houston.

Slide 24

Example: Mark Offs Process


Simulation Worksheet Starting in Austin Random Day's Random Day's Day Number Location Day Number Location 1 13 Austin 9 23 San Ant. 2 08 Austin 10 64 San Ant. 3 60 San Ant. 11 36 San Ant. 4 13 Austin 12 56 San Ant. 5 68 San Ant. 13 25 San Ant. 6 40 San Ant. 14 88 San Ant. 7 40 San Ant. 15 18 Austin 8 27 San Ant. 16 74 San Ant.
 Slide 25

Example: Mark Offs Process




Simulation Summary Starting in Houston Austin = 2/16 = 12.50% San Antonio = 11/16 = 68.75% Houston = 3/16 = 18.75% Starting in Austin Austin = 4/16 = 25% San Antonio = 12/16 = 75% Houston = 0/16 = 0%

Slide 26

Example: Mark Offs Process




Partial Spreadsheet with Variable Look-up Table LookA B D E F G Current Location S.A. NDL LRN URN NDL LRN Aus. 0.00 0.20 Aus. 0.00 S.A. 0.20 0.95 S.A. 0.15 Hou. 0.95 1.00 Hou. 0.20 C H Hou. URN 0.15 0.20 1.00 I

1 Aus. 2 3 LRN URN 6 0.00 0.60 7 0.60 0.75 8 0.75 1.00 9

NDL Aus. S.A. Hou.

URN = Upper Random Number LRN = Lower Random Number NDL = Next-Day Location
Slide 27

Example: Mark Offs Process




Partial Spreadsheet with Simulation Table


11 12 13 14 15 16 17 18 19 A B Current Location Aus. S.A. S.A. S.A. S.A. S.A. S.A. C D E F Random Next-Day Number Location 0.64 S.A. 0.33 S.A. 0.87 S.A. 0.61 S.A. 0.30 S.A. 0.45 S.A. 0.71 S.A.

=IF(A13=$A$2,VLOOKUP(C13,$A$6:$C$8,3), IF(A13=$D$2,VLOOKUP(C13,$D$6:$F$8,3), VLOOKUP(C13,$G$6:$I$8,3)))


Slide 28

Example: Wayne International Aiport


Wayne International Airport primarily serves domestic air traffic. Occasionally, however, a chartered plane from abroad will arrive with passengers bound for Wayne's two great amusement parks, Algorithmland and Giffith's Cherry Preserve. Whenever an international plane arrives at the airport the two customs inspectors on duty set up operations to process the passengers. Incoming passengers must first have their passports and visas checked. This is handled by one inspector. The time required to check a passenger's passports and visas can be described by the probability distribution on the next slide.
Slide 29

Example: Wayne International Aiport

Time Required to Check a Passenger's Passport and Visa 20 seconds 40 seconds 60 seconds 80 seconds

Probability .20 .40 .30 .10

Slide 30

Example: Wayne International Aiport


After having their passports and visas checked, the passengers next proceed to the second customs official who does baggage inspections. Passengers form a single waiting line with the official inspecting baggage on a first come, first served basis. The time required for baggage inspection has the following probability distribution: Time Required For Baggage Inspection Probability No Time .25 1 minute .60 2 minutes .10 3 minutes .05
Slide 31

Example: Wayne International Aiport




Random Number Mapping Time Required to Check a Passenger's Passport and Visa 20 seconds 40 seconds 60 seconds 80 seconds Random Numbers 00 - 19 20 - 59 60 - 89 90 - 99

Probability .20 .40 .30 .10

Slide 32

Example: Wayne International Aiport




Random Number Mapping Time Required For Baggage Inspection No Time 1 minute 2 minutes 3 minutes Probability .25 .60 .10 .05 Random Numbers 00 - 24 25 - 84 85 - 94 95 - 99

Slide 33

Example: Wayne International Aiport




NextNext-Event Simulation Records For each passenger the following information must be recorded: When his service begins at the passport control inspection The length of time for this service When his service begins at the baggage inspection The length of time for this service

Slide 34

Example: Wayne International Aiport




Time Relationships

Time a passenger begins service by the passport inspector = (Time the previous passenger started passport service) + (Time of previous passenger's passport service)

Slide 35

Example: Wayne International Aiport




Time Relationships

Time a passenger begins service by the baggage inspector ( If passenger does not wait in line for baggage inspection) = (Time passenger completes service with the passport control inspector) (If the passenger does wait in line for baggage inspection) = (Time previous passenger completes service with the baggage inspector)

Slide 36

Example: Wayne International Aiport




Time Relationships

Time a customer completes service at the baggage inspector = (Time customer begins service with baggage inspector) + (Time required for baggage inspection)

Slide 37

Example: Wayne International Aiport


A chartered plane from abroad lands at Wayne Airport with 80 passengers. Simulate the processing of the first 10 passengers through customs. Use the following random numbers: For passport control: 93, 63, 26, 16, 21, 26, 70, 55, 72, 89 For baggage inspection: 13, 08, 60, 13, 68, 40, 40, 27, 23, 64

Slide 38

Example: Wayne International Aiport




Simulation Worksheet (partial)

Passport Control Baggage Inspections Pass. Time Rand. Service Time Time Rand. Service Time Num Begin Num. Time End Begin Num. Time End 1 2 3 4 5 0:00 1:20 2:20 3:00 3:20 93 63 26 16 21 1:20 1:00 :40 :20 :40 1:20 2:20 3:00 3:20 4:00 1:20 2:20 3:00 4:00 4:00 13 08 60 13 68 0:00 0:00 1:00 0:00 1:00 1:20 2:20 4:00 4:00 5:00

Slide 39

Example: Wayne International Aiport




Simulation Worksheet (continued)

Passport Control Baggage Inspections Pass. Time Rand. Service Time Time Rand. Service Time Num Begin Num. Time End Begin Num. Time End 6 7 8 9 10 4:00 4:40 5:40 6:20 7:20 26 70 55 72 89 :40 1:00 :40 1:00 1:00 4:40 5:40 6:20 7:20 8:20 5:00 6:00 7:00 8:00 8:20 40 40 27 23 64 1:00 1:00 1:00 0:00 1:00 6:00 7:00 8:00 8:00 9:20

Slide 40

Example: Wayne International Aiport




Explanation For example, passenger 1 begins being served by the passport ontrol inspector immediately. His service time is 1:20 (80 seconds) at which time he goes immediately to the baggage inspector who waves him through without inspection. Passenger 2 begins service with passport inspector 1:20 minutes (80 seconds) after arriving there (as this is when passenger 1 is finished) and requires 1:00 minute (60 seconds) for passport inspection. He is waved through baggage inspection as well. This process continues in this manner.

Slide 41

Example: Wayne International Aiport




Question How long will it take for the first 10 passengers to clear customs? Answer Passenger 10 clears customs after 9 minutes and 20 seconds.

Slide 42

Example: Wayne International Aiport




Question What is the average length of time a customer waits before having his bags inspected after he clears passport control? How is this estimate biased? Answer For each passenger calculate his waiting time: (Baggage Inspection Begins) - (Passport Control Ends) =0+0+0+40+0+20+20+40+40+0 = 120 seconds. 120/10 = 12 seconds per passenger. This is a biased estimate because we assume that the simulation began with the system empty. Thus, the results tend to underestimate the average waiting time.
Slide 43

The End of Chapter 16

Slide 44

You might also like