22474_Sim 2. Basic Simulation Process

21
Basic Simulation Process Paulus Tangkere Industrial Model Simulation Session 2

description

simulation model

Transcript of 22474_Sim 2. Basic Simulation Process

Page 1: 22474_Sim 2. Basic Simulation Process

Basic Simulation Process

Paulus TangkereIndustrial Model Simulation

Session 2

Page 2: 22474_Sim 2. Basic Simulation Process

ptSimulation

Imitation of reality. • to understand the behavior of a system. • to insure that we are doing the right thing.

Page 3: 22474_Sim 2. Basic Simulation Process

ptSystem

“A system is a group of people, things and/or ideas connected by some common reason or purpose, that is clearly differentiated from its

surroundings, and which has attributes or properties that are different from those its

members have individually, and the belonging to which alters those members in some way…..as perceived or conceived by an

individual human being.”(Hicks, 1991)

Page 4: 22474_Sim 2. Basic Simulation Process

ptComponents of a System

• Entity: object of interest in a system • Attribute: property of an entity• Activity: any process causing change in a system• State of the system: collection of variables necessary

to describe a system – description of all the entities, attribute and activities as they exist at one point of time

• Event: an instantaneous occurrence that may change the state of the system

Page 5: 22474_Sim 2. Basic Simulation Process

ptModel

Representation of a system.• a simplification of the system.• a picture of the real world.

Page 6: 22474_Sim 2. Basic Simulation Process

pt

System

Study/experiment with the

actual system

Study/experiment with a model of

the system

Physicalmodel

Mathematical orlogical model

Simulationmodel

Analyticalmodel

Systems and Models

Page 7: 22474_Sim 2. Basic Simulation Process

pt

Analytical model Performance measures are expressed as mathematical functions of input parameters, result is exact and close form solution, applicable only to simple problems.

Simulation model a logical model that is evaluated (numerically) over a time period of interest, Performance measures are estimated from model-generated data with statistical procedures, applicable to systems of any complexity.

Analytical vs. Simulation

Page 8: 22474_Sim 2. Basic Simulation Process

ptSimulation Modeling

• The process of designing and creating a computerized model of a real or proposed system for the purpose of numerical experiment to develop better understanding of the behavior/dynamics of that system under a given set of conditions.

• Simulation is a powerful tool for design, modeling, analysis, and optimization of systems.

Page 9: 22474_Sim 2. Basic Simulation Process

pt

• Static vs. dynamic – time dependency– Static: at particular time – time simply plays no role

Monte Carlo models.– Dynamic: evolves over time conveyor system in a

factory.• Continuous vs. discrete– state variable changes

– Continuous: smooth airplane – Discrete: discontiunous bank services

• Deterministic vs. stochastic – event probability.

Types of Simulation

Page 10: 22474_Sim 2. Basic Simulation Process

pt

• By hand (for small problems)• By computers with software (3 levels of

abstraction):– Programming in general-purpose language (e.g.,

C/C++,Pascal, Fortran)– Simulation language (SIMAN, GPSS, SLAM) – High level simulators (GUI based, menu-driven,

such as ARENA©, AutoMod©, ProModel©)

Implementation of Simulation

Page 11: 22474_Sim 2. Basic Simulation Process

ptCase – Personal Saving

Value of money1. Pure saving at home.2. Pure saving in bank.3. Transactions.

Page 12: 22474_Sim 2. Basic Simulation Process

pt

• Simulation is centered around events that occur as a consequence of activities or delays.

• Simulation keeps track of events that are assumed to occur in (simulated) future, and update system states and move the simulation clock as events occur sequentially.

• Need a mechanism to determine and control:– What type of event to occur ? (adding new event)– Which event should be scheduled to occur next?– What to do when an event occurs? (e.g. updating

system states and statistical accumulators)

Event-driven simulation

Page 13: 22474_Sim 2. Basic Simulation Process

ptDiscrete-event Simulation (DES)

Modeling of systems in which the state variable changes only at a discrete set of points in time.

The system can change at only a countable number of points in time.

The simulation models are analyzed by numerical rather than by analytical methods. Analytical methods employ the deductive reasoning of mathematics to solve the model.

Page 14: 22474_Sim 2. Basic Simulation Process

ptSimulation Process

Main Program

Initialization Routine

Timing Routine

Event Routine

Library Routine

Report Generator

Is simulation

over?

Start

Stop

Page 15: 22474_Sim 2. Basic Simulation Process

ptComponents & Organization of

a DES Model1. Initialization Routine2. Timing Routine3. Main Program4. Event Routine5. Library Routine6. Report Generator

Page 16: 22474_Sim 2. Basic Simulation Process

ptInitialization Routines

A subprogram to initialize the simulation model at time=0.

1. Set simulation clock=0.2. Initialize system state and statistical counters.3. Initialize event list.

Page 17: 22474_Sim 2. Basic Simulation Process

ptTiming 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.

1. Determine the next event type, say i.2. Advance the simulation clock.

Page 18: 22474_Sim 2. Basic Simulation Process

ptMain 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.0. Invoke the initialization routine.1. Invoke the timing routine.2. Invoke event routine i.

Page 19: 22474_Sim 2. Basic Simulation Process

ptEvent Routine

A subprogram that updates the system state when a particular type of event occurs

(there is one event routine for each event type).

1. Update system state. 2. Update statistical counters.3. Generate future events and add to event list.

Page 20: 22474_Sim 2. Basic Simulation Process

ptLibrary Routine

A set of subprograms use to generate random observations from probability distributions that were determined as of the simulation

model.

Page 21: 22474_Sim 2. Basic Simulation Process

ptReport Generator

A subprogram that computes estimates (from the statistical counters) of the desired

measures of performance and produces a report when the simulation ends.