Sei sulla pagina 1di 21

Basic Simulation Process

Paulus Tangkere
Industrial Model Simulation
Session 2

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

p
t

System

p
t

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)

Components of a System p
t

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

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

p
t

Systems and Models

p
t

System
Study/experiment
with the
actual system

Study/experiment
with a model of
the system

Physical
model

Mathematical or
logical model

Analytical
model

Simulation
model

Analytical vs. Simulation p


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

Simulation Modeling

p
t

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.

Types of Simulation
Static vs. dynamic time dependency

p
t

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.

Implementation of
Simulation

p
t

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, menudriven, such as ARENA, AutoMod,
ProModel)

Case Personal Saving


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

p
t

Event-driven simulation

p
t
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)

Discrete-event
Simulation (DES)

p
t

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.

Simulation Process

p
t

Start
Initialization
Routine

Main
Program

Timing
Routine

Event
Routine

Library
Routine

Is
simulation
over?

Report
Generator
Stop

1.
2.
3.
4.
5.
6.

Components &
Organization of a DES
Model

Initialization Routine
Timing Routine
Main Program
Event Routine
Library Routine
Report Generator

p
t

Initialization Routines

p
t

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.

Timing Routine

p
t

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.

Main Program

p
t

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.

Event Routine

p
t

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.

Library Routine

p
t

A set of subprograms use to


generate random observations
from probability distributions
that were determined as of the
simulation model.

Report Generator

p
t

A subprogram that computes


estimates (from the statistical
counters) of the desired
measures of performance and
produces a report when the
simulation ends.

Potrebbero piacerti anche