Simulation Modeling and Analysis
Chapter 1 : Introduction to
simulation modeling
ISE 444
Simulation : imitate, or simulate, the operations of various kinds of real-world facilities or processes. make a set of assumptions about how it
works.
System : the facility or process of interest.
Model : mathematical or logical relationships, used to try to gain some understanding of how the corresponding system behaves.
If the relationships that compose the model are simple enough, it may be possible to use mathematical methods (such as algebra, calculus,
or probability theory) to obtain exact information on questions of interest; this is called an analytic solution. However, most real-world
systems are too complex to allow realistic models to be evaluated analytically, and these models must be studied by means of simulation.
In a simulation we use a computer to evaluate a model numerically, and data are gathered in order to estimate the desired true
characteristics of the model.
1. Introduction
1/2026 2
1. Introduction
Application areas for simulation :
• Designing and analyzing manufacturing systems
• Evaluating military weapons systems or their logistics requirements
• Determining hardware requirements or protocols for communications networks
• Determining hardware and software requirements for a computer system
• Designing and operating transportation systems such as airports, freeways, ports, and subways
• Evaluating designs for service organizations such as call centers, fast-food restaurants, hospitals, and
post offices
• Reengineering of business processes
• Analyzing supply chains
• Determining ordering policies for an inventory system
• Analyzing mining operations
1/2026 3
2. SYSTEMS, MODELS, AND SIMULATION
A system is defined to be a collection of entities, e.g., people or machines, that act and
interact together toward the accomplishment of some logical end. The system depends on the
objectives of a particular study.
The state of a system : collection of variables necessary to describe a system at a particular
time, relative to the objectives of a study.
2 types of systems : discrete and continuous.
A discrete system is one for which the state variables change instantaneously at separated points in time.
A continuous system is one for which the state variables change continuously with respect to time.
Few systems in practice are wholly discrete or wholly continuous; but since one type of change predominates for most systems, it will usually be
possible to classify a system as being either discrete or continuous.
4
2. SYSTEMS, MODELS, AND SIMULATION
Example :
The system is a bank and the objective is to determine the number of tellers needed to provide
adequate service for customers who want just to cash a check or make a savings deposit.
Possible state variables : The number of busy tellers, the number of customers in the bank, and
the time of arrival of each customer in the bank.
A bank is an example of a discrete system, since state variables— e.g., the number of
customers in the bank—change only when a customer arrives or when a customer
finishes being served and departs.
An airplane moving through the air is an example of a continuous system, since state
variables such as position and velocity can change continuously with respect to
time.
5
2. SYSTEMS, MODELS, AND SIMULATION
Experiment with the Actual System vs.
Experiment with a Model of the System : the
“system” might not even exist, but we nevertheless
want to study it in its various proposed alternative
configurations. For these reasons, it is usually
necessary to build a model as a representation of the
system and study it as a surrogate for the actual
system. Model vs. Mathematical Model. The vast
Physical
majority of models built for such purposes are
mathematical, representing a system in terms of
logical and quantitative relationships that are then
manipulated and changed to see how the model
reacts, and thus how the system would react.
Analytical Solution vs. Simulation. Once we have built a mathematical model, it must then be
examined to see how it can be used to answer the questions of interest about the system it is
supposed to represent. If the model is simple enough, it may be possible to work with its
relationships and quantities to get an exact, analytical solution.
However, many systems are highly complex, so that valid mathematical models of them are
themselves complex, precluding any possibility of an analytical solution. In this case, the model
must be studied by means of simulation, i.e., numerically exercising the model for the inputs in
question to see how they affect the output measures of performance.
2. SYSTEMS, MODELS, AND SIMULATION
Deterministic vs. Stochastic Simulation Models. If a simulation model does not contain any
probabilistic (i.e., random) components, it is called deterministic. In deterministic models, the
output is “determined” once the set of input quantities and relationships in the model have been
specified, even though it might take a lot of computer time to evaluate what it is. Many systems,
however, must be modeled as having at least some random input components, and these give
rise to stochastic simulation models.
Stochastic simulation models produce output that is itself random, and must therefore be treated
as only an estimate of the true characteristics of the model; this is one of the main disadvantages
of simulation.
Continuous vs. Discrete Simulation Models. The decision whether to use a discrete or a
continuous model for a particular system depends on the specific objectives of the study.
3. DISCRETE-EVENT SIMULATION
Example : single server (one-operator barbershop or an information desk at an airport)
We would like to estimate the (expected) average delay in queue (line) of arriving customers, where the delay in queue of a
customer is the length of the time interval from the instant of his arrival at the facility to the instant he begins being served. For the
objective of estimating the average delay of a customer, the state variables for a discrete-event simulation model of the facility would
be the status of the server, i.e., either idle or busy, the number of customers waiting in queue to be served (if any), and the time of
arrival of each person waiting in queue.
The time of arrival of a customer is needed to compute his delay in queue, which is the time he begins being served (which will be
known) minus his time of arrival. There are two types of events for this system: the arrival of a customer and the completion of
service for a customer, which results in the customer’s departure. An arrival is an event since it causes the (state variable) server
status to change from idle to busy or the (state variable) number of customers in the queue to increase by 1. Correspondingly, a
departure is an event because it causes the server status to change from busy to idle or the number of customers in the queue to
decrease by 1.
3. DISCRETE-EVENT SIMULATION
Example : single server Random variables
The probability distributions of the interarrival times A1, A2, . . . and the service times S1, S2, . . .
are known and have cumulative distribution functions denoted by FA and FS, respectively. (In
general, FA and FS would be determined by collecting data from the system of interest)
Discrete-event simulation concerns the modeling of a system as it evolves over time by a
representation in which the state variables change instantaneously at separate points in
time.
These points in time are the ones at which an event occurs, where an event is defined as an
instantaneous occurrence
that may change the state of the system.
Because of the dynamic nature of discrete-event simulation models, we must keep track of
the current value of simulated time as the simulation proceeds, and we also need a
mechanism to advance simulated time from one value to another. We call the variable in a
simulation model that gives the current value of simulated time the simulation clock.
3. DISCRETE-EVENT SIMULATION
N E X T- E V E N T T I M E A D VA N C E I S T H E P R I N C I PA L A P P R OAC H U S E D BY
A L L M A J O R S I M U L AT I O N S O FT WA R E A N D BY M O S T P E O P L E
P R O G RA M M I N G T H E I R M O D E L I N A G E N E RA L- P U R P O S E L A N G U AG E ,
1/2026 10
3. DISCRETE-EVENT SIMULATION
Components and Organization of a Discrete-Event Simulation Model
System state: The collection of state variables necessary to describe the system at a
particular time
Simulation clock: A variable giving the current value of simulated time
Event list: A list containing the next time when each type of event will occur
Statistical counters: Variables used for storing statistical information about system
performance
Initialization routine: A subprogram to initialize the simulation model at time 0
Timing routine: A subprogram that determines the next event from the event list and then
advances the simulation clock to the time when that event is to occur
Event routine: A subprogram that updates the system state when a particular type of event
occurs (there is one event routine for each event type)
Library routines: A set of subprograms used to generate random observations from
probability distributions that were determined as part of the simulation model
Report generator: A subprogram that computes estimates (from the statistical counters) of
the desired measures of performance and produces a report when the simulation ends
Main program: A subprogram that invokes the timing routine to determine the next event and
then transfers control to the corresponding event routine to update the system state
appropriately. The main program may also check for
termination and invoke the report generator when the simulation is over.
3. DISCRETE-EVENT SIMULATION
Flow of control for the next-event time-
advance approach
System state: The collection of state variables
Simulation clock: the current value of simulated
time
Event list: A list of the next time of event
Statistical counters: storing statistical information
Initialization routine: initialize the simulation
model at time 0
Timing routine: the next event from the event list
and then advances the simulation clock to the time
when that event is to occur
Event routine: updates the system state when a
particular type of event occurs (there is one event
routine for each event type)
Library routines: generate random observations
from probability distributions
Report generator: measure of performance and
report
Main program
4. SIMULATION OF A SINGLE-SERVER QUEUEING SYSTEM
Problem Statement
Consider a single-server queueing system for which the interarrival times
A1, A2, . . . are independent and identically distributed (IID) random
variables.
The simulation will begin in the “empty-and-idle” state; i.e., no customers
are present and the server is idle.
At time 0, we will begin waiting for the arrival of the first customer, which
will occur after the first interarrival time, A1,
simulate this system until a fixed number (n) of customers have completed
their delays in queue; i.e., the simulation will stop when the nth customer
enters service.
Performance measurement :
PM1 : Average delay
d(n) the expected average delay in queue of the n customers completing
their delays during the simulation. From a single run of the simulation
resulting in customer delays D1, D2, . . . , Dn,
4. SIMULATION OF A SINGLE-SERVER QUEUEING SYSTEM
PM2 : Average number of customers in the
queue
The expected average number of customers in the queue q(n) : let Q(t)
denote the number of customers in queue at time t, and T(n) be the time
required to observe our n delays in queue. Then for any time t between 0
and T(n), Q(t) is a nonnegative integer. Further, if we let pi be the expected
proportion (which will be between 0 and 1) of the time that Q(t) is equal to
Thus,
i: q(n) is a weighted average of the possible values i for the
queue length Q(t), with the weights being the expected
proportion of time the queue spends at each of its possible
lengths. To estimate q(n) from a simulation, we simply replace
the pi’s with estimates of them, and get
where pˆi is the observed (rather than expected)
proportion of the time during the simulation that
there were i customers in the queue.
let Ti be the total time during the simulation that the queue is of length i,
then T(n) = T0 + T1 + T2 + ∙ ∙ ∙ and pˆi = Ti/T(n)
4. SIMULATION OF A SINGLE-SERVER QUEUEING SYSTEM
Arr Dep
1 0.4 2.4
2 1.6 3.1
3 2.1 3.3
4 3.8 4.9
5 4 8.6
6 5.6 -
7 5.8 -
8 7.2 -
Q(t), arrival times, and departure times for a realization of a single-server
queueing system, n=6
4. SIMULATION OF A SINGLE-SERVER QUEUEING SYSTEM
q(n) is a weighted average of
the possible values i for the
queue length Q(t),
4. SIMULATION OF A SINGLE-SERVER QUEUEING SYSTEM
PM3 : Utilization of the server
uˆ(n) could be expressed as the proportion of time that B(t) is equal to 1
the server was busy about 90
percent of the time during B(t), arrival times, and departure times for a
this simulation realization of a single-server queueing system
4. SIMULATION OF A SINGLE-SERVER QUEUEING SYSTEM
Flowchart for arrival routine, queueing model Flowchart for departure routine, queueing model
4. SIMULATION OF A SINGLE-SERVER QUEUEING SYSTEM
4. SIMULATION OF A SINGLE-SERVER QUEUEING SYSTEM
4. SIMULATION OF A SINGLE-SERVER QUEUEING SYSTEM
4. SIMULATION OF A SINGLE-SERVER QUEUEING SYSTEM
4. SIMULATION OF A SINGLE-SERVER QUEUEING SYSTEM
5. STEPS IN A SOUND SIMULATION STUDY
6. Examples
A queueing system consists of one or more servers that provide service of some kind to arriving
customers. Customers who arrive to find all servers busy (generally) join one or more queues (or
lines) in front of the servers
Exercise 1
we describe the example system and decide what we’d like to know about its behavior and
performance
The System
“Blank” parts arrive to a drilling center, are processed by a single drill press, and then leave. If
a part arrives and finds the drill press idle, its processing at the drill press starts right away;
otherwise, it waits in a First-In First-Out (FIFO), that is, first-come first-served queue. This is the
logical structure of the model.
Exercise 1
Goals of the Study Output performance measures :
1. The total production (number of parts that complete their service at the drill press and leave)
during the 20 minutes of operation
2. The average waiting time in queue of parts that enter service at the drill press during the
simulation. If WQ i is the waiting time in queue of the i th part and it turns out that N parts
leave the queue during the 20-minute run, this average is :
3. The maximum waiting time in queue of parts that enter service at the drill press during the
simulation. This is a worst-case measure, which might be of interest in giving service-level
guarantees to customers. Small is good.
4. The time-average number of parts waiting in the queue (again, not counting any part in
service at the drill press). By “time average,” we mean a weighted average of the possible
queue lengths (0, 1, 2, . . .) weighted by the proportion of time during the run that the queue
was at that length. Letting Q ( t ) be the number of parts in the queue at any time instant t ,
this time-average queue length is the total area under the Q ( t ) curve, divided by the length
of the run, 20. In integralcalculus terms, this is
Exercise 1
Goals of the Study Output performance measures :
5. The maximum number of parts that were ever waiting in the queue
6. The average and maximum total time in system of parts that fi nish being processed on the
drill press and leave. Also called cycle time , this is the time that elapses between a part’s arrival
and its departure, so it’s the sum of the part’s waiting time in queue and its service time at the
drill press. This is a kind of turnaround time, so smaller is better.
7. The utilization of the drill press, defi ned as the proportion of time it is busy during the
simulation. Think of this as another time-persistent statistic, but of the “busy” function
Exercise 1
Events
Arrival: A new part shows up.
Departure: The part being served by the drill press is done and ready to
leave
The End: The simulation is over
Exercise 1
Hand simulation
1/2026
Exercise 1
Final Output Performance Measures from the Hand
Simulation
Exercise 2
A one-pump gas station is always open and has two types of customers. A police car arrives
every 30 minutes (exactly), with the first police car arriving at time 15 minutes.
Regular (nonpolice) cars have interarrival times 5 minutes, with the first regular car arriving
at time 0. Service times at the pump for all cars are 4 minutes. A car arriving to find the
pump idle goes right into service, and regular cars arriving to find the pump busy join the
end of a single queue.
A police car arriving to find the pump busy, however, goes to the front of the line, ahead of
any regular cars in line. [If there are already other police cars at the front of the line, assume
that an arriving police car gets in line ahead of them as well. (How could this happen?)]
Initially the system is empty and idle, and the simulation is to run until exactly 50 cars (of
any type) have completed their delays in queue.
Estimate :
- the expected average delay in queue for each type of car separately,
- the expected time-average number of cars (of either type) in queue,
- and the expected utilization of the pump.
Exercise 3
City buses arrive to the maintenance facility with interarrival times 2 hours. The facility consists of a
single inspection station and two identical repair stations. Every bus is inspected, and inspection time
is constant 15 minutes. The inspection station is fed by a single FIFO queue. Historically, 30 percent of
the buses have been found during inspection to need some repair. The two parallel repair stations are
fed by a single FIFO queue, and repairs are constant 2.1 hours.
Run the simulation for 48 hours and compute :
- The average number in each queue
- The utilization of the inspection station
- The utilization of the repair station
Suppose that the arrival rate of buses quadrupled, i.e, the mean interarrival time decreased to 30
minutes. Would the facility be able to handle it ?