Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 21

Notes on Introduction to Modelling and Simulation

What is a Model?

A model is anything that could be used to represent a real life system.

What can be modelled?

Example of different systems that could be modelled include:

1) A manufacturing plant with machines, people, transport devices, conveyor belts and storage space.

2) A bank or other personal-service operation, with different kinds of customers, servers, and facilities
like teller windows, automated teller machines (ATMs), loan desks, and safety deposit boxes.

3) A distribution network of plants, warehouses and transportation links.

4) An emergency facility in a hospital, including personnel, rooms, equipment, supplies and patient
transports.

5) A freeway system of road segments, interchanges, controls and traffic.

6) A central insurance claims office where a lot of paperwork is received, reviewed, copied, filed and
mailed by people and machines.

7) A criminal justice system of courts, judges, support staff, probation officers, parole agents,
defendants, plaintiffs, convicted offenders, and schedules.

8) A fast-food restaurant with workers of different types, customers, equipment and supplies.

9) A supermarket with inventory control, checkout and customer service.

10) A theme park with rides, stores, restaurants, workers, guests and parking lots

11) The response of an emergency personnel to the occurrence of a catastrophic event.

Types of models

1) Physical model: this is a smaller or larger physical copy of a real life system. Example: building of
miniaturised machine prototypes, table-top models of material handling systems, physical flight
simulators for training pilots, and simulated control rooms to train operators for nuclear power plants.

2) Logical or mathematical model: such a model is a set of approximations and assumptions, both
structural and quantitative; about the way a system does or will work.
What is Simulation?

Simulation refers to a broad collection of methods and applications to mimic the behaviour of real
systems, usually on a computer with appropriate software. These days, simulation is more popular and
powerful than ever since computers and software packages are better than ever.

Types of Simulation

1) Static and dynamic simulations: A static simulation model, sometimes called Monte
Carlo simulation, represents a system at particular point in time. A dynamic simulation model
represents systems as they change over time.

2) Discrete and Continuous simulations: In a discrete simulation model, the state variables change
only at a countable number of points in time. These points in time are the ones at which the event
occurs/change in state. In a continuous simulation model, the state variables change in a
continuous way, and not abruptly from one state to another (infinite number of states).

3) Deterministic and Stochastic Simulation models: in deterministic simulation models, the output of
the model is fully determined by the parameter values and the initial conditions initial conditions. In
stochastic simulation, models possess some inherent randomness. The same set of parameter values
and initial conditions will lead to an ensemble of different outputs.

Advantages of Simulation

1) Test ideas - make better decisions. Easy to compare alternatives


2) Accurately predict performance.
3) Control experimental conditions
4) Can study system with a very long time frame
5) Eliminate risk and uncertainties.
6) Discover hidden value.
7) Avoid/eliminate unnecessary costs.
8) Validate process improvement (lean, 6σ)
9) Deliver exceptional customer service.

Disadvantages and Pitfalls of Simulation

1) Stochastic simulations produce only estimates.


2) Simulation models can be expensive to develop
3) Simulations usually produce large volumes of output – need to summarize, statistically analyze
appropriately
4) Failure to identify objectives clearly up front
5) In appropriate level of detail (both ways)
6) Inadequate design and analysis of simulation experiments

7) Not fully accounting for variability.


8) Failure to verify/validate the model.
9) Incorrectly interpreting random results.
10) Decision makers not believing the results.
11) Untimely results.
12) Results are descriptive – not prescriptive

Steps in averting pitfalls associated with Simulations

1) Define the objective of the study.


2) Understand the system.
3) Determine the modeling scope and level of detail.
4) Data collection
5) Build the model (iterative).
6) Verify the model logic and data.
7) Validate the results.
8) Design and execute experiments.
9) Analyze and interpret the results.
10) Document and present the results.

How Simulations are done

Simulations can be carried out by hand (i.e. the first approach of conducting simulations) or using the
computer system (i.e. the latest method).

Carrying out simulation by hand is a very tedious exercise especially if you want to simulate the
behaviour and performance of a process for thousands of hours or years. However, in this class, the
concept of hand simulation will be used to understand the scientific reasoning behind the simulation
of a process carried out using a computer system as well understand how to interprete simulation
results.

Pieces of a Simulation Model

