Simulation Slides
Simulation Slides
Industrial Engineering
Simulation
What is simulation?
• Simulation is the imitation of a real world process or a system.
• It is used to gain insight into the functioning of the natural or human made
systems.
Parts Finished
Arrive Parts Depart
Machine
(Server)
Arriving Departing
7 6 5 4
Blank Parts Finished Parts
Queue (FIFO) Part in Service
Simulation algorithm
• How do you define the STATE of the system?
• An instantaneous occurrence that may change the state of the system is
called an event.
• What events can you identify for the simple processing system?
Machine
(Server)
Arriving Departing
7 6 5 4
Blank Parts Finished Parts
Queue (FIFO) Part in Service
Simulation algorithm
Here is how things go for an Arrival event:
1. Schedule the next part to arrive next.
2. If the machine is idle:
a. put the part in service
b. make the machine busy,
c. schedule the part’s departure.
If the machine is already busy:
a. put the part in queue.
b. update queue length.
Simulation algorithm
Here is how things go for a Departure event:
1. If the queue is empty:
a. make the machine idle,
If the queue is not empty:
a. take the first one out
b. begin its service at the machine
c. schedule its departure
Simulation algorithm
• Let’s execute this algorithm by hand for 9 hours for the simple
processing plant assuming the following interarrival and service times
1 2 3 4 5 6 7 8 9 10
Time :0
Event:Arrival
1 2 3 4 5 6 7 8 9 10
Time :0
Event:Arrival
Do: Schedule the next arrival
1 2 3 4 5 6 7 8 9 10
Time :0
Event:Arrival
Do: Make the machine busy, schedule the
next departure, update the graph and jump
to the earliest time epoch in the schedule
1 2 3 4 5 6 7 8 9 10
Time :1.5
Event:Arrival
Do: Schedule the next arrival, update the
graph, and jump to the earliest time epoch
in the schedule
1 2 3 4 5 6 7 8 9 10
Time :2.5
Event:Departure
Do: Schedule the next departure, update
the graph, and jump to the earliest time
epoch in the schedule
1 2 3 4 5 6 7 8 9 10
Time :2.5
Event:Departure
Do: Schedule the next departure, update
the graph, and jump to the earliest time
epoch in the schedule
1 2 3 4 5 6 7 8 9 10
Time :3.5
Event:Arrival
Do: Schedule the next arrival, update the
graph, and jump to the earliest time epoch
in the schedule
1 2 3 4 5 6 7 8 9 10
Time :3.5
Event:Arrival
Do: Schedule the next arrival, update the
graph, and jump to the earliest time epoch
in the schedule
1 2 3 4 5 6 7 8 9 10
Time :4.0
Event:Departure
Do: Schedule the next departure, update
the graph, and jump to the earliest time
epoch in the schedule
1 2 3 4 5 6 7 8 9 10
Time :4.0
Event:Departure
Do: Schedule the next departure, update
the graph, and jump to the earliest time
epoch in the schedule
1 2 3 4 5 6 7 8 9 10
Time :4.5
Event:Arrival
Do: Schedule the next arrival, update the
graph, and jump to the earliest time epoch
in the schedule
1 2 3 4 5 6 7 8 9 10
Time :4.5
Event:Arrival
Do: Schedule the next arrival, update the
graph, and jump to the earliest time epoch
in the schedule
1 2 3 4 5 6 7 8 9 10
Time :5.0
Event:Arrival
Do: Schedule the next arrival, update the
graph, and jump to the earliest time epoch
in the schedule
1 2 3 4 5 6 7 8 9 10
Time :5.0
Event:Arrival
Do: Schedule the next arrival, update the
graph, and jump to the earliest time epoch
in the schedule
1 2 3 4 5 6 7 8 9 10
Time :7.0
Event:Departure
Do: Schedule the next departure, update
the graph, and jump to the earliest time
epoch in the schedule
1 2 3 4 5 6 7 8 9 10
Time :7.0
Event:Departure
Do: Schedule the next departure, update
the graph, and jump to the earliest time
epoch in the schedule
1 2 3 4 5 6 7 8 9 10
Time :7.5
Event:Arrival
Do: Schedule the next arrival, update the
graph, and jump to the earliest time epoch
in the schedule
1 2 3 4 5 6 7 8 9 10
Time :7.5
Event:Arrival
Do: Schedule the next arrival, update the
graph, and jump to the earliest time epoch
in the schedule
1 2 3 4 5 6 7 8 9 10
Time :9.0
Event:END
Do: STOP and calculate average number in
the system
1 2 3 4 5 6 7 8 9 10
• Looking at the graph, how do you calculate average number of parts
in the system?