Professional Documents
Culture Documents
MMGT6012 - Topic 10 - Simulation Modelling
MMGT6012 - Topic 10 - Simulation Modelling
What is Simulation?
What is Simulation?
What is Simulation?
In Optimisation Modelling:
– Model parameters are fixed
– We know all numbers of passengers
– We know all flight times
– We know exactly how long it takes to serve each passenger
What is Simulation?
In Simulation Modelling:
– Model parameters are uncertain
– A range of different passenger numbers is possible
– Flight times may differ to schedule for a variety of reasons
– Service time per passenger may have some variance around the average
What is Simulation?
What is Simulation?
Assess how that potential solution performs for that one outcome:
– Repeat the process many times so we see how it performs in many different
set of potential outcomes
What is Simulation?
What is Simulation?
Optimisation Model
– Decision variables are outputs
– Model provides a set of values for the decision variables that maximises (or
minimises) the value of the objective function
Simulation Model:
– Decision variables are inputs
– The model evaluates the objective function for a particular set of values
Probability Distributions
Probability Distributions
A discrete distribution:
– Limited number of discrete outcomes
– A uniform distribution (each outcome has the same chance of occurring)
Probability Distributions
(1) (2)
The University of Sydney Page 13
10. Simulation Modelling
Probability Distributions
Probability Distributions
Sales data over the last 100 weeks suggests this distribution:
Two
20%
One
40%
Now suppose the manager spins the wheel and gets 39:
Week 1 2 3 4 5 6 7 8 9 10
Random #
Sim. Score
At the end of this topic there are slides for your own benefit:
– We are not explaining these formulas in great detail in the lecture
I just copy and pasted the random draw down 1000 rows
The University of Sydney Page 35
10. Simulation Modelling
Sub Simulation()
Max_It = Range(“F11").Value
For Iteration = 1 To Max_It
Range(“F12").Value = Iteration
Next Iteration
End Sub
Recording a Macro
Recording a Macro
Sub Simulation()
Max_It = Range(“F11").Value
For Iteration = 1 To Max_It
Score
Range(“F12").Value = Iteration
Next Iteration
End Sub
Recording a Macro
Now record Macro resets the simulation for every new run:
– Name the Macro (Reset)
– Select B21:B26 and press delete
– Stop recording the Macro
Sub Simulation()
Reset
Max_It = Range(“F11").Value
For Iteration = 1 To Max_It
Score
Range(“F12").Value = Iteration
Next Iteration
End Sub
– If you want to avoid this you need to lock the cell reference.
– Change it from a relative to an absolute cell reference.
– =Rand()
– Generates a random number between 0 and 1.
– =RandBetween(X,Y)
– Generates a random number between X and Y.
– =RandBetween(1,100)
– Generates random numbers between 1 and 100.
=sumproduct(A1:A10,B1:B10)
=28001
=(A1*B1)+(A2*B2)+(A3*B3)+…+(10*B10)
– =COUNTIF(range, criteria)
– In Excel, the CountIf function counts the number of cells in a range, that
meets a given criteria.
– range is the range of cells that you want to count based on the criteria.
– criteria is used to determine which cells to count and how to count them.
=VLOOKUP($F2,$A$2:$B$8,2,TRUE)
Look for that value in these True = Find the lowest boundary
rows and columns False = Find the exact match