1) Entities-most simulation involve “players” that move around, change status, affect and affected by
other entities and the state of the system, and affect the output performance measures.
2) Attributes-to individualize entities attributes are attached. Eg. Color, due date, priority etc.
3) Variables-a piece of information that reflects some characteristic of a system regardless of the
number and types of entities eg. Number in queue, number of busy servers etc.
4) Resources-entities often compete with each other for service from resources that represent things
like personnel, or equipment. An entity seizes a resource when available and releases it when finished.
5) Queues-this happens when an entity can’t move, so resources are not available it has to wait.

6) Statistical accumulators
 number of parts produced(P),
 sum of queue times that has been observed so far(∑WQ),
 number of parts that has passed through the queue(N),
 maximum time in queue so far(WQ*),
 the sum of the total times in system that have been observed so far(∑TS),
 the maximum total time in system so far(TS*), the area under the Q(t) curve so far(∫Q),
 the maximum value of Q(t) so far(Q*),
 the area under the B(t) curve so far(∫B)
 Simulation clock
 Starting and stopping

KPI’s of the Simulated Model Results

1) Average Wait?
2) Maximum Wait?
3) Average Queue?
4) Maximum Queue?
5) Server Utilization?

Fundamental Concepts of Simulation

In this section, we will describe a system to be modelled and simulated as an example and thereafter
decide what we’d like to know about its’ behaviour and performance.

Since a lot of simulation models involve waiting lines or queues as building blicks, we will start with
a very simple case of such a model representing a portion of a manufacturing facility. “Blank” parts
arrived at a drilling center, are processed by a single drill press, and then leave (see the figure below)

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) queue. The table below shows the arrival time and the
service time of each blank part for the first 10 parts to be serviced.
Case 1: Table: Arrival and Service Times of Parts (in Minutes)
Part Number Arrival Time Service Time Cumulative Service Time
1 0.00 2.90 2.90
2 1.73 1.76 4.66
3 3.08 3.39 8.05
4 3.79 4.52 12.57
5 4.41 4.46 17.03
6 18.69 4.36 21.39
7 19.39 2.07
8 34.91 3.36
9 38.06 2.37
10 39.82 5.38

As a system analyst:

1) Simulate the behaviour and performance of this system by hand for a period of 20 minutes

2) Draw the busy-time and queue-time graphs for this system.

3) Discuss the simulated results of this system.

Case 2: Assume that the drill press machine is unavailable from 8:10 to 10:60, answer the
aforementioned questions.

Case 3: Using the new table below, answer the aforementioned questions.
Part Number Arrival Time Service Time Departure Time
1 3.00 2.90 5.90
2 4.73 4.76 10.66
3 6.08 3.39 14.05
4 8.79 4.52 18.57
5 10.41 4.46 23.03
6 18.69 4.36
7 19.39 2.07
8 34.91 3.36
9 38.06 2.37
10 39.82 5.38
Formula to be used for calculating some of the KPIs for hand simulation

Current ∑ WQ = (Present Time - Time at which a part start waiting) + Previous ∑ WQ


Current WQ* = Current ∑ WQ - Previous ∑ WQ , if Current WQ* is greater than previous WQ*, otherwise Current
WQ* = Previous WQ*

∑ TS = Current Time + Previous ∑ WQ


Current TS* = Current ∑ TS - Previous ∑ TS , if Current TS* is greater than previous TS*, otherwise Current TS* =
Previous TS*

Current ∫ Q = (Present Time – Previous Time) × previous Q(t) + Previous ∫ Q


Note that ∑ WQ , WQ*, ∑ TS , and TS* values only changes when the discrete event is a departure event. If the event is
an arrival event, then the value of these parameters remains the same.
Hand Simulation Solution for Case 1

Just finished Event Attributes Statistical Accumulators Event Calendar

Arrival Times

Entity No. Time t Event Q(t) B(t) In In P N ∑WQ WQ* ∑TS TS* ∫Q Q* ∫B [Entity Time Type]
Type Queue Service No.

(-) 0.00 Initiate 0 0 - - 0 0 0 0 0 0 0 0 0 1 0.00 Arrive


2 1.73 Arrive
- 20 End

1 0.00 Arrive 0 1 () (0.00) 0 1 0 0 0 0 0 0 0 2 1.73 Arrive


1 2.90 Dep
- 20 End

2 1.73 Arrive 1 1 (1.73) (0.00) 0 1 0 0 0 0 0 1 1.73 1 2.90 Dep


