Title: General Concepts in Simulation
1General Concepts in Simulation
2Definition of Simulation
- Simulation is the operation of a real-world
process or system over time. - Simulation involves the generation of an
artificial history of the system, and the
observation of that artificial history to draw
inferences concerning the operating
characteristics of the real system that is
represented.
3Definition of Simulation
- One of the top 3 technologies
- Simulation is no longer the technique of last
resort - It is an indispensable problem-solving methodology
4Definition of Simulation
- We use simulation to
- Describe and analyze the behavior of a system
- Ask what if questions about the real system
- Aid in the design of real systems
- Existing and conceptual systems
- We model both kinds
5Ad Hoc Simulation
- Mechanics arrive for service at a tool crib
between one and ten minutes apart in time - Mechanics are served in a time between one and
six minutes - Integer values
- Simulate for twenty mechanics
6Ad Hoc Simulation Table
Mechanic Time Arrival Service Service Time Time I
dle Time between Time Time begins Service in Time
in Arrivals Ends System Queue ______________
__________________________________________________
__________________________________________________
_________1 - 0 2 0 2 2 0 0 2 5 5 2 5 7 2 3 0 3 1 6
6 7 13 7 0 1 20 7 98 1 98 99 1 4 0 72
34 7
7Performance Measures
- Avg time in system 72/20 3.6 minutes
- idle time (34/99)100 34
- Avg waiting time/mechanic 7/20 0.35 minutes
- Fraction having to wait 3/20 0.15
- Avg waiting time of those that waited 7/3
2.33 minutes
8Model
- Representation of an actual system
- Model should be complex to answer the questions
asked, but not too complex
9Event
- An occurrence that changes the state of the
system - Beginning of service for a mechanic, completion
of a service
10Endogenous Event
- Happens within the system
- Beginning of service of the mechanic
11Exogenous Event
- Occurrence is outside of the simulation
- Arrival of a mechanic for service
12Discrete-Event Simulation Models
- Contrast with other types of models
- Mathematical models
- Descriptive models
- Statistical models
- Input-output models
13Discrete-Event Simulation Models
- Represent the components of a system and their
interactions to such an extent that the
objectives of the study are met - Mathematical, statistical and input-output models
represent a systems inputs and outputs
explicitly, but represent the internals of the
model with mathematical or statistical
relationships - Discrete-event simulation models include a
detailed representation of the actual internals
14Dynamic
- Passage of time plays a crucial role
- Mathematical and statistical models are static in
that they represent a system at a fixed point in
time
15System State Variables
- Collection of all information needed to define
what is happening within the system to a
sufficient level at a given point in time - Fcn. of the purposes of the investigation
- What may be the system state variables in one
case may not be the same in another case even
though the physical system is the same
16Discrete vs. Continuous
- System state variables in a discrete-event model
remain constant over intervals of time and change
value only at certain well-defined points called
event times - Continuous models have system state variables
defined by differential or difference equations
giving rise to variables that change continuously
over time
17Others
- Mixed discrete-event and continuous
- Continuous models that are treated as
discrete-event models after some reinterpretation
of system state variables, and vice versa
18Entity
- An object that requires explicit definition
- Can be dynamic in that it moves through the
system - Can be static in that it serves other entities
- Mechanic is a dynamic entity
- Tool crib attendant is a static entity
19Attributes
- Local values
- Many entities can have the same attributes
- Color could be an attribute
- Time production began could be an attribute
20Variables
- Global values
- Available to all entities
- Clock
21Resource
- Static entity that provides service to dynamic
entities - Resource can serve one or more than one dynamic
entity at the same time, (i.e., operate as a
parallel server)
22Resource
- Dynamic entity can request one or more units of a
resource - If denied, the requesting entity joins a queue,
or takes some other action (i.e., diverted to
another resource, ejected from the system)
23Resource
- Other terms for queues include files, chains,
buffers, and waiting lines - If permitted to capture the resource, the entity
remains for a time, then releases the resource
24Resource States
- Minimally, these states are idle and busy
- Other possibilities exist such as failed, blocked
or starved, etc.
25List Processing
- Entities are managed
- by allocating them to resources that provide
service - by attaching them to event notices thereby
suspending their activity into the future - or by placing them into an ordered list
- Lists are used to represent queues
26Rule Processing
- Lists are usually processed according to FIFO
- LIFO
- SPT
- RAN
- PR
- HVA(), LVA()
27Activity
- Duration of time that is known prior to
commencement of the activity - When the duration begins its end can be scheduled
- Constant, random value from a statistical
distribution, result of an equation, come from an
input file, or computed based on the event state
28Activity Examples
- Service time may be constant 10 minutes for each
entity - Random values from an exponential distribution
with a mean of 10 minutes
29Activity Examples
- 0.9 times a standard value from time 0 to 4
hours, and 1.1 times the standard value after
time 4 hours - 10 minutes when the preceding queue contains less
than or equal to four entities and 8 minutes when
there are five or more in the preceding queue
30Delay
- Indefinite duration that is caused by some
combination of system conditions - Time that an entity will remain in the queue may
be unknown since that time may depend on other
events that may occur - Arrival of a rush order that preempts a resource
- Failure necessitating repair of the resource
31Time Advance
- Discrete-event simulation contains activities
that cause time to advance - Most discrete-event simulations also contain
delays as entities wait - Beginning and ending of an activity or delay is
an event
32Discrete-Event Simulation Model
- State variables change only at those discrete
points in time at which events occur - Events occur as a consequence of activity times
and delays - Entities may compete for system resources,
possibly joining queues while waiting for an
available resource - Activity and delay times may hold entities for
periods of time
33Running of Models
- Discrete-event simulation model is conducted over
time (run) by a mechanism that moves simulated
time forward - System state is updated at each event along with
capturing and freeing of resources that may or
may not occur at that time
34Process-Interaction World View
- Entities move forward until they are
- Delayed
- Enter an activity
- Are terminated
- At which time another entity begins to move
forward
35Some Questions
- How is the form of the input data determined?
- What if the input data follows some other
statistical distribution? - How does the user know when the simulation
imitates reality? - What other kinds of problems can be solved by
simulation?
36Some Questions
- How long does the simulation need to run?
- How many different simulation runs should be
conducted? - What statistical techniques should be used to
analyze the output?
37In-class exercise
38End