SIMULATION An attempt to duplicate the features, appearance, and characteristics of a real system Applied Management Science for Decision Making, 1e © 2012 Pearson Prentice-Hall, Inc. Philip A. Vaccaro, PhD
HISTORY Developed by John von Neumann to solve nuclear physics problems that were too complex and costly to solve manually during the Manhattan Project in 1944 Specialized computer languages were developed in the 1960s such were developed in the 1960s such as GASP, Dynamo,and Simscript as GASP, Dynamo,and Simscript
Simulation Applications Train scheduling Manufacturing Sales forecasting Inventory planning and control Distribution system design Plant layout Aircraft scheduling War games Waiting line analysis Economic forecasting Ambulance location and dispatching Traffic light timing Investment portfolios Highway planning Environmental planning
The Idea Behind Simulation To imitate a real-world situation mathematically. To then study its properties and operating characteristics. To draw conclusions and make action decisions based on the simulated results.
To Use Simulation Define the problem Introduce the critical variables associated with the problem Construct a numerical model Set up possible courses of action for testing Run the experiment Consider the results Perhaps modify the model or change the data inputs Decide what course of action to take
Relevant Variable Any variable or factor that affects the behavior of the real-world system. The goal is to identify and integrate as many of these variables as possible into the simulation, so as to account for approximately 85% of a system’s actual behavior.
Relevant Variables U.S. Econometric Model Relevant Variables U.S. Econometric Model McGraw-Hill – DRI, Lexington, MA. PLUS 1,000 ADDITIONAL VARIABLES NOT SHOWN, WITH MORE BEING IDENTIFIED AND ADDED EVERY YEAR Trade deficit / surplus for goods Trade deficit / surplus for services Prime interest rate Money supply Average worker productivity Unemployment rate Capital investment by private industry Government spending
Types of System Behavior Simulated Growth or contraction of an economy. Actions of rival firms. Ecosystems such as marshlands & lakes. Product demand. Financial markets. Customer arrivals. Land, air, sea traffic. Spread of epidemics. Enemy tactics in combat. Equipment breakdowns.
simulating the “unthinkable”
The Iconic Simulation Uses a physical model to replicate a real-world system. From the Greek word ίκων ( icon ) or “image”. A flight simulator is used to train pilots without jeopardizing real people or aircraft. Wind tunnels are employed to evaluate aircraft designs for fuel efficiency and fuselage integrity.
MonteCarloSimulation When a system contains elements that exhibit chance behavior, the Monte Carlo method of simulation is applied. THE MOST USED SIMULATION IN BUSINESS
Television Sales Example Suppose a store wanted to estimate a salesperson’s average daily commissions on televisions sold. Assume s/he receives a $10.00 commission on each television sold, and that only one model is offered. Assume also, that only six ( 6 ) levels of sales are possible on a given business day: 0,1,2,3,4, or 5. The store wants to run the simulation over ten ( 10 ) business days.
Monte Carlo Simulation Steps 1. Set up a probability distribution for each relevant variable.
TELEVISION SALES SIMULATION NUMBER OF TELEVISIONS SOLD Sales Probability CumulativeProbability RANDOM NUMBER INTERVAL ONE RELEVANT VARIABLE WITH 6 POSSIBLE VALUES
Monte Carlo Simulation Steps 2. Set up a cumulative probability distribution for the relevant variable.
TELEVISION SALES SIMULATION NUMBER OF TELEVISIONS SOLD Sales Probability CumulativeProbability RANDOM NUMBER INTERVAL HOW TO COMPUTE THE CUMULATIVE PROBABILITIES
Monte Carlo Simulation Steps 3. Set up random number intervals for the relevant variable.
TELEVISION SALES SIMULATION NUMBER OF TELEVISIONS SOLD Sales Probability CumulativeProbability RANDOM NUMBER INTERVAL HOW TO SET UP THE RANDOM NUMBER INTERVALS
TELEVISION SALES SIMULATION NUMBER OF TELEVISIONS SOLD Sales Probability CumulativeProbability RANDOM NUMBER INTERVAL HOW TO SET UP THE RANDOM NUMBER INTERVALS THE CUMULATIVE PROBABILITY BECOMES THE UPPER BOUND OF THE RN INTERVAL
TELEVISION SALES SIMULATION NUMBER OF TELEVISIONS SOLD Sales Probability CumulativeProbability RANDOM NUMBER INTERVAL THE COMPLETED SIMULATION SPREADSHEET
TELEVISION SALES SIMULATION NUMBER OF TELEVISIONS SOLD Sales Probability CumulativeProbability RANDOM NUMBER INTERVAL ALTERNATE SIMULATION SPREADSHEET
Random Number Intervals A block of consecutive numbers used to represent each possible value or outcome of a relevant variable in the simulation. SOME RELEVANT VARIABLES HAVE ONLY A FEW POSSIBLE VALUES OR OUTCOMES, BUT OTHERS MAY HAVE HUNDREDS OR THOUSANDS !
Random Number Interval Assumption ( Television Daily Sales Simulation ) We arbitrarily select a block of consecutive numbers from “1” to “100” and assign those numbers to each television set “sale event” on a proportional basis. 0 Sales 1 Sale 2 Sales 3 Sales 4 Sales 5 Sales WE JUST AS EASILY COULD HAVE USED A CONSECUTIVE BLOCK OF NUMBERS FROM “1” to “1,000” or “1” to “10,000”
In Other Words…… 15% 01 – 15 Since P ( 0 Sales ) = 15%, the numbers 01 – 15 will be assigned to, and represent that particular demand event. 20% 16 – 35 Since P ( 1 Sale ) = 20%, the numbers 16 – 35 will be assigned to, and represent that particular demand event. 30% 36 – 65 Since P ( 2 Sales ) = 30%, the numbers 36 – 65 will be assigned to, and represent that particular demand event. 15% First 15% of NUMBERS 20% Next 20% of NUMBERS 30% Next 30% of NUMBERS
Monte Carlo Simulation Steps 4. Generate random numbers.
Generating Random Numbers If the simulation is large and involves many trials, computer programs are available to generate the needed random numbers. If the simulation is small and involves few trials, random number tables are available from which to select the random numbers.
Table of Random Numbers FROM A STATISTICS OR MATHEMATICS TEXT
If the random number intervals used 2-digit numbers, what would we need to do to a random number table? Answer We would need to break the numbers in the random number table into 2-digit numbers as well. Question
Table of Random Numbers FROM A STATISTICS OR MATHEMATICS TEXT
If the random number intervals used 3-digit numbers, what would we need to do to a random number table? Answer We would need to break the numbers in the random number table into 3-digit numbers as well. Question
Table of Random Numbers
Monte Carlo Simulation Steps 5. Simulate a series of trials.
Simulating The Experiment We simulate outcomes by simply selecting random numbers from the random number table and noting the random number interval into which each random number falls.
Execution If the random number generated is “51”, it falls within the random number interval “36 – 65” which represents a daily demand of two television sets. WE HAVE JUST SIMULATED A DAILY DEMAND OF TWO TELEVISION SETS FOR THE 1 st DAY!
TELEVISION SALES SIMULATION NUMBER OF TELEVISIONS SOLD Sales Probability CumulativeProbability RANDOM NUMBER INTERVAL IF RANDOM NUMBER SELECTED IS “51” THEN SIMULATED DAILY DEMAND IS TWO TELEVISIONS
Execution If the random number generated is “08”, it falls within the random number interval “01 – 15” which represents a daily demand of zero television sets. WE HAVE JUST SIMULATED A DAILY DEMAND OF ZERO TELEVISION SETS FOR THE 2 nd DAY!
TELEVISION SALES SIMULATION NUMBER OF TELEVISIONS SOLD Sales Probability CumulativeProbability RANDOM NUMBER INTERVAL IF RANDOM NUMBER SELECTED IS “08” THEN SIMULATED DAILY DEMAND IS ZERO TELEVISIONS
Execution If the random number generated is “62”, it falls within the random number interval “36 – 65” which represents a daily demand of two television sets. WE HAVE JUST SIMULATED A DAILY DEMAND OF TWO TELEVISION SETS FOR THE 3rd DAY!
TELEVISION SALES SIMULATION NUMBER OF TELEVISIONS SOLD Sales Probability CumulativeProbability RANDOM NUMBER INTERVAL IF RANDOM NUMBER SELECTED IS “62” THEN SIMULATED DAILY DEMAND IS TWO TELEVISIONS
TELEVISION SALES SIMULATION NUMBER OF TELEVISIONS SOLD Sales Probability CumulativeProbability RANDOM NUMBER INTERVAL IF RANDOM NUMBER SELECTED IS “01” THEN SIMULATED DAILY DEMAND IS ZERO TELEVISIONS
TELEVISION SALES SIMULATION NUMBER OF TELEVISIONS SOLD Sales Probability CumulativeProbability RANDOM NUMBER INTERVAL IF RANDOM NUMBER SELECTED IS “29” THEN SIMULATED DAILY DEMAND IS ONE TELEVISION
TELEVISION SALES SIMULATION NUMBER OF TELEVISIONS SOLD Sales Probability CumulativeProbability RANDOM NUMBER INTERVAL IF RANDOM NUMBER SELECTED IS “69” THEN SIMULATED DAILY DEMAND IS THREE TELEVISIONS
TELEVISION SALES SIMULATION NUMBER OF TELEVISIONS SOLD Sales Probability CumulativeProbability RANDOM NUMBER INTERVAL IF RANDOM NUMBER SELECTED IS “94” THEN SIMULATED DAILY DEMAND IS FOUR TELEVISIONS
Simulated Sales for Ten Business Days Day 1 ( 2 TVs )Day 1 ( 2 TVs ) Day 2 ( 0 TVs )Day 2 ( 0 TVs ) Day 3 ( 2 TVs )Day 3 ( 2 TVs ) Day 4 ( 0 TVs )Day 4 ( 0 TVs ) Day 5 ( 1 TV )Day 5 ( 1 TV ) Day 6 ( 3 TVs )Day 6 ( 3 TVs ) Day 7 ( 2 TVs )Day 7 ( 2 TVs ) Day 8 ( 2 TVs )Day 8 ( 2 TVs ) Day 9 ( 4 TVs )Day 9 ( 4 TVs ) Day 10 ( 2 TVs )Day 10 ( 2 TVs ) Simulated Average Daily Sales ( 18/10 = 1.8 TVs ) Σ = 18 TVs
TELEVISION SALES SIMULATION NUMBER OF TELEVISIONS SOLD Sales Probability CumulativeProbability RANDOM NUMBER INTERVAL THE LONG-TERM EVENT PROBABILITIES
To Test if the Simulation Was Run Over Sufficient Time.15(0) +.20(1) +.30(2) +.20(3) +.10(4) +.05(5) = 2.05 televisions Long-term probabilities Daily demand events Compute the expected value of average daily television set sales ( in units )
Conclusion Simulated average daily TV sales over 10 days = 1.80 units Expected Value of average daily TV sales = 2.05 units This simulation has not run a sufficient number of days! THE DIFFERENCE BETWEEN THE TWO NUMBERS IS JUST TOO SIGNIFICANT
How Simulation Duplicates “Reality” Every possible outcome that a relevant variable can assume, together with its respective long- term probability, is entered into the model.
How Simulation Duplicates “Reality” Every possible outcome that a relevant variable can assume, together with its respective long- term probability, is entered into the model. Randomly occuring outcomes for each relevant variable are generated by random number inter- vals and random number strings.
How Simulation Duplicates “Reality” Every possible outcome that a relevant variable can assume, together with its respective long- term probability, is entered into the model. Randomly occuring outcomes for each relevant variable are generated by random number inter- vals and random number strings. Since “reality” equals long-term probabilities + randomness, simulation achieves both!
The number of possible values for the relevant variable The number of days we wish to run the simulation
The program will choose the random numbers for you, if you select this option. We select RNs that are 2 places to the right of the decimal
The expected value of sales over time
Use this option to insert your own random numbers
We get the same simulated daily sales and the same average daily sales under this method
We need to run this simulation more than just 10 days. The observed frequencies do not come close to the long-term frequencies.
Template and Sample Data
Template and Sample Data
Here, we allow the program to select its own random numbers
Here, we specify the random numbers we want to use to simulate daily demand
SIMULATION Applied Management Science for Decision Making, 1e © 2012 Pearson Prentice-Hall, Inc. Philip A. Vaccaro, PhD