3 3.08 Arrive
- 20 End

1 2.90 Dep 0 1 () (1.73) 1 2 1.17 1.17 2.90 2.90 1.17 1 2.90 3 3.08 Arrive
4 3.79 Arrive
- 20 End

3 3.08 Arrive 1 1 (3.08) (1.73) 1 2 1.17 1.17 2.90 2.90 1.17 1 3.08 4 3.79 Arrive
5 4.41 Arrive
- 20 End

4 3.79 Arrive 2 1 (3.08) (1.73) 1 2 1.17 1.17 2.90 2.90 1.88 2 3.79 5 4.41 Arrive
(3.79) 2 4.66 Depart
- 20 End

5 4.41 Arrive 3 1 (3.08) (1.73) 1 2 1.17 1.17 2.90 2.90 3.12 3 4.41 2 4.66 Depart
(3.79) 3 8.05 Depart
(4.41) - 20 End

2 4.66 Dep 2 1 (3.79) (3.08) 2 3 2.75 1.58 5.83 2.93 3.87 3 4.66 3 8.05 Dep
(4.41) 4 12.57 Dep
- 20 End

3 8.05 Dep 1 1 (4.41) (3.79) 3 4 7.01 4.26 10.80 4.97 10.6 3 8.05 4 12.57 Dep
5 5 17.03 Dep
- 20 End

4 12.57 Dep 0 1 () (4.41) 4 5 15.17 8.16 19.58 8.78 15.1 3 12.57 5 17.03 Dep
7 6 18.69 Arrive
- 20 End

5 17.03 Dep 0 0 () () 5 5 15.17 8.16 32.2 12.6 15.1 3 17.03 6 18.69 Arrive
7 7 19.39 Arrive
- 20 End

6 18.69 Arrive 0 1 () (18.69) 5 6 15.17 8.16 32.2 12.6 15.1 3 17.03 7 19.39 Arrive
7 - 20 End

7 19.39 Arrive 1 1 (19.39) (18.69) 5 6 15.17 8.16 32.2 12.6 15.1 3 17.73 - 20 End
7

- 20 End `1 1 (19.39) (18.69) 5 6 15.17 8.16 32.2 12.6 15.7 3 18.34 - - Simulation
8 Ended

Average waiting time in queue =


∑ WQ = 15.17 minutes = 2.53 minutes/ part
N 6 parts
∫Q 15.78
Time average number in queue = = = 0.79 part
Final clock time 20
∫B
Utilization of the drill press = × 100%
Final clock time
18.34
= × 100% = 0.92 = 92%
20
Based on these aforementioned results, it could be deduced that a part averagely waited for a period of 2.53 minutes before it was serviced by the drill
press and the drill press utilization rate for the entire period of 20 minutes is 92%.

Queue-Time Graph Busy-Time Graph

Queue
Length
Hand Simulation Solution for Case 2

Just finished Event Attributes Statistical Accumulators Event Calendar

Arrival Times

Entity No. Time t Event Q(t) B(t) In In P N ∑WQ WQ* ∑TS TS* ∫Q Q* ∫B [Entity Time Type]
Type Queue Service No.

(-) 0.00 Initiate 0 0 - - 0 0 0 0 0 0 0 0 0 1 0.00 Arrive


2 1.73 Arrive
- 20 End

1 0.00 Arrive 0 1 () (0.00) 0 1 0 0 0 0 0 0 0 2 1.73 Arrive


1 2.90 Dep
- 20 End

2 1.73 Arrive 1 1 (1.73) (0.00) 0 1 0 0 0 0 0 1 1.73 1 2.90 Dep


3 3.08 Arrive
- 20 End

1 2.90 Dep 0 1 (1.73) 1 2 1.17 1.17 2.90 2.90 1.17 1 2.90 3 3.08 Arrive
4 3.79 Arrive
- 20 End

3 3.08 Arrive 1 1 (3.08) (1.73) 1 2 1.17 1.17 2.90 2.90 1.17 1 3.08 4 3.79 Arrive
5 4.41 Arrive
- 20 End

4 3.79 Arrive 2 1 (3.08) (1.73) 1 2 1.17 1.17 2.90 2.90 1.88 2 3.79 5 4.41 Arrive
(3.79) 2 4.66 Depart
- 20 End
5 4.41 Arrive 3 1 (3.08) (1.73) 1 2 1.17 1.17 2.90 2.90 3.12 3 4.41 2 4.66 Depart
(3.79) 3 8.05 Depart
(4.41) - 20 End

2 4.66 Dep 2 1 (3.79) (3.08) 2 3 2.75 1.58 5.83 2.93 3.87 3 4.66 3 8.05 Dep
(4.41) 4 15.12 Dep
- 20 End

3 8.05 Dep 2 0 (3.79) () 3 4 7.01 4.26 10.80 4.97 10.6 3 8.5 - 8.05 to Server Idle
(4.41) 5 10.60
- 10.60 Server
Initiate
- 20
End

- 8.05 Server 2 0 (3.79) () 3 4 7.01 4.26 10.80 4.97 15.7 3 8.5 - 10.60 Server
to Idle (4.41) 5 Initiated
10.60 4 15.12 Dep
- 20 End

- 10.60 Server 1 1 (4.41) (3.79) 3 4 7.01 4.26 10.80 4.97 15.7 3 8.5 4 15.12 Dep
Initiate 5 6 18.69 Arr
d - 20 End

4 15.12 Dep 0 1 () (4.41) 4 5 17.72 10.7 22.13 11.3 20.2 3 13.02 6 18.69 Arr
1 3 7 7 19.39 Arr
- 20 End

6 18.69 Arrive 1 1 (18.69) (4.41) 4 5 17.72 10.7 22.13 11.3 20.2 3 16.59 7 19.39 Arr
1 3 7 5 19.58 Dep
- 20 End

7 19.39 Arrive 2 1 (18.69) (4.41) 4 5 17.72 10.7 22.13 11.3 20.9 3 17.29 5 19.58 Arr
(19.39) 1 3 7
- 20 End
5 19.58 Dep 1 1 (19.39) (18.69) 5 6 17.72 10.7 37.30 15.1 21.3 3 17.48 - 20 End
1 7 5

- 20 End `1 1 (19.39) (18.69) 5 6 17.72 10.7 37.30 15.1 21.7 3 17.70 - - Simulation
1 7 7 Ended

