22474_Sim 2. Basic Simulation Process

Preview:

DESCRIPTION

simulation model

Citation preview

Basic Simulation Process

Paulus TangkereIndustrial Model Simulation

Session 2

ptSimulation

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

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)

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

ptModel

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

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

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

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.

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

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

ptCase – Personal Saving

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

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

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.

ptSimulation Process

Main Program

Initialization Routine

Timing Routine

Event Routine

Library Routine

Report Generator

Is simulation

over?

Start

Stop

ptComponents & Organization of

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

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.

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.

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.

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.

ptLibrary Routine

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

model.

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.

Recommended