Presentation is loading. Please wait.

Presentation is loading. Please wait.

ADVANTAGES OF SIMULATION

Similar presentations


Presentation on theme: "ADVANTAGES OF SIMULATION"— Presentation transcript:

1 ADVANTAGES OF SIMULATION
Most complex, real-world systems with stochastic elements cannot be accurately described by a mathematical model that can be evaluated analytically. Thus, a simulation is often the only type of investigation possible. Simulation allows one to estimate the performance of an existing system under some projected set of operating conditions. Alternative proposed system designs (or alternative operating policies for a single system) can be compared via simulation to see which best meets a specified requirement. In a simulation we can maintain much better control over experimental conditions than would generally be possible when experimenting with the system itself. Simulation allows us to study a system with a long time frame---e.g., an economic system---in compressed time, or alternatively to study the detailed workings of a system in expanded time.

2 DISADVANTAGES OF SIMULATION
Each run of a stochastic simulation model produces only estimates of a model’s true characteristics for a particular set of input parameters. If a “valid” analytic model is available or can be easily de developed, it will generally be preferable to a simulation model. Simulation models are often expensive and time-consuming to develop. If a model is not a “valid” representation of a system under study, the simulation results, no matter how impressive they appear, will provide little useful information about the actual system.

3 DISADVANTAGES OF SIMULATION
Each simulation model is unique In some studies both simulation and analytic models might be useful. In particular, simulation can be used to check the validity of assumptions needed in an analytic model. On the other hand, an analytic model can suggest reasonable alternatives to investigate in a simulation study.

4 Pitfalls to the successful completion of a simulation study
Failure to have a well-defined set of objectives at the beginning of the simulation study Inappropriate level of model detail Failure to communicate with management throughout the course of the simulation study Misunderstanding of simulation by management Treating a simulation study as if it were primarily an exercise in computer programming Failure to have people with a knowledge of simulation methodology and statistics on the modeling team Failure to collect good system data Inappropriate simulation software Obliviously using simulation software products whose complex marco statement may not be well documented and may not implement the desired modeling logic

5 Pitfalls to the successful completion of a simulation study
Belief that easy-to-use simulation packages, which require little or no programming, require a significantly lower level of technical competence Misuse of animation Failure to account correctly for sources of randomness in the actual system Using arbitrary distributions (e.g., normal, uniform, or triangular) as input to the simulation Analyzing the output data from one simulation run (replication) using formulas that assume independence Making a single replication of a particular system design and treating the output statistics as the “true answers” Comparing alternative system design on the basis of one replication for each design Using the wrong performance measures

6 Discrete-Event Simulation continued…

7 State Variables State:
queue customer server State: InTheAir: number of aircraft either landing or waiting to land OnTheGround: number of landed aircraft RunwayFree: Boolean, true if runway available

8 Time Step Implementation
/* ignore aircraft departures */ Float InTheAir: # aircraft landing or waiting to land Float OnTheGround: # landed aircraft Boolean RunwayFree: True if runway available Float NextArrivalTime: Time the next aircraft arrives Float NextLanding: Time next aircraft lands (if one is landing) For (Now = 1 to EndTime) { /* time step size is 1.0 */ if (Now >= NextArrivalTime) { /* if aircraft just arrived */ InTheAir := InTheAir + 1; NextArrivalTime := NextArrivalTime + RandExp(A); if (RunwayFree) { RunwayFree := False; NextLanding := Now + RandExp(L); } if (Now >= NextLanding) { /* if aircraft just landed */ InTheAir := InTheAir - 1; OnTheGround := OnTheGround + 1; if (InTheAir > 0) NextLanding := Now + RandExp(L) else {RunWayFree := True; NextLanding := EndTime+1;}

9 Problems With Time Step Approach
State changes may occur between time steps Use small time steps to minimize error Multiple state changes within the same time step may be processed in the wrong order Solvable by ordering state changes within time step (this imposes more work) Inefficient Many time steps no state changes occur, especially if small time steps

10 Discrete Event Simulation
Discrete Event Simulation: computer model for a system where changes in the state of the system occur at discrete points in simulation time. Fundamental concepts: System state (state variables) State transitions (events) Each event has a timestamp indicating when it occurs. A DES computation can be viewed as a sequence of event computations, with each event computation is assigned a (simulation time) time stamp Each event computation can Modify state variables Schedule new events

11 Discrete Event Simulation Computation
Example: air traffic at an airport Events: aircraft arrival, landing, departure arrival 8:00 schedules processed event current event unprocessed event departure 9:15 arrival 9:30 landed 8:05 schedules simulation time Events that have been scheduled, but have not been simulated (processed) yet are stored in a pending event list Events are processed in time stamp order; why?

12 Events An event must be associated with any change in the state of the system Airport example: Event 1: Aircraft Arrival (InTheAir, RunwayFree) Event 2: Aircraft Landing (InTheAir, OnTheGround, RunwayFree) Event 3: Aircraft Departure (OnTheGround)

13 Event-Oriented World View
state variables Integer: InTheAir; Integer: OnTheGround; Boolean: RunwayFree; Event handler procedures Simulation Application Arrival Event { } Landed Event Departure Event Pending Event List (PEL) 9:00 9:16 10:10 Now = 8:45 Simulation Engine Event processing loop While (simulation not finished) E = smallest time stamp event in PEL Remove E from PEL Now := time stamp of E call event handler procedure

14 Example: Air traffic at an Airport
Model aircraft arrivals and departures, arrival queuing Single runway for incoming aircraft, ignore departure queuing L = mean time runway used for each landing aircraft (exponential distrib.) G = mean time on the ground before departing (exponential distribution) A = mean inter-arrival time of incoming aircraft (exponential distribution) States Now: current simulation time InTheAir: number of aircraft landing or waiting to land OnTheGround: number of landed aircraft RunwayFree: Boolean, true if runway available Events Arrival: denotes aircraft arriving in air space of airport Landed: denotes aircraft landing Departure: denotes aircraft leaving

15 Arrival Events Arrival Process: New aircraft arrives at airport.
If the runway is free, it will begin to land. Otherwise, the aircraft must circle, and wait to land. A: mean interarrival time of incoming aircraft Now: current simulation time InTheAir: number of aircraft landing or waiting to land OnTheGround: number of landed aircraft RunwayFree: Boolean, true if runway available Arrival Event: InTheAir := InTheAir+1; Schedule Arrival Now + RandExp(A); If (RunwayFree) { RunwayFree:=FALSE; Schedule Landed Now + RandExp(L); }

16 Landed Event Landing Process: An aircraft has completed its landing.
L = mean time runway is used for each landing aircraft G = mean time required on the ground before departing Now: current simulation time InTheAir: number of aircraft landing or waiting to land OnTheGround: number of landed aircraft RunwayFree: Boolean, true if runway available Landed Event: InTheAir:=InTheAir-1; OnTheGround:=OnTheGround+1; Schedule Departure Now + RandExp(G); If (InTheAir>0) Schedule Landed Now + RandExp(L); Else RunwayFree := TRUE;

17 Departure Event Departure Process: An aircraft now on the ground departs for a new destination. Now: current simulation time InTheAir: number of aircraft landing or waiting to land OnTheGround: number of landed aircraft RunwayFree: Boolean, true if runway available Departure Event: OnTheGround := OnTheGround - 1;

18 Execution Example L=3 G=4 State Variables InTheAir OnTheGround
Simulation Time State Variables RunwayFree InTheAir 1 2 3 4 5 6 7 8 9 10 11 true L=3 G=4 Time Event 1 Arrival F1 3 Arrival F2 Now=0 Processing: false 1 Time Event 4 Landed F1 3 Arrival F2 Arrival F1 Now=1 2 Time Event 4 Landed F1 Arrival F2 Now=3 1 Time Event 11 Depart F2 Depart F1 Now=8 2 true Time Event 8 Depart F1 11 Depart F2 Landed F2 Now=7 1 Landed F1 Now=4 Time Event 8 Depart F1 7 Landed F2 Time Event Depart F2 Now=11


Download ppt "ADVANTAGES OF SIMULATION"

Similar presentations


Ads by Google