Average waiting time in queue =


∑ WQ = 17.72minutes = 2.95 minutes/ part
N 6 parts

∫Q 21.77
Time average number in queue = = = 1.09 part
Final clock time 20
∫B
Utilization of the cashier = × 100%
Final clock time
17.70
= × 100% = 0.885 = 88.5%
20
Based on these aforementioned results, it could be deduced that a part averagely waited for a period of 2.95 minutes before it was serviced by the drill
press and the drill press utilization rate for the entire period of 20 minutes is 88.5%.
Hand Simulation Solution for Case 3

Just finished Event Attributes Statistical Accumulators Event Calendar

Arrival Times

Entity No. Time t Event Q(t) B(t) In In P N ∑WQ WQ* ∑TS TS* ∫Q Q* ∫B [Entity Time Type]
Type Queue Service No.

(-) 0.00 Initiate 0 0 - - 0 0 0 0 0 0 0 0 0 1 3.00 Arrive


2 4.73 Arrive
- 20 End

1 3.00 Arrive 0 1 () (3.00) 0 1 0 0 0 0 0 0 0 2 4.73 Arrive


1 5.90 Dep
- 20 End

2 4.73 Arrive 1 1 (4.73) (3.00) 0 1 0 0 0 0 0 1 1.73 1 5.90 Dep


3 6.08 Arrive
- 20 End

1 5.90 Dep 0 1 () (4.73) 1 2 1.17 1.17 5.90 5.90 1.17 1 2.90 3 6.08 Arrive
4 8.79 Arrive
- 20 End

3 6.08 Arrive 1 1 (6.08) (4.73) 1 2 1.17 1.17 5.90 5.90 1.17 1 3.08 4 8.79 Arrive
5 10.41 Arrive
- 20 End
4 8.79 Arrive 2 1 (6.08) (4.73) 1 2 1.17 1.17 5.90 5.90 3.88 2 5.79 5 10.41 Arrive
(8.79) 2 10.66 Depart
- 20 End

5 10.41 Arrive 3 1 (6.08) (4.73) 1 2 1.17 1.17 5.90 5.90 7.12 3 7.41 2 10.66 Depart
(8.79) 3 14.05 Depart
(10.41) - 20 End

2 10.66 Dep 2 1 (8.79) (6.08) 2 3 5.75 4.58 11.83 5.93 7.87 3 7.66 3 14.05 Dep
(10.41) 4 18.57 Dep
- 20 End

3 14.05 Dep 1 1 (10.41) (8.79) 3 4 11.01 5.26 19.80 7.97 14.6 3 9.05 4 18.57 Dep
5 6 18.69 Arrive
- 20 End

4 18.57 Dep 0 0 () (10.41) 3 4 19.17 8.16 29.58 9.78 19.1 3 15.57 6 18.69 Arrive
7 7 19.39 Arrive
4 15.12 End
- 20

6 18.69 Arrive 0 1 () (18.69) 3 4 19.17 8.16 29.58 9.78 19.1 3 15.69 7 19.39 Arrive
7
- 20 End

7 19.39 Arrive 1 1 (19.39) (18.69) 4 5 19.17 8.16 29.58 9.78 19.1 3 16.39
7 - 20 End

- 20 End `1 1 (19.39) (18.69) 4 5 19.17 8.16 29.58 9.78 19.7 3 17.00 - - Simulation
8 Ended
Average waiting time in queue =
∑ WQ = 19.17 minutes = 3.83 minutes/ part
N 5 parts

∫Q 19.78
Time average number in queue = = = 0.99 part
Final clock time 20
∫B
Utilization of the cashier = × 100%
Final clock time
17.00
= × 100% = 0.85 = 85%
20
Based on these aforementioned results, it could be deduced that a part averagely waited for a period of 3.83 minutes before it was serviced by the drill
press and the drill press utilization rate for the entire period of 20 minutes is 85%.
Tutorial Questions
Question 1

Entity Arrival Time (minutes) Service Time (minutes)


A 0.00 1.45
B 1.63 1.66
C 2.98 3.29
D 3.69 4.42
E 4.31 4.36
F 18.59 4.26
G 19.29 1.97

Other Questions

a) Briefly discuss the key results of your hand simulation as a good system analyst.

b) Draw all persistent curves (busy-time graph and queue-time graph) for the server operation
behaviour.

c) As a system analyzer and business optimizer, propose any two (2) suitable strategies that could be
used to increase the throughput of these systems for questions 1 and 2.

Question 2

The following table shows the arrival and service times of the entities in a single server system that
starts at time 0.00 with no entities present in the server being on idle state. However, between 7:00
and 10:00, the server will be idle and will thereafter be back to work after this time. Run this
simulation by hand for a period of 20 minutes.

Entity Arrival Time (minutes) Service Time (minutes)


A 0.00 1.45
B 1.63 1.66
C 2.98 3.29
D 3.69 4.42
E 4.31 4.36
F 18.59 4.26
G 19.29 1.97

Other Questions
a) Briefly discuss the key results of your hand simulation as a good system analyst.
b) Draw all persistent curves (busy-time graph and queue-time graph) for the server operation
behaviour.
c) As a system analyzer and business optimizer, propose any two (2) suitable strategies that could be
used to increase the throughput of these systems for questions 1 and 2.

Question 3

The following table shows the arrival and service times of the entities in a single server system that
starts at time 0.00 with no entities present in the server being on idle state. Run this simulation by
hand for a period of 20 minutes.

Entity Arrival Time (minutes) Service Time (minutes)


A 2.80 1.45
B 3.93 1.66
C 4.98 3.29
D 5.69 4.42
E 7.31 4.36
F 18.59 4.26
G 19.29 1.97

Other Questions
a) Briefly discuss the key results of your hand simulation as a good system analyst.

b) Draw all persistent curves (busy-time graph and queue-time graph) for the server operation
behaviour.
c) As a system analyzer and business optimizer, propose any two (2) suitable strategies that could be
used to increase the throughput of these systems for questions 1 and 2.

Question 4
Please note that the machine is unavailable between 8.05 and 13.00.

a) Use the annexure table to run the simulation of these systems by hand for a period of a period of 30
minutes.
b) Briefly discuss the key results of your hand simulation as a good system analyst.

c) Draw all persistent curves (busy-time graph and queue-time graph) for the robot system operation
behaviour.
d) As a system analyzer and business optimizer, propose any two (2) suitable strategies that could be
used to increase the throughput of these systems for questions 1 and 2.

You might also like