Lecture 36 - Simulation Modeling II
Lecture 36 - Simulation Modeling II
SIMULATION MODELING II
1
SIMULATION MODELING II
TYPES OF SIMULATION
The execution of present-day simulation is based generally on the idea of sampling used with the
Monte Carlo method.
It differs in that it is concerned with the study of the behavior of real systems as a function of time.
1. Continuous models deal with systems whose behavior changes continuously with time.
These models usually use difference-differential equations to describe the interactions among
the different elements of the system.
2
2. Discrete models deal with systems whose behavior changes only at given instants.
A typical example occurs in waiting lines where we are interested in estimating such measures
as the average waiting time or the length of the waiting line.
Such measures change only when a customer enters or leaves the system.
At all other instants, there is no occurrence from the perspective of collecting statistics in the
system.
The instants at which changes in the system occur identify the model's events (for example:
arrival and departure of customers).
The fact that these events occur at discrete instants gives rise to the name discrete event
simulation.
3
Although both continuous and discrete simulations are important tools in practice, the discrete
type is the one that is usually presented in conjunction with operations research areas.
The reason is that discrete simulation is more closely associated with queueing models.
Indeed, it is proper to state that practically all discrete simulation cases can be described in some
form or another as queueing models.
This chapter presents the basics of discrete event simulation, including a description of the
components of a simulation model, collection of simulation statistics, and the statistical aspect of
the simulation experiment.
The chapter also emphasizes the role of the computer and simulation languages in the execution of
simulation models.
4
ELEMENTS OF DISCRETE-EVENT SIMULATION
This section introduces the concept of events in simulation and shows how the statistics of the
simulated system are collected.
5
Given that a discrete-event model is in reality a composite of queues, collection of simulation
statistics (for example: queue length and status of the service facility) take place only when a
customer arrives at the queue or leaves the facility after being served.
This means that the two principal events in any discrete simulation model are an arrival and a
departure.
These are the only two instants at which we need to examine the system.
At all other instants, no changes affecting the statistics of the system occur.
6
Example 2
Metalco Jobshop receives two types of jobs: regular and rush.
All jobs are processed on two consecutive machines with ample buffer areas.
7
Solution
This situation consists of two tandem queues corresponding to the two machines.
At first, one may be inclined to identify the events of the situation as:
8
In reality, there are only two events: an arrival of a (new) job at the shop and a departure of a
(completed) job from a machine.
We first notice that events D11 and A12 are actually one and the same.
Next, in discrete simulation we can use one event (arrival or departure) for both types of jobs and
simply “tag” the event with an attribute that identifies the job type as either regular or rush.
We can think of the attribute in this case as a personal identification descriptor, and indeed
it is.
Given this reasoning, the events of the model reduce to (1) an arrival A (at the shop) and (2) a
departure D (from a machine).
9
The actions associated with the arrival event depend on the type of arriving job (rush or regular)
and the availability of a machine.
Similarly, the processing of the departure event will depend on the machine and the status of
waiting jobs.
The actions associated with the arrival and departure events will therefore depend on the machine
at which they occur.
Having defined the basic events of a simulation model, we show how the model is executed.
10
Figure 2: Example of the occurrence of simulation events on the time scale.
After all the actions associated with a current event have been performed, the simulation advances
by “jumping” to the next chronological event.
In essence, the execution of the simulation occurs at the instants at which the events occur.
How does the simulation determine the occurrence time of the events?
The arrival events are separated by the inter-arrival time (the interval between successive arrivals),
and the departure events are a function of the service time in the facility.
11
These times may be deterministic (for example: a train arriving at a station every 5 minutes) or
probabilistic (for example: the random arrival of customers at a bank).
If the time between events is deterministic, the determination of their occurrence times is
straightforward.
12