Chapter 2 Fundamental Simulation Concepts The simulation models we consider will be discrete,...
-
Upload
jeffry-taylor -
Category
Documents
-
view
214 -
download
0
Transcript of Chapter 2 Fundamental Simulation Concepts The simulation models we consider will be discrete,...
Chapter 2 Fundamental Simulation Concepts
The simulation models we consider will be discrete, dynamic, and stochastic - discrete-event simulation model
Discrete-event simulation concerns the modeling of a system as it evolves over time by a representation in which the statevariables change instantaneously at separate points in time.
Def: event - instantaneous occurrence which (may) change the state of system.
end the simulation
Discrete-event simulation model
Time-Advance Mechanisms
Def: Simulation clock - The variable in a simulation model gives the current simulated time.
The unit of time is never explicitly when a model is written in a general-purpose language.
Simulated TimeThe time needed to runa simulation on the computer
Time-Advance Mechanisms
Two principal approaches for advancing the simulationclock
Next-Event Time Advance
Fixed-Increment Time Advance
The simulation clock is initialized to zero and the times of future events are determined. The simulationclock is then advanced to the time of occurrence ofthe most imminent(first) of these future events.(Ex 1.2, Law )
Components and Organization of a Discrete-EventSimulation Model
System State - The collection of state variables necessary to describe the system at a particular time.Simulation Clock - A variable given the current value of simulation time.Event List - A list containing the next time when each type of event will occur.Statistical Counter - Variables used to storing statistical information about system performance.
Components and Organization of a Discrete-EventSimulation Model
Initialization Routine - A subprogram to initialize the simulation model at time zero.Timing Routine - A subprogram that determine the next event from the event list and then advances the simulation clock to the time when that event is to occur.Event Routine - A subprogram that updates the system state when a particular type of event occurs (there is one event routine for each event type)Library Routine - A set of subprograms used to generate random observations from probability distributions that were determined as part of the simulation model.
Components and Organization of a Discrete-EventSimulation Model
Report Generator - A subprogram that computes estimates (from the statistical counters) of the desired measures of performance and produces a report when the simulation ends (p.20).Main Program - A subprogram that invokes the timing routine to determine the next event and then transfer control to the corresponding event routine to update the system state appropriately. The main program may also check for termination and invoke the report generator when the simulation is over.
Flow of control for the next-event time advance approach
Main Program
Event routine i
Is simulation over
Generate randomvariates
1. Determine the next event type,say i2. Advance the simulation clock
L ibrary routines
Timing routine
1. Set simulation clock=02. Initialize system state andstatistical counters3. Initialize event list
Initialization routine
Start
0. Invoke the initializationroutine1. Invoke the timing routine2. Invoke event routine i
1. Update system state2. Update statistical counters3. Generate future events and addto event list
1. Compute estimatesof interest2. Write report
End
否
是
What output performance measures you want to collect?
•The total production
•The average waiting time in queue
•The maximum time waiting in queue
•The time-average number of parts waiting in the queue
Service level guarantees to customer
(Tally)
Allocating floor space
•The maximum number of parts that were waiting in the queue
What output performance measures you want to collect?
•The average and maximum flow time (cycle time)
•The utilization of the machine
Some notes about simulation
1. Not optimization procedure
The result is “Your cost will be c if you take action x” not “Your cost is minimized if you take action x”
2. Simulation Model : simplified model