SlideShare a Scribd company logo
UNIT 3:DISCRETE EVENT
SIMULATION
 The basic building blocks of all discrete-event simulation
models: entities and attributes, activities and events.
 A system is modeled in terms of
 o Its state at each point in time
 oThe entities that pass through the system and the entities
that represent system resources
 oThe activities and events that cause system state to
change.
 Discrete-event models are appropriate for those systems
for which changes in system state occur only at discrete
points in time.
 DES deals with dynamic, stochastic systems (i.e., involving
time and containing random elements) which change in a
discrete manner.
 components of discrete event Simulation
1. System: A collection of entities (e.g., people and machines) that together over time
to accomplish one or more goals.
2. Model: An abstract representation of a system, usually containing structural, logical,
or mathematical relationships which describe a system in terms of state, entities and
their attributes, sets, processes, events, activities, and delays.
3. System state: A collection of variables that contain all the information necessary to
describe the system at any time.
4. Entity: Any object or component in the system which requires explicit representation
in the model (e.g., a server, a customer, a machine).
5. Attributes: The properties of a given entity (e.g., the priority of a v customer, the
routing of a job through a job shop).
6. List: A collection of (permanently or temporarily) associated entities ordered in some
logical fashion (such as all customers currently in a waiting line, ordered by first come,
first served, or by priority).
7. Event: An instantaneous occurrence that changes the state of a system (as an arrival
of a new customer).
8. Event notice: A record of an event to occur at the current or
some future time, along with any associated data necessary to
execute the event; at a minimum, the record includes the event
type and the event time.
9. Event list: A list of event notices for future events, ordered by
time of occurrence; also known as the future event list (FEL).
10. Activity: A duration of time of specified length (e.g., a service
time or arrival time), which is known when it begins (although it
may be defined in terms of a statistical distribution).
11. Delay: A duration of time of unspecified indefinite length,
which is not known until it ends(e.g., a customer's delay in a last-
in, first-out waiting line which, when it begins, depends on future
arrivals).
12. Clock: A variable representing simulated time.
Simulation of Queueing Systems
 Simulation is often used in the analysis of queueing models.
 A simple but typical queueing model
 Queueing models provide the analyst with a powerful tool
for designing and evaluating the performance of queueing
systems.
 Typical measures of system performance, Server
utilization, length of waiting lines, and delays of customers.
 For relatively simple systems: compute mathematically
 For realistic models of complex systems: simulation is
usually required
 A queueing system is described by
 Calling population
 Arrival rate
 Service mechanism
 System capacity
 Queueing discipline
Calling population
 Calling population: the population of potential
customers, may be assumed to be finite or
infinite.
 Finite population model: if arrival rate depends
on the number of customers being served and
waiting, e.g., model of corporate jet, if it is being
repaired, the repair arrival rate becomes zero.
 Infinite population model: if arrival rate is not
affected by the number of customers being
served and waiting, e.g., systems with large
population of potential customers.
System Capacity
 System Capacity: A limit on the number of
customers that may be in the waiting line or
system.
 Limited capacity, e.g., an automatic car wash
only has room for 10,cars to wait in line to enter
the mechanism.
 If system is full no customers are accepted
anymore
 Unlimited capacity, e.g., concert ticket sales with
no limit on the
 number of people allowed to wait to purchase
tickets.
Arrival Process
 For infinite-population models:
 • In terms of interarrival times of successive customers.
 • Arrival types:
 Random arrivals: interarrival times usually characterized by
a probability distribution.
 Scheduled arrivals: interarrival times can be constant or
constant plus or minus a small random amount to represent
early or late arrivals.
 • Example: patients to a physician or scheduled airline flight
arrivals to an airport
 At least one customer is assumed to always be present,so
the server is never idle, e.g., sufficient raw material for a
machine.
Queue Behavior and Queue
Discipline
 Queue behavior: the actions of customers while in a queue
waiting for service to begin, for example: leave when they
see that the line is too long, leave after being in the line
when its moving too slowly , move from one line to a
shorter line
 Queue discipline: the logical ordering of customers in a
queue that determines which customer is chosen for
service when a server becomes free, for example:
 • First-in-first-out (FIFO)
 • Last-in-first-out (LIFO)
 • Service in random order (SIRO)
 • Shortest processing time first (SPT)
 • Service according to priority (PR)
Service Times and Service
Mechanism
 Service times of successive arrivals are
denoted by S1, S2, S3.
 May be constant or random.
 A queueing system consists of a number of
service centers and interconnected queues.
 • Each service center consists of some
number of servers (c) working in parallel,
upon getting to the head of the line, a
customer takes the 1st available server.
Simulation of Queueing Systems
 Single server queue
 • Calling population is infinite
 Arrival rate does not change
 • Units are served according FIFO
 • Arrivals are defined by the
 distribution of the time between
 arrivalsA inter-arrival time
 • Service times are according to a
 distribution
 • Arrival rate must be less than
 service rate A stable system
 • Otherwise waiting line will grow
 unbounded A unstable system
Simulation of Queueing Systems
 Arrival Event
• If server idle unit gets
service, otherwise unit
enters queue.
 Departure Event
• If queue is not empty
begin servicing next unit,
otherwise server will be
idle.
Simulation of Queuing Systems
 A sample of 100 arrivals of a customer at a retail sales depot which has
single queue is according to following distribution
Time between
arrival(min)
0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Frequency 2 6 10 25 20 14 10 7 4 2
A study of time required to service customers by adding up the bills,receiving
payments and placing packages yields the following
ServiceTime 0.5 1.0 1.5 2.0 2.5 3.0
Frequency 12 21 36 19 7 5
Consider the Arrival of first customer at time 4.Estimate the average waiting
time of customer and average idle time of server by simulation for next 10
arrivals.Consider the following random numbers
93,22,53,64,39,07,10,63,76,35.
 Step 1: Generate Tag values for inter arrival time
Time between
arrival
Frequency Probability Cumulative
probability
Tag values
0.5 2 2/100=0.02 0.02 00-01
1.0 6 0.06 0.08 02-07
1.5 10 0.10 0.18 08-17
2.0 25 0.25 0.43 18-42
2.5 20 0.20 0.63 43-62
3.0 14 0.14 0.77 63-76
3.5 10 0.10 0.87 77-86
4.0 7 0.07 0.94 87-93
4.5 4 0.04 0.98 94-97
5.0 2 0.02 1.00 98-99
Total=100
Step 2: tag values for service time
Service time frequency Probability Cumulative
probability
Tag values
0.5 12 12/100=0.12 0.12 00-11
1.0 21 0.21 0.33 12-32
1.5 36 0.36 0.69 33-68
2.0 19 0.19 0.88 69-87
2.5 7 0.07 0.95 88-94
3.0 5 0.05 1.00 95-99
Total=100
 Step 3: simulation, assumption server is available from time 0,since the
arrival of first customer is specified in the problem, it starts at 4 else, always
it is assumed first customer arrives at time 0.
Customer
num
Random
num
Inter
arrival
time
Arrival
time(AT)
Service
time(ST)
Service time Waiting time of
(WT)customer
Idle time
of server
begin end
1 93 4.0 4.0 2.5 4 6.5(4
+2.5)
- 4
2 22 2.0 6.0 1.0 6.5 7.5 0.5(6.5-6.0) -
3 53 2.5 8.5 1.5 8.5 10.0 - 1
4 64 3.0 11.5 1.5 11.5 13 - 1.5
5 39 2.0 13.5 1.5 13.5 15 - 0.5
6 07 1.0 14.5 0.5 15 15.5 0.5 -
7 10 1.5 16 0.5 16 16.5 - 0.5
8 63 3.0 19 1.5 19 20.5 - 2.5
9 76 3.0 22 2.0 22 24 - 1.5
10 35 2.0 24 1.5 24 25.5 - -
 Idle time of server= service begin time next customer-service end time of previous
customer
 service start time=max(arrival time, end time of previous customer)
 waiting time of customer=|arrival time-service time beginning|
 avgWaitingTime=1/10=0.10
 average idle time of server=11.5/10
 An airport entry has only one checkin counter,customers arrive at this
counter at random from 1 to 6 min,each interarrival time has same
probability of occurance.The probability for service time is given below.
Service
time(ST)
1 2 3 4 5 6
Probabili
ty
0.10 0.20 0.25 0.30 0.10 0.05
Develop a simulation table for 10 customers.Consider the random
number for inter arrival time(IAT) as 13,27,15,48,9,22,53,35,2 and RN
for ST as 84,10,74,53,17,91,79,67,38,89.
1.Calculate avg ST, avg time between arrival, waiting time of customer,
avg time spent by customer in system,avg waiting time of customers
those who wait.
 step 1:tag values for service time
Service time probability Cumulative probability Tag values
1 0.10 0.10 00-09
2 0.20 0.30 10-29
3 0.25 0.55 30-54
4 0.30 0.85 55-84
5 0.10 0.95 85-94
6 0.05 1.00 95-99
Step 2: tag values for IAT, equal probability of occurance[out of 6 option any one
can occur, 1/6=0.166666667=0.17(approx.)]
Inter arrival time probability Cumulative probability Tag values
1 1/6=0.17 0.17 00-16
2 0.17 0.34 17-33
3 0.17 0.51 34-50
4 0.17 0.68 51-67
5 0.17 0.85 68-84
6 0.17 1.00 85-99
 Simulation for 10 customers
Customer
no
RN for
IAT
IAT AT RN for
ST
Service
time
Service time WT for
customer
Time spent
by customer
in system
begin end
1 - - 0 84 4 0 4 - (4-0)=4
2 13 1 1 10 2 4 6 (4-1)=3 (6-1)=5
3 27 2 3 74 4 6 10 (6-3)=3 (10-3)=7
4 15 1 4 53 3 10 13 6 (13-4)=9
5 48 3 7 17 2 13 15 6 (15-7)=8
6 9 1 8 91 5 15 20 7 (20-8)=12
7 22 2 10 79 4 20 24 10 (24-10)=14
8 53 4 14 67 4 24 28 10 (28-14)=14
9 35 3 17 38 3 28 31 11 (31-17)=14
10 2 1 18 89 5 31 36 13 (36-18)=18
Total=18 Total=36 Total=69 Total=105
 Time spent by customer in the system=
(service end time-arrival time)
 Avg waiting time=totalWT/total
customers=69/10=6.9min
 Avg time spent by the customer in the
system=105/10=10.5
 Avg service time=36/10=3.6≈4min
 Avg time between arrival=18/10=1.8≈2min
 Avg waiting time of customers those who
wait=69/9=7.66=total waiting time of
customers/number of customers waiting
 A Grocery store has only one checkout counter counter,customers arrive at
this counter at random from 1 to 8 min,each interarrival time has same
probability of occurance.The probability for service time is given below
Service
time(ST)
1 2 3 4 5 6
probability 0.10 0.20 0.30 0.25 0.10 0.05
Simulate the arrival for 10 customers. Consider the random number for
inter arrival time(IAT) as 913,727,015,948,309,922,753,235,302 and RN for
ST as 84,10,74,53,17,91,79,67,89,38.
1.Calculate avg WT, avg ST,avg time between arrival, avg time spent by
customer in queue, avg waiting time of customers those who wait.
 Step1: Generate tag vales for service time
 ,
Service time(ST) probabilit
y
Cumulative
probability
Tag values
1 0.10 0.10 00-09
2 0.20 0.30 10-29
3 0.30 0.60 30-59
4 0.25 0.85 60-84
5 0.10 0.95 85-94
6 0.05 1.00 95-99
Step 2: Generate tag values for IAT, Given that P=1/8=0.125
Inter arrival time probability Cumulative probability Tag values
1 0.125 0.125 000-124
2 0.125 0.250 125-249
3 0.125 0.375 250-374
4 0.125 0.500 375-499
5 0.125 0.625 500-624
6 0.125 0.750 625-749
7 0.125 0.875 750-874
8 0.125 1.000 875-999
 Step 3:simulation for 10 customers
Customer
no
RN for
IAT
IAT AT RN for
ST
ST Service time Time in
Queue
Time spent
in system
Idle time
for server
Begin End
1 - - 0 84 4 0 4 - (4-0)=4 -
2 913 8 8 10 2 8 10 - (10-8)=2 (8-4)=4
3 727 6 14 74 4 14 18 - 4 (14-10)=4
4 15 1 15 53 3 18 21 (18-15)=3 6 -
5 948 8 23 17 2 23 25 - 2 2
6 309 3 26 91 5 26 31 - 5 1
7 922 8 34 79 4 34 38 - 4 3
8 753 7 41 67 4 41 45 - 4 3
9 235 2 43 89 5 45 50 (45-43)=2 7 -
10 302 3 46 38 3 50 53 (50-
46)=4
7 -
Total 46 36 9 45 17
 Avg ST=36/10=3.6min
 Avg time between arrival=46/10=4.6 min
 Avg time spent by customer in the
queue(WT)=9/10=0.9min
 Avg time spent by customer in the
system=45/10=4.5min
 Avg idle time of server=17/10
 Avg waiting time of those who wait=9/3=3min
 Consider a store with one checkout
counter.prepare a simulation table and find
the avg waiting time of customers in
queue,avd idle time of server,avg service
time.consider the following data.
IAT 3 2 6 4 4 5 8 7
Sevice
time
4 5 5 8 4 6 2 3 4
Customer
no
IAT Arrival time ST Service time WT Idle time of
serv
er
Time spent
in
syst
em
Begin End
1 - 0 4 0 4 - - 4
2 3 3 5 4 9 1 - 6
3 2 5 5 9 14 4 - 9
4 6 11 8 14 22 3 - 11
5 4 15 4 22 26 7 - 11
6 4 19 6 26 32 7 - 13
7 5 24 2 32 34 8 - 10
8 8 32 3 34 37 2 - 5
9 7 39 4 39 43 - 2 4
41 Total=32 73
Since the inter arrival time and service time are specified in the problem,
simulation for 9 customers is given in the following table
Avg waiting time of those who wait=32/7=4.57
Avg service time=41/9=4.55
AvgWaitingTime=32/9
Idle time of server=2/9=0.22
Avg time spent in the system=73/9=8.1
The Event-Scheduling/Time-Advance Algorithm-
Introduction
 Event scheduling simulation is modeling over time of a system whose state
changes at discrete points in time.
 A discrete event simulation proceeds by producing a sequence of system
snapshots that represent the evolution of the system through time.A given
snapshot at a given time includes system state at time t and future event list
(FEL).
 The FEL contains all previously scheduled future events and their associated
event times. Events in FEL are arranged according to chronological order- that
is, the event times must satisfy t<=t1<=t2<=t3<=…tn.
 Time t is the value of CLOCK, the current value of simulated time.The event
associated with time t1 is called imminent event i.e t1 is the next event that will
occur.
 After the system snapshot at simulation time CLOCK=t has been updated , the
CLOCK is advanced to simulation time CLOCK=t1.
 The sequence of actions that a simulator must perform to advance the clock and
build a new system snapshot is called the event-scheduling/ time –advance
algorithm.
Future Event List
 All event notices are chronologically ordered in the FEL
 •At current time t, the FEL contains all scheduled events
 •The event times satisfy: t < t1 ≤ t2 ≤ t3 ≤ ... ≤ tn
 •The event associated with t1 is the imminent event, i.e.,
the next event to occur
 Scheduling of an event
 •At the beginning of an activity the duration is computed
and an end-of-activity event is placed on the future event
list
 •The content of the FEL is changing during simulation run .
 • Efficient management of the FEL has a major impact on
the performance of a simulation run
Event Scheduling/ time advance algorithm
 Step 1. Remove the event notice for the imminent
event (event , time t1) from FEL.
 Step 2. Advance CLOCK to imminent event time (i.e.
advance CLOCK from t tot1t1)
 Step 3. Execute imminent event: update system
state, change entity attributes, and set membership
as needed.
 Step 4. Generate future events (if necessary) and
place their event notice on FEL, ranked by event
time. (Example: Event 4 to occur at time t+,
where t2<t+<t3 )
 Step 5. Update cumulative statistics and counters.
 The model has the following components:
 System state (LQ (t), LS (t)), where LQ (t) is the number of
customers in the waiting line, and LS (t) is the number being
served (0 or 1) at time t.
 Entities: The server and customers are not explicitly modeled,
except in terms of the state variables above.
 Events
 Arrival(A)
 Departure(D)
 Stopping event (E), scheduled to occur at time tn.
 Event notices
 (A, t). Representing an arrival event to occur at future time t
 (D, t), representing a customer departure at future time t
 (E, tn), representing the simulation-stop event at future time 60
 Activities
 Interarrival time, Service time.
Initially LQ(t)=0,LS(t)=1
• Arrival: if LS(t)=1,then increment LQ(t) by 1,else LS(t)=1
• Departure: if LQ(t)>0,then decrement LQ(t) by 1,else LS(t)=0
• If both arrival and departure occurs simultaneously, keep LQ(t) and
LS(t) same as previous clock value.
 Consider a grocery store with one checkout
counter.The IAT between the customers and
service time is given in the table. Perform the
simulation until clock time is 23[stopping
time is 23],using event scheduling algorithm
find server utilization and max queue length.
Inter arrival time - 1 1 6 3 7 5 2
Service time 4 2 5 4 1 5 4 1
Inter arrival
time
Arrival time Service time Service time
Begin End=DT Departure
time
- 0 A1 4 0 4 4 D1
1 1 A2 2 4 6 6 D2
1 2 A3 5 6 11 11 D3
6 8 A4 4 11 15 15 D4
3 11 A5 1 15 16 16 D5
7 18 A6 5 18 23 23 D6
5 23 A7 4 23 27 27 D7
2 25 A8 1 27 28 28 d8
Step 1:Find the departure time using IAT and service time the given
Step 2: simulation for 8 customers, arrange clock variable in
chronological order of arrivals and departure, accordingly
specify the type of event .
Step 3:Fill the state variables LS(t) and LQ(t) according to
event scheduling algorithm, and calculate the cumulative
statistics.
Type of event clock LQ(t) LS(t) Future event list(FEL):
(A,t)(D,t)(E,tn)
Cumulative statistics
Server busy Max queue
length
illustartion
A1 0 0 1 (A2,1)(D1,4)(E,23) 0 0 C1
A2 1 1 1 (A3,2)(D1,4)(E,23) 1 1 C2 C1
A3 2 2 1 (A4,8)(D1,4)(E,23) 1+1=2 1+1=2 C3 C2 C1
D1 4 1 1 (A4,8)(D2,6)(E,23) 2+(4-2)=4 2 C3 C2
D2 6 0 1 (A4,8)(D3,11)(E,23) 4+(6-4)=6 2 C3
A4 8 1 1 (A5,11)(D3,11)(E,23) 6+(8-6)=8 2 C4 C3
A5/D3 11 1 1 (A6,18)(D4,15)(E,23) 8+(11-8)=11 2 C5 C4
D4 15 0 1 (A6,18)(D5,16)(E,23) 11+(15-11)=15 2 C5
D5 16 0 0 (A6,18)(D6,23)(E,23) 15+(16-15)=16 2 -
A6 18 0 1 (A7,23)(D6,23)(E,23) 16 2 C6
A7/D6 23 0 1 (A8,25)(E,23) 16+(23-18)=21 2 C7
A8 25
 Example 2: Consider a single channel queue .
The IAT between the customers and service
time is given in the table. Perform the
simulation until clock time is 30[stopping
time is 30],using event scheduling algorithm
find server utilization and max queue length.
IAT - 8 6 1 8 2
Service
Time
4 1 4 3 2 4
 Step 1:Find the departure time
Customer
number
IAT AT ST Service time Departure
time
Begin End=DT
1 - 0 A1 4 0 4 4 D1
2 8 8 A2 1 8 9 9 D2
3 6 14 4 14 18 18
4 1 15 3 18 21 21
5 8 23 2 23 25 25
6 2 25 4 25 29 29
Step 2: simulation for 86customers, arrange clock variable in chronological order
of arrivals and departure, accordingly specify the type of event .
Step 3:Fill the state variables LS(t) and LQ(t) according to event scheduling
algorithm, and calculate the cumulative statistics.
Type of event Clock LQ(t) LS(t) Future event list Cumulative statistics Illustration
Server busy Max
len Q
A1 0 0 1 (A2,8)(D1,4)(E,30) 0 0 C1
D1 4 0 0 (A2,8)(D2,9)(E,30) (4-0)=4 0 -
A2 8 0 1 (A3,14)(D2,9)(E,30) 4+0=4 0 C2
D2 9 0 0 (A3,14)(D3,18)(E,30) 4+(9-8)=5 0 -
A3 14 0 1 (A4,15)(D3,18)(E,30) 5+0=5 0 C3
A4 15 1 1 (A5,23)(D3,18)(E,30) 5+(15-14)=6 1 C4 C3
D3 18 0 1 (A5,23)(D4,21)(E,30) 6+(18-15)=9 1 C4
D4 21 0 0 (A5,23)(D5,25)(E,30) 9+(21-18)=12 1 -
A5 23 0 1 (A6,25)(D5,25)(E,30) 12+0=12 1 C5
A6/D5 25 0 1 (D6,29)(E,30) 12+(25-23)=14 1 C6
D6 29 0 0 (E,30) 14+(29-25)=18 1 -
 Consider a single channel queue .The IAT
between the customers and service time is
given in the table. Perform the simulation
until clock time is 30[stopping time is
30],using event scheduling algorithm find
server utilization and max queue length.
IAT - 2 4 3 1 2 6
Service
Time
4 3 2 5 2 1
 Step 1:Find the departure time
Customer
num
IAT AT ST Service time Departure
time
Begin End
1 - 0 4 0 4 4
2 2 2 3 4 7 7
3 4 6 2 7 9 9
4 3 9 5 9 14 14
5 1 10 2 14 16 16
6 2 12 1 16 17 17
7 6 18 -
Step 2: Simulation for 7 customer, end time =30 for chronological order-consider both
arrival/departure events
Type of event Clock LQ(t) LS(t) Future Event List Cumulative statistics illustratio
n
Server busy Max
queue
A1 0 0 1 (A2,2)(D1,4)(E,30) 0 0 C1
A2 2 1 1 (A3,6)(D1,4)(E,30) (2-0)=2 1 C2 C1
D1 4 0 1 (A3,6)(D2,7)(E,30) 2+(4-2)=4 1 C2
A3 6 1 1 (A4,9)(D2,7)(E,30) 4+(6-4)=6 1 C3 C2
D2 7 0 1 (A4,9)(D3,9)(E,30) 6+(7-6)=7 1 C3
A4/D3 9 0 1 (A5,10)(D4,14)(E,30) 7+(9-7)=9 1 C4
A5 10 1 1 (A6,12)(D4,14)(E,30) 9+(10-9)=10 1 C5 C4
A6 12 2 1 (A7,18)(D4,14)(E,30) 10+(12-10)=12 2 C6 C5 C4
D4 14 1 1 (A7,18)(D5,16)(E,30) 12+(14-12)=14 2 C6 C5
D5 16 0 1 (A7,18)(D6,17)(E,30) 14+(16-14)=16 2 C6
D6 17 0 0 (A7,18)(E,30) 16+(17-16)=17 2 -
A7 18 0 1 (E,30) 17+0=17 2 C7
 Consider a single channel queue .The IAT
between the customers and service time is
given in the table. Perform the simulation
until clock time is 35[stopping time is
35],using event scheduling algorithm find
server utilization and max queue length.
 IAT 1,1,6,3,7,5,2,4,1
 ST: 4,2,5,4,1,5,4,1,4
 Step 1:Calculate the departure time
Custome
r num
IAT AT ST Service time Departure
time
Begin End
1 - 0 4 0 4 4
2 1 1 2 4 6 6
3 1 2 5 6 11 11
4 6 8 4 11 15 15
5 3 11 1 15 16 16
6 7 18 5 18 23 23
7 5 23 4 23 27 27
8 2 25 1 27 28 28
9 4 29 4 29 33 33
10 1 30 -
Step 2:Simulate using Event scheduling/Time advance algorithm
Type of
event
Clock LQ(t) LS(t) Future Event List Cumulative
stastistics
illustration
Server
busy
Max
queue
A1 0 0 1 (A2,1)(D1,4)(E,60) 0 0 C1
A2 1 1 1 (A2,1)(D1,4)(E,60) 1 1 C2 C1
A3 2 2 1 (A2,1)(D1,4)(E,60) 2 2 C3 C2 C1
D1 4 1 1 (A2,1)(D1,4)(E,60) 4 2 C3 C2
D2 6 0 1 (A2,1)(D1,4)(E,60) 6 2 C3
A4 8 1 1 (A2,1)(D1,4)(E,60) 8 2 C4 C3
A5/D3 11 1 1 (A2,1)(D1,4)(E,60) 11 2 C5 C4
D4 15 0 1 (A2,1)(D1,4)(E,60) 15 2 C5
D5 16 0 0 (A2,1)(D1,4)(E,60) 16 2 -
A6 18 0 1 (A2,1)(D1,4)(E,60) 16 2 C6
A7/D6 23 0 1 (A2,1)(D1,4)(E,60) 21 2 C7
A8 25 1 1 (A2,1)(D1,4)(E,60) 23 2 C8 C7
D7 27 0 1 (A2,1)(D1,4)(E,60) 25 2 C8
D8 28 0 0 (A2,1)(D1,4)(E,60) 26 2 -
A9 29 0 1 (A2,1)(D1,4)(E,60) 26 2 C9
A10 30 1 1 (A2,1)(D1,4)(E,60) 27 2 C10 C9
D9 33 0 1 (A2,1)(D1,4)(E,60) 28 2 C10
 Prepare a simulation table using ES/TA
algorithm,let the stopping time is 24,consider
the following Inter ArrivalTime and Service
Time,Also find the customers who spent
more than 4 min.
IAT:1,1,8,6,8
ST:4,2,3,4,1,2
 Step 1:calculate departure time
Customer no IAT AT ST Service time Departure time
Begin End
1 - 0 4 0 4 4
2 1 1 2 4 6 6
3 1 2 3 6 9 9
4 8 10 4 10 14 14
5 6 16 1 16 17 17
6 8 24 2 24 26 26
Step 2:simulate using ES/TA algm
Type event clock LQ(t) LS(t) Future Event list Cumulative statistics Checkout
time
illustr
ation
Server busy Max queue
A1 0 0 1 (A2,1)(D1,4)(E,24) 0 0 - C1
A2 1 1 1 (A3,2)(D1,4)(E,24) 1 1 - C2 C1
A3 2 2 1 (A4,10)(D1,4)(E,24) 1+(2-1)=2 2 - C3 C2
C1
D1 4 1 1 (A4,10)(D2,6)(E,24) 2+(4-2)=4 2 (4-0)=4 C3 C2
D2 6 0 1 (A4,10)(D3,9)(E,24) 4+(6-4)=6 2 (6-1)=5 C3
D3 9 0 0 (A4,10)(d4,14)(E,24) 6+(9-6)=9 2 (9-2)=7 -
A4 10 0 1 (A5,16)(D4,14)(E,24) 9+0=9 2 C4
D4 14 0 0 (A5,16)(d5,17)(E,24) 9+(14-10)=13 2 (14-10)=4 -
A5 16 0 1 (A6,24)(D5,17)(E,24) 13+0=13 2 C5
D5 17 0 0 (A6,24)(D6,26)(E,24) 13+(17-16)=14 2 (17-16)=1 -
A6 24 0 1 (D6,26)(E,24) 14+0=14 2 C6
D6 26 (26-24)=2
Customer 2 and 3 were in the system for more than 4 minutes
 Consider a single server queue with one
checkout counter using ES/TA algorithm, find
the customers who spent 5 or more minutes
in the system. let the stopping time is
32,consider the following Inter ArrivalTime
and ServiceTime.
 IAT :4,2,8,1,8,3,6,8
 ST:4,6,5,2,3,4,4,1
 Step 1:find the departure time
Customer no IAT AT ST Service time Departure time
Begin End
1 - 0 4 0 4 4
2 4 4 6 4 10 10
3 2 6 5 10 15 15
4 8 14 2 15 17 17
5 1 15 3 17 20 20
6 8 23 4 23 27 27
7 3 26 4 27 31 31
8 6 32 1 32 33 33
9 8 40 -
Step 2:simulate for 8 customers
Type event clock LQ(t) LS(t) Future Event list Cumulative statistics Checkout
time
illustr
ation
Server busy Max
queue
A1 0 0 1 (A2,4)(D1,4)(E,32) 0 0 C1
A2/D1 4 0 1 (A3,6)(D2,10)(E,32) (4-0)=4 0 (4-0)=4 C2
A3 6 1 1 (A4,14)(D2,10)(E,32) 4+(6-4)=6 1 C3 C2
D2 10 0 1 (A4,14)(D3,15)(E,32) 6+(10-6)=10 1 (10-4)=6 C3
A4 14 1 1 (A5,15)(D3,15)(E,32) 10+(14-10)=14 1 C4 C3
A5/D3 15 1 1 (A6,23)(D4,17)(E,32) 14+(14-15)=15 1 (15-6)=9 C5 C4
D4 17 0 1 (A6,23)(D5,20)(E,32) 15+(17-15)=17 1 (17-14)=3 C5
D5 20 0 0 (A6,23)(D6,27)(E,32) 17+(20-17)=20 1 (20-15)=5 -
A6 23 0 1 (A7,26)(D6,27)(E,32) 20+0=20 1 C6
A7 26 1 1 (A8,32)(D6,27)(E,32) 20+(26-23)=23 1 C7 C6
D6 27 0 1 (A8,32)(D7,31)(E,32) 23+(27-
26)=24
1 (27-23)=4 C7
D7 31 0 0 (A8,32)(D8,33)(E,32) 24+(31-27)=28 1 (31-26)=5 -
A8 32 0 1 (D8,33)(E,32) 28+0=28 1 C8
D8 33 (33-32)=1
Customers 2,3,5 and 7 were in the system for 5minutes or more

More Related Content

What's hot

Queuing theory and simulation (MSOR)
Queuing theory and simulation (MSOR)Queuing theory and simulation (MSOR)
Queuing theory and simulation (MSOR)snket
 
Operational research queuing theory
Operational research queuing theoryOperational research queuing theory
Operational research queuing theoryVidhya Kannan
 
Unit 4 queuing models
Unit 4 queuing modelsUnit 4 queuing models
Unit 4 queuing modelsraksharao
 
QUEUING THEORY
QUEUING THEORYQUEUING THEORY
QUEUING THEORYavtarsingh
 
Simulation Techniques
Simulation TechniquesSimulation Techniques
Simulation Techniquesmailrenuka
 
Chp. 2 simulation examples
Chp. 2 simulation examplesChp. 2 simulation examples
Chp. 2 simulation examplesPravesh Negi
 
Simulation & Modeling - Smilulation Queuing System
Simulation & Modeling - Smilulation Queuing SystemSimulation & Modeling - Smilulation Queuing System
Simulation & Modeling - Smilulation Queuing SystemMaruf Rion
 
Sequential Models - Meaning, assumptions, Types and Problems
Sequential Models - Meaning, assumptions, Types and ProblemsSequential Models - Meaning, assumptions, Types and Problems
Sequential Models - Meaning, assumptions, Types and ProblemsSundar B N
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic Programmingcontact2kazi
 
Simulation in Operation Research
Simulation in Operation ResearchSimulation in Operation Research
Simulation in Operation ResearchYamini Kahaliya
 
Introduction to queueing theory
Introduction to queueing theoryIntroduction to queueing theory
Introduction to queueing theoryPresi
 
Sequencing problems in Operations Research
Sequencing problems in Operations ResearchSequencing problems in Operations Research
Sequencing problems in Operations ResearchAbu Bashar
 
Queueing Theory and its BusinessS Applications
Queueing Theory and its BusinessS ApplicationsQueueing Theory and its BusinessS Applications
Queueing Theory and its BusinessS ApplicationsBiswajit Bhattacharjee
 
Queuing theory
Queuing theoryQueuing theory
Queuing theoryAbu Bashar
 

What's hot (20)

Queuing theory and simulation (MSOR)
Queuing theory and simulation (MSOR)Queuing theory and simulation (MSOR)
Queuing theory and simulation (MSOR)
 
Operational research queuing theory
Operational research queuing theoryOperational research queuing theory
Operational research queuing theory
 
Unit 4 queuing models
Unit 4 queuing modelsUnit 4 queuing models
Unit 4 queuing models
 
QUEUEING THEORY
QUEUEING THEORYQUEUEING THEORY
QUEUEING THEORY
 
Queuing theory
Queuing theoryQueuing theory
Queuing theory
 
Queuing theory .
Queuing theory .Queuing theory .
Queuing theory .
 
QUEUING THEORY
QUEUING THEORYQUEUING THEORY
QUEUING THEORY
 
Simulation Techniques
Simulation TechniquesSimulation Techniques
Simulation Techniques
 
Chp. 2 simulation examples
Chp. 2 simulation examplesChp. 2 simulation examples
Chp. 2 simulation examples
 
Simulation & Modeling - Smilulation Queuing System
Simulation & Modeling - Smilulation Queuing SystemSimulation & Modeling - Smilulation Queuing System
Simulation & Modeling - Smilulation Queuing System
 
Sequential Models - Meaning, assumptions, Types and Problems
Sequential Models - Meaning, assumptions, Types and ProblemsSequential Models - Meaning, assumptions, Types and Problems
Sequential Models - Meaning, assumptions, Types and Problems
 
Queuing theory
Queuing theoryQueuing theory
Queuing theory
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic Programming
 
Queueing theory
Queueing theoryQueueing theory
Queueing theory
 
Simulation in Operation Research
Simulation in Operation ResearchSimulation in Operation Research
Simulation in Operation Research
 
Introduction to queueing theory
Introduction to queueing theoryIntroduction to queueing theory
Introduction to queueing theory
 
Sequencing problems in Operations Research
Sequencing problems in Operations ResearchSequencing problems in Operations Research
Sequencing problems in Operations Research
 
Queueing Theory and its BusinessS Applications
Queueing Theory and its BusinessS ApplicationsQueueing Theory and its BusinessS Applications
Queueing Theory and its BusinessS Applications
 
Queuing theory
Queuing theoryQueuing theory
Queuing theory
 
Queuing theory
Queuing theoryQueuing theory
Queuing theory
 

Similar to Unit 3 des (20)

DES
DES DES
DES
 
Chapter 02 simulation examples
Chapter 02   simulation examplesChapter 02   simulation examples
Chapter 02 simulation examples
 
Simulation chapter 4
Simulation chapter 4Simulation chapter 4
Simulation chapter 4
 
queueing problems in banking
queueing problems in bankingqueueing problems in banking
queueing problems in banking
 
Queuing theory and its applications
Queuing theory and its applicationsQueuing theory and its applications
Queuing theory and its applications
 
chapter11 liner model programing.pptx
chapter11 liner model programing.pptxchapter11 liner model programing.pptx
chapter11 liner model programing.pptx
 
QUEUING THEORY
QUEUING THEORY QUEUING THEORY
QUEUING THEORY
 
Ramniwas final
Ramniwas finalRamniwas final
Ramniwas final
 
Unit 1 introduction contd
Unit 1 introduction contdUnit 1 introduction contd
Unit 1 introduction contd
 
4-Queuing-System-ioenotes.pdf
4-Queuing-System-ioenotes.pdf4-Queuing-System-ioenotes.pdf
4-Queuing-System-ioenotes.pdf
 
Module 2 - Queuing Models and notations.pdf
Module 2 - Queuing Models and notations.pdfModule 2 - Queuing Models and notations.pdf
Module 2 - Queuing Models and notations.pdf
 
Queing theory and delay analysis
Queing theory and delay analysisQueing theory and delay analysis
Queing theory and delay analysis
 
Operation Research
Operation ResearchOperation Research
Operation Research
 
Operating characteristics ofqueuing system
Operating characteristics ofqueuing systemOperating characteristics ofqueuing system
Operating characteristics ofqueuing system
 
phpapp.pptx
phpapp.pptxphpapp.pptx
phpapp.pptx
 
Chapter 2 variety of modelling
Chapter 2 variety of modellingChapter 2 variety of modelling
Chapter 2 variety of modelling
 
Sample final report
Sample final reportSample final report
Sample final report
 
Operations Research_18ME735_module 4 - queuing systems.pdf
Operations Research_18ME735_module 4 - queuing systems.pdfOperations Research_18ME735_module 4 - queuing systems.pdf
Operations Research_18ME735_module 4 - queuing systems.pdf
 
Simulation and modeling
Simulation and modelingSimulation and modeling
Simulation and modeling
 
Chapter 14R
Chapter 14RChapter 14R
Chapter 14R
 

More from DevaKumari Vijay

More from DevaKumari Vijay (18)

Unit 1 computer architecture (1)
Unit 1   computer architecture (1)Unit 1   computer architecture (1)
Unit 1 computer architecture (1)
 
Os ch1
Os ch1Os ch1
Os ch1
 
Unit2
Unit2Unit2
Unit2
 
Unit 1
Unit 1Unit 1
Unit 1
 
Decisiontree&amp;game theory
Decisiontree&amp;game theoryDecisiontree&amp;game theory
Decisiontree&amp;game theory
 
Unit2 network optimization
Unit2 network optimizationUnit2 network optimization
Unit2 network optimization
 
Unit4 systemdynamics
Unit4 systemdynamicsUnit4 systemdynamics
Unit4 systemdynamics
 
Unit 1 introduction to simulation
Unit 1 introduction to simulationUnit 1 introduction to simulation
Unit 1 introduction to simulation
 
Unit 3-Greedy Method
Unit 3-Greedy MethodUnit 3-Greedy Method
Unit 3-Greedy Method
 
Unit 5 java-awt (1)
Unit 5 java-awt (1)Unit 5 java-awt (1)
Unit 5 java-awt (1)
 
Unit 4 exceptions and threads
Unit 4 exceptions and threadsUnit 4 exceptions and threads
Unit 4 exceptions and threads
 
Unit3 part3-packages and interfaces
Unit3 part3-packages and interfacesUnit3 part3-packages and interfaces
Unit3 part3-packages and interfaces
 
Unit3 part2-inheritance
Unit3 part2-inheritanceUnit3 part2-inheritance
Unit3 part2-inheritance
 
Unit3 part1-class
Unit3 part1-classUnit3 part1-class
Unit3 part1-class
 
Unit 2-data types,Variables,Operators,Conitionals,loops and arrays
Unit 2-data types,Variables,Operators,Conitionals,loops and arraysUnit 2-data types,Variables,Operators,Conitionals,loops and arrays
Unit 2-data types,Variables,Operators,Conitionals,loops and arrays
 
Unit1 introduction to Java
Unit1 introduction to JavaUnit1 introduction to Java
Unit1 introduction to Java
 
Introduction to design and analysis of algorithm
Introduction to design and analysis of algorithmIntroduction to design and analysis of algorithm
Introduction to design and analysis of algorithm
 
Operations research lpp
Operations research lppOperations research lpp
Operations research lpp
 

Recently uploaded

plant breeding methods in asexually or clonally propagated crops
plant breeding methods in asexually or clonally propagated cropsplant breeding methods in asexually or clonally propagated crops
plant breeding methods in asexually or clonally propagated cropsparmarsneha2
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaasiemaillard
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsCol Mukteshwar Prasad
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...Jisc
 
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...Nguyen Thanh Tu Collection
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...Denish Jangid
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPCeline George
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfVivekanand Anglo Vedic Academy
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleCeline George
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxakshayaramakrishnan21
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativePeter Windle
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfjoachimlavalley1
 
Benefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational ResourcesBenefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational Resourcesdimpy50
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxbennyroshan06
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptSourabh Kumar
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxRaedMohamed3
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationDelapenabediema
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345beazzy04
 

Recently uploaded (20)

plant breeding methods in asexually or clonally propagated crops
plant breeding methods in asexually or clonally propagated cropsplant breeding methods in asexually or clonally propagated crops
plant breeding methods in asexually or clonally propagated crops
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptx
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Benefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational ResourcesBenefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational Resources
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 

Unit 3 des

  • 2.  The basic building blocks of all discrete-event simulation models: entities and attributes, activities and events.  A system is modeled in terms of  o Its state at each point in time  oThe entities that pass through the system and the entities that represent system resources  oThe activities and events that cause system state to change.  Discrete-event models are appropriate for those systems for which changes in system state occur only at discrete points in time.  DES deals with dynamic, stochastic systems (i.e., involving time and containing random elements) which change in a discrete manner.
  • 3.  components of discrete event Simulation 1. System: A collection of entities (e.g., people and machines) that together over time to accomplish one or more goals. 2. Model: An abstract representation of a system, usually containing structural, logical, or mathematical relationships which describe a system in terms of state, entities and their attributes, sets, processes, events, activities, and delays. 3. System state: A collection of variables that contain all the information necessary to describe the system at any time. 4. Entity: Any object or component in the system which requires explicit representation in the model (e.g., a server, a customer, a machine). 5. Attributes: The properties of a given entity (e.g., the priority of a v customer, the routing of a job through a job shop). 6. List: A collection of (permanently or temporarily) associated entities ordered in some logical fashion (such as all customers currently in a waiting line, ordered by first come, first served, or by priority). 7. Event: An instantaneous occurrence that changes the state of a system (as an arrival of a new customer).
  • 4. 8. Event notice: A record of an event to occur at the current or some future time, along with any associated data necessary to execute the event; at a minimum, the record includes the event type and the event time. 9. Event list: A list of event notices for future events, ordered by time of occurrence; also known as the future event list (FEL). 10. Activity: A duration of time of specified length (e.g., a service time or arrival time), which is known when it begins (although it may be defined in terms of a statistical distribution). 11. Delay: A duration of time of unspecified indefinite length, which is not known until it ends(e.g., a customer's delay in a last- in, first-out waiting line which, when it begins, depends on future arrivals). 12. Clock: A variable representing simulated time.
  • 5. Simulation of Queueing Systems  Simulation is often used in the analysis of queueing models.  A simple but typical queueing model  Queueing models provide the analyst with a powerful tool for designing and evaluating the performance of queueing systems.  Typical measures of system performance, Server utilization, length of waiting lines, and delays of customers.  For relatively simple systems: compute mathematically  For realistic models of complex systems: simulation is usually required
  • 6.  A queueing system is described by  Calling population  Arrival rate  Service mechanism  System capacity  Queueing discipline
  • 7. Calling population  Calling population: the population of potential customers, may be assumed to be finite or infinite.  Finite population model: if arrival rate depends on the number of customers being served and waiting, e.g., model of corporate jet, if it is being repaired, the repair arrival rate becomes zero.  Infinite population model: if arrival rate is not affected by the number of customers being served and waiting, e.g., systems with large population of potential customers.
  • 8. System Capacity  System Capacity: A limit on the number of customers that may be in the waiting line or system.  Limited capacity, e.g., an automatic car wash only has room for 10,cars to wait in line to enter the mechanism.  If system is full no customers are accepted anymore  Unlimited capacity, e.g., concert ticket sales with no limit on the  number of people allowed to wait to purchase tickets.
  • 9. Arrival Process  For infinite-population models:  • In terms of interarrival times of successive customers.  • Arrival types:  Random arrivals: interarrival times usually characterized by a probability distribution.  Scheduled arrivals: interarrival times can be constant or constant plus or minus a small random amount to represent early or late arrivals.  • Example: patients to a physician or scheduled airline flight arrivals to an airport  At least one customer is assumed to always be present,so the server is never idle, e.g., sufficient raw material for a machine.
  • 10. Queue Behavior and Queue Discipline  Queue behavior: the actions of customers while in a queue waiting for service to begin, for example: leave when they see that the line is too long, leave after being in the line when its moving too slowly , move from one line to a shorter line  Queue discipline: the logical ordering of customers in a queue that determines which customer is chosen for service when a server becomes free, for example:  • First-in-first-out (FIFO)  • Last-in-first-out (LIFO)  • Service in random order (SIRO)  • Shortest processing time first (SPT)  • Service according to priority (PR)
  • 11. Service Times and Service Mechanism  Service times of successive arrivals are denoted by S1, S2, S3.  May be constant or random.  A queueing system consists of a number of service centers and interconnected queues.  • Each service center consists of some number of servers (c) working in parallel, upon getting to the head of the line, a customer takes the 1st available server.
  • 12. Simulation of Queueing Systems  Single server queue  • Calling population is infinite  Arrival rate does not change  • Units are served according FIFO  • Arrivals are defined by the  distribution of the time between  arrivalsA inter-arrival time  • Service times are according to a  distribution  • Arrival rate must be less than  service rate A stable system  • Otherwise waiting line will grow  unbounded A unstable system
  • 13. Simulation of Queueing Systems  Arrival Event • If server idle unit gets service, otherwise unit enters queue.  Departure Event • If queue is not empty begin servicing next unit, otherwise server will be idle.
  • 15.  A sample of 100 arrivals of a customer at a retail sales depot which has single queue is according to following distribution Time between arrival(min) 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 Frequency 2 6 10 25 20 14 10 7 4 2 A study of time required to service customers by adding up the bills,receiving payments and placing packages yields the following ServiceTime 0.5 1.0 1.5 2.0 2.5 3.0 Frequency 12 21 36 19 7 5 Consider the Arrival of first customer at time 4.Estimate the average waiting time of customer and average idle time of server by simulation for next 10 arrivals.Consider the following random numbers 93,22,53,64,39,07,10,63,76,35.
  • 16.  Step 1: Generate Tag values for inter arrival time Time between arrival Frequency Probability Cumulative probability Tag values 0.5 2 2/100=0.02 0.02 00-01 1.0 6 0.06 0.08 02-07 1.5 10 0.10 0.18 08-17 2.0 25 0.25 0.43 18-42 2.5 20 0.20 0.63 43-62 3.0 14 0.14 0.77 63-76 3.5 10 0.10 0.87 77-86 4.0 7 0.07 0.94 87-93 4.5 4 0.04 0.98 94-97 5.0 2 0.02 1.00 98-99 Total=100 Step 2: tag values for service time Service time frequency Probability Cumulative probability Tag values 0.5 12 12/100=0.12 0.12 00-11 1.0 21 0.21 0.33 12-32 1.5 36 0.36 0.69 33-68 2.0 19 0.19 0.88 69-87 2.5 7 0.07 0.95 88-94 3.0 5 0.05 1.00 95-99 Total=100
  • 17.  Step 3: simulation, assumption server is available from time 0,since the arrival of first customer is specified in the problem, it starts at 4 else, always it is assumed first customer arrives at time 0. Customer num Random num Inter arrival time Arrival time(AT) Service time(ST) Service time Waiting time of (WT)customer Idle time of server begin end 1 93 4.0 4.0 2.5 4 6.5(4 +2.5) - 4 2 22 2.0 6.0 1.0 6.5 7.5 0.5(6.5-6.0) - 3 53 2.5 8.5 1.5 8.5 10.0 - 1 4 64 3.0 11.5 1.5 11.5 13 - 1.5 5 39 2.0 13.5 1.5 13.5 15 - 0.5 6 07 1.0 14.5 0.5 15 15.5 0.5 - 7 10 1.5 16 0.5 16 16.5 - 0.5 8 63 3.0 19 1.5 19 20.5 - 2.5 9 76 3.0 22 2.0 22 24 - 1.5 10 35 2.0 24 1.5 24 25.5 - -
  • 18.  Idle time of server= service begin time next customer-service end time of previous customer  service start time=max(arrival time, end time of previous customer)  waiting time of customer=|arrival time-service time beginning|  avgWaitingTime=1/10=0.10  average idle time of server=11.5/10
  • 19.  An airport entry has only one checkin counter,customers arrive at this counter at random from 1 to 6 min,each interarrival time has same probability of occurance.The probability for service time is given below. Service time(ST) 1 2 3 4 5 6 Probabili ty 0.10 0.20 0.25 0.30 0.10 0.05 Develop a simulation table for 10 customers.Consider the random number for inter arrival time(IAT) as 13,27,15,48,9,22,53,35,2 and RN for ST as 84,10,74,53,17,91,79,67,38,89. 1.Calculate avg ST, avg time between arrival, waiting time of customer, avg time spent by customer in system,avg waiting time of customers those who wait.
  • 20.  step 1:tag values for service time Service time probability Cumulative probability Tag values 1 0.10 0.10 00-09 2 0.20 0.30 10-29 3 0.25 0.55 30-54 4 0.30 0.85 55-84 5 0.10 0.95 85-94 6 0.05 1.00 95-99 Step 2: tag values for IAT, equal probability of occurance[out of 6 option any one can occur, 1/6=0.166666667=0.17(approx.)] Inter arrival time probability Cumulative probability Tag values 1 1/6=0.17 0.17 00-16 2 0.17 0.34 17-33 3 0.17 0.51 34-50 4 0.17 0.68 51-67 5 0.17 0.85 68-84 6 0.17 1.00 85-99
  • 21.  Simulation for 10 customers Customer no RN for IAT IAT AT RN for ST Service time Service time WT for customer Time spent by customer in system begin end 1 - - 0 84 4 0 4 - (4-0)=4 2 13 1 1 10 2 4 6 (4-1)=3 (6-1)=5 3 27 2 3 74 4 6 10 (6-3)=3 (10-3)=7 4 15 1 4 53 3 10 13 6 (13-4)=9 5 48 3 7 17 2 13 15 6 (15-7)=8 6 9 1 8 91 5 15 20 7 (20-8)=12 7 22 2 10 79 4 20 24 10 (24-10)=14 8 53 4 14 67 4 24 28 10 (28-14)=14 9 35 3 17 38 3 28 31 11 (31-17)=14 10 2 1 18 89 5 31 36 13 (36-18)=18 Total=18 Total=36 Total=69 Total=105
  • 22.  Time spent by customer in the system= (service end time-arrival time)  Avg waiting time=totalWT/total customers=69/10=6.9min  Avg time spent by the customer in the system=105/10=10.5  Avg service time=36/10=3.6≈4min  Avg time between arrival=18/10=1.8≈2min  Avg waiting time of customers those who wait=69/9=7.66=total waiting time of customers/number of customers waiting
  • 23.  A Grocery store has only one checkout counter counter,customers arrive at this counter at random from 1 to 8 min,each interarrival time has same probability of occurance.The probability for service time is given below Service time(ST) 1 2 3 4 5 6 probability 0.10 0.20 0.30 0.25 0.10 0.05 Simulate the arrival for 10 customers. Consider the random number for inter arrival time(IAT) as 913,727,015,948,309,922,753,235,302 and RN for ST as 84,10,74,53,17,91,79,67,89,38. 1.Calculate avg WT, avg ST,avg time between arrival, avg time spent by customer in queue, avg waiting time of customers those who wait.
  • 24.  Step1: Generate tag vales for service time  , Service time(ST) probabilit y Cumulative probability Tag values 1 0.10 0.10 00-09 2 0.20 0.30 10-29 3 0.30 0.60 30-59 4 0.25 0.85 60-84 5 0.10 0.95 85-94 6 0.05 1.00 95-99 Step 2: Generate tag values for IAT, Given that P=1/8=0.125 Inter arrival time probability Cumulative probability Tag values 1 0.125 0.125 000-124 2 0.125 0.250 125-249 3 0.125 0.375 250-374 4 0.125 0.500 375-499 5 0.125 0.625 500-624 6 0.125 0.750 625-749 7 0.125 0.875 750-874 8 0.125 1.000 875-999
  • 25.  Step 3:simulation for 10 customers Customer no RN for IAT IAT AT RN for ST ST Service time Time in Queue Time spent in system Idle time for server Begin End 1 - - 0 84 4 0 4 - (4-0)=4 - 2 913 8 8 10 2 8 10 - (10-8)=2 (8-4)=4 3 727 6 14 74 4 14 18 - 4 (14-10)=4 4 15 1 15 53 3 18 21 (18-15)=3 6 - 5 948 8 23 17 2 23 25 - 2 2 6 309 3 26 91 5 26 31 - 5 1 7 922 8 34 79 4 34 38 - 4 3 8 753 7 41 67 4 41 45 - 4 3 9 235 2 43 89 5 45 50 (45-43)=2 7 - 10 302 3 46 38 3 50 53 (50- 46)=4 7 - Total 46 36 9 45 17
  • 26.  Avg ST=36/10=3.6min  Avg time between arrival=46/10=4.6 min  Avg time spent by customer in the queue(WT)=9/10=0.9min  Avg time spent by customer in the system=45/10=4.5min  Avg idle time of server=17/10  Avg waiting time of those who wait=9/3=3min
  • 27.  Consider a store with one checkout counter.prepare a simulation table and find the avg waiting time of customers in queue,avd idle time of server,avg service time.consider the following data. IAT 3 2 6 4 4 5 8 7 Sevice time 4 5 5 8 4 6 2 3 4
  • 28. Customer no IAT Arrival time ST Service time WT Idle time of serv er Time spent in syst em Begin End 1 - 0 4 0 4 - - 4 2 3 3 5 4 9 1 - 6 3 2 5 5 9 14 4 - 9 4 6 11 8 14 22 3 - 11 5 4 15 4 22 26 7 - 11 6 4 19 6 26 32 7 - 13 7 5 24 2 32 34 8 - 10 8 8 32 3 34 37 2 - 5 9 7 39 4 39 43 - 2 4 41 Total=32 73 Since the inter arrival time and service time are specified in the problem, simulation for 9 customers is given in the following table Avg waiting time of those who wait=32/7=4.57 Avg service time=41/9=4.55 AvgWaitingTime=32/9 Idle time of server=2/9=0.22 Avg time spent in the system=73/9=8.1
  • 29. The Event-Scheduling/Time-Advance Algorithm- Introduction  Event scheduling simulation is modeling over time of a system whose state changes at discrete points in time.  A discrete event simulation proceeds by producing a sequence of system snapshots that represent the evolution of the system through time.A given snapshot at a given time includes system state at time t and future event list (FEL).  The FEL contains all previously scheduled future events and their associated event times. Events in FEL are arranged according to chronological order- that is, the event times must satisfy t<=t1<=t2<=t3<=…tn.  Time t is the value of CLOCK, the current value of simulated time.The event associated with time t1 is called imminent event i.e t1 is the next event that will occur.  After the system snapshot at simulation time CLOCK=t has been updated , the CLOCK is advanced to simulation time CLOCK=t1.  The sequence of actions that a simulator must perform to advance the clock and build a new system snapshot is called the event-scheduling/ time –advance algorithm.
  • 30. Future Event List  All event notices are chronologically ordered in the FEL  •At current time t, the FEL contains all scheduled events  •The event times satisfy: t < t1 ≤ t2 ≤ t3 ≤ ... ≤ tn  •The event associated with t1 is the imminent event, i.e., the next event to occur  Scheduling of an event  •At the beginning of an activity the duration is computed and an end-of-activity event is placed on the future event list  •The content of the FEL is changing during simulation run .  • Efficient management of the FEL has a major impact on the performance of a simulation run
  • 31. Event Scheduling/ time advance algorithm  Step 1. Remove the event notice for the imminent event (event , time t1) from FEL.  Step 2. Advance CLOCK to imminent event time (i.e. advance CLOCK from t tot1t1)  Step 3. Execute imminent event: update system state, change entity attributes, and set membership as needed.  Step 4. Generate future events (if necessary) and place their event notice on FEL, ranked by event time. (Example: Event 4 to occur at time t+, where t2<t+<t3 )  Step 5. Update cumulative statistics and counters.
  • 32.  The model has the following components:  System state (LQ (t), LS (t)), where LQ (t) is the number of customers in the waiting line, and LS (t) is the number being served (0 or 1) at time t.  Entities: The server and customers are not explicitly modeled, except in terms of the state variables above.  Events  Arrival(A)  Departure(D)  Stopping event (E), scheduled to occur at time tn.  Event notices  (A, t). Representing an arrival event to occur at future time t  (D, t), representing a customer departure at future time t  (E, tn), representing the simulation-stop event at future time 60  Activities  Interarrival time, Service time.
  • 33. Initially LQ(t)=0,LS(t)=1 • Arrival: if LS(t)=1,then increment LQ(t) by 1,else LS(t)=1 • Departure: if LQ(t)>0,then decrement LQ(t) by 1,else LS(t)=0 • If both arrival and departure occurs simultaneously, keep LQ(t) and LS(t) same as previous clock value.
  • 34.  Consider a grocery store with one checkout counter.The IAT between the customers and service time is given in the table. Perform the simulation until clock time is 23[stopping time is 23],using event scheduling algorithm find server utilization and max queue length. Inter arrival time - 1 1 6 3 7 5 2 Service time 4 2 5 4 1 5 4 1
  • 35. Inter arrival time Arrival time Service time Service time Begin End=DT Departure time - 0 A1 4 0 4 4 D1 1 1 A2 2 4 6 6 D2 1 2 A3 5 6 11 11 D3 6 8 A4 4 11 15 15 D4 3 11 A5 1 15 16 16 D5 7 18 A6 5 18 23 23 D6 5 23 A7 4 23 27 27 D7 2 25 A8 1 27 28 28 d8 Step 1:Find the departure time using IAT and service time the given Step 2: simulation for 8 customers, arrange clock variable in chronological order of arrivals and departure, accordingly specify the type of event . Step 3:Fill the state variables LS(t) and LQ(t) according to event scheduling algorithm, and calculate the cumulative statistics.
  • 36. Type of event clock LQ(t) LS(t) Future event list(FEL): (A,t)(D,t)(E,tn) Cumulative statistics Server busy Max queue length illustartion A1 0 0 1 (A2,1)(D1,4)(E,23) 0 0 C1 A2 1 1 1 (A3,2)(D1,4)(E,23) 1 1 C2 C1 A3 2 2 1 (A4,8)(D1,4)(E,23) 1+1=2 1+1=2 C3 C2 C1 D1 4 1 1 (A4,8)(D2,6)(E,23) 2+(4-2)=4 2 C3 C2 D2 6 0 1 (A4,8)(D3,11)(E,23) 4+(6-4)=6 2 C3 A4 8 1 1 (A5,11)(D3,11)(E,23) 6+(8-6)=8 2 C4 C3 A5/D3 11 1 1 (A6,18)(D4,15)(E,23) 8+(11-8)=11 2 C5 C4 D4 15 0 1 (A6,18)(D5,16)(E,23) 11+(15-11)=15 2 C5 D5 16 0 0 (A6,18)(D6,23)(E,23) 15+(16-15)=16 2 - A6 18 0 1 (A7,23)(D6,23)(E,23) 16 2 C6 A7/D6 23 0 1 (A8,25)(E,23) 16+(23-18)=21 2 C7 A8 25
  • 37.  Example 2: Consider a single channel queue . The IAT between the customers and service time is given in the table. Perform the simulation until clock time is 30[stopping time is 30],using event scheduling algorithm find server utilization and max queue length. IAT - 8 6 1 8 2 Service Time 4 1 4 3 2 4
  • 38.  Step 1:Find the departure time Customer number IAT AT ST Service time Departure time Begin End=DT 1 - 0 A1 4 0 4 4 D1 2 8 8 A2 1 8 9 9 D2 3 6 14 4 14 18 18 4 1 15 3 18 21 21 5 8 23 2 23 25 25 6 2 25 4 25 29 29 Step 2: simulation for 86customers, arrange clock variable in chronological order of arrivals and departure, accordingly specify the type of event . Step 3:Fill the state variables LS(t) and LQ(t) according to event scheduling algorithm, and calculate the cumulative statistics. Type of event Clock LQ(t) LS(t) Future event list Cumulative statistics Illustration Server busy Max len Q A1 0 0 1 (A2,8)(D1,4)(E,30) 0 0 C1 D1 4 0 0 (A2,8)(D2,9)(E,30) (4-0)=4 0 - A2 8 0 1 (A3,14)(D2,9)(E,30) 4+0=4 0 C2 D2 9 0 0 (A3,14)(D3,18)(E,30) 4+(9-8)=5 0 - A3 14 0 1 (A4,15)(D3,18)(E,30) 5+0=5 0 C3 A4 15 1 1 (A5,23)(D3,18)(E,30) 5+(15-14)=6 1 C4 C3 D3 18 0 1 (A5,23)(D4,21)(E,30) 6+(18-15)=9 1 C4 D4 21 0 0 (A5,23)(D5,25)(E,30) 9+(21-18)=12 1 - A5 23 0 1 (A6,25)(D5,25)(E,30) 12+0=12 1 C5 A6/D5 25 0 1 (D6,29)(E,30) 12+(25-23)=14 1 C6 D6 29 0 0 (E,30) 14+(29-25)=18 1 -
  • 39.  Consider a single channel queue .The IAT between the customers and service time is given in the table. Perform the simulation until clock time is 30[stopping time is 30],using event scheduling algorithm find server utilization and max queue length. IAT - 2 4 3 1 2 6 Service Time 4 3 2 5 2 1
  • 40.  Step 1:Find the departure time Customer num IAT AT ST Service time Departure time Begin End 1 - 0 4 0 4 4 2 2 2 3 4 7 7 3 4 6 2 7 9 9 4 3 9 5 9 14 14 5 1 10 2 14 16 16 6 2 12 1 16 17 17 7 6 18 - Step 2: Simulation for 7 customer, end time =30 for chronological order-consider both arrival/departure events Type of event Clock LQ(t) LS(t) Future Event List Cumulative statistics illustratio n Server busy Max queue A1 0 0 1 (A2,2)(D1,4)(E,30) 0 0 C1 A2 2 1 1 (A3,6)(D1,4)(E,30) (2-0)=2 1 C2 C1 D1 4 0 1 (A3,6)(D2,7)(E,30) 2+(4-2)=4 1 C2 A3 6 1 1 (A4,9)(D2,7)(E,30) 4+(6-4)=6 1 C3 C2 D2 7 0 1 (A4,9)(D3,9)(E,30) 6+(7-6)=7 1 C3 A4/D3 9 0 1 (A5,10)(D4,14)(E,30) 7+(9-7)=9 1 C4 A5 10 1 1 (A6,12)(D4,14)(E,30) 9+(10-9)=10 1 C5 C4 A6 12 2 1 (A7,18)(D4,14)(E,30) 10+(12-10)=12 2 C6 C5 C4 D4 14 1 1 (A7,18)(D5,16)(E,30) 12+(14-12)=14 2 C6 C5 D5 16 0 1 (A7,18)(D6,17)(E,30) 14+(16-14)=16 2 C6 D6 17 0 0 (A7,18)(E,30) 16+(17-16)=17 2 - A7 18 0 1 (E,30) 17+0=17 2 C7
  • 41.  Consider a single channel queue .The IAT between the customers and service time is given in the table. Perform the simulation until clock time is 35[stopping time is 35],using event scheduling algorithm find server utilization and max queue length.  IAT 1,1,6,3,7,5,2,4,1  ST: 4,2,5,4,1,5,4,1,4
  • 42.  Step 1:Calculate the departure time Custome r num IAT AT ST Service time Departure time Begin End 1 - 0 4 0 4 4 2 1 1 2 4 6 6 3 1 2 5 6 11 11 4 6 8 4 11 15 15 5 3 11 1 15 16 16 6 7 18 5 18 23 23 7 5 23 4 23 27 27 8 2 25 1 27 28 28 9 4 29 4 29 33 33 10 1 30 - Step 2:Simulate using Event scheduling/Time advance algorithm
  • 43. Type of event Clock LQ(t) LS(t) Future Event List Cumulative stastistics illustration Server busy Max queue A1 0 0 1 (A2,1)(D1,4)(E,60) 0 0 C1 A2 1 1 1 (A2,1)(D1,4)(E,60) 1 1 C2 C1 A3 2 2 1 (A2,1)(D1,4)(E,60) 2 2 C3 C2 C1 D1 4 1 1 (A2,1)(D1,4)(E,60) 4 2 C3 C2 D2 6 0 1 (A2,1)(D1,4)(E,60) 6 2 C3 A4 8 1 1 (A2,1)(D1,4)(E,60) 8 2 C4 C3 A5/D3 11 1 1 (A2,1)(D1,4)(E,60) 11 2 C5 C4 D4 15 0 1 (A2,1)(D1,4)(E,60) 15 2 C5 D5 16 0 0 (A2,1)(D1,4)(E,60) 16 2 - A6 18 0 1 (A2,1)(D1,4)(E,60) 16 2 C6 A7/D6 23 0 1 (A2,1)(D1,4)(E,60) 21 2 C7 A8 25 1 1 (A2,1)(D1,4)(E,60) 23 2 C8 C7 D7 27 0 1 (A2,1)(D1,4)(E,60) 25 2 C8 D8 28 0 0 (A2,1)(D1,4)(E,60) 26 2 - A9 29 0 1 (A2,1)(D1,4)(E,60) 26 2 C9 A10 30 1 1 (A2,1)(D1,4)(E,60) 27 2 C10 C9 D9 33 0 1 (A2,1)(D1,4)(E,60) 28 2 C10
  • 44.  Prepare a simulation table using ES/TA algorithm,let the stopping time is 24,consider the following Inter ArrivalTime and Service Time,Also find the customers who spent more than 4 min. IAT:1,1,8,6,8 ST:4,2,3,4,1,2
  • 45.  Step 1:calculate departure time Customer no IAT AT ST Service time Departure time Begin End 1 - 0 4 0 4 4 2 1 1 2 4 6 6 3 1 2 3 6 9 9 4 8 10 4 10 14 14 5 6 16 1 16 17 17 6 8 24 2 24 26 26 Step 2:simulate using ES/TA algm Type event clock LQ(t) LS(t) Future Event list Cumulative statistics Checkout time illustr ation Server busy Max queue A1 0 0 1 (A2,1)(D1,4)(E,24) 0 0 - C1 A2 1 1 1 (A3,2)(D1,4)(E,24) 1 1 - C2 C1 A3 2 2 1 (A4,10)(D1,4)(E,24) 1+(2-1)=2 2 - C3 C2 C1 D1 4 1 1 (A4,10)(D2,6)(E,24) 2+(4-2)=4 2 (4-0)=4 C3 C2 D2 6 0 1 (A4,10)(D3,9)(E,24) 4+(6-4)=6 2 (6-1)=5 C3 D3 9 0 0 (A4,10)(d4,14)(E,24) 6+(9-6)=9 2 (9-2)=7 - A4 10 0 1 (A5,16)(D4,14)(E,24) 9+0=9 2 C4 D4 14 0 0 (A5,16)(d5,17)(E,24) 9+(14-10)=13 2 (14-10)=4 - A5 16 0 1 (A6,24)(D5,17)(E,24) 13+0=13 2 C5 D5 17 0 0 (A6,24)(D6,26)(E,24) 13+(17-16)=14 2 (17-16)=1 - A6 24 0 1 (D6,26)(E,24) 14+0=14 2 C6 D6 26 (26-24)=2 Customer 2 and 3 were in the system for more than 4 minutes
  • 46.  Consider a single server queue with one checkout counter using ES/TA algorithm, find the customers who spent 5 or more minutes in the system. let the stopping time is 32,consider the following Inter ArrivalTime and ServiceTime.  IAT :4,2,8,1,8,3,6,8  ST:4,6,5,2,3,4,4,1
  • 47.  Step 1:find the departure time Customer no IAT AT ST Service time Departure time Begin End 1 - 0 4 0 4 4 2 4 4 6 4 10 10 3 2 6 5 10 15 15 4 8 14 2 15 17 17 5 1 15 3 17 20 20 6 8 23 4 23 27 27 7 3 26 4 27 31 31 8 6 32 1 32 33 33 9 8 40 - Step 2:simulate for 8 customers
  • 48. Type event clock LQ(t) LS(t) Future Event list Cumulative statistics Checkout time illustr ation Server busy Max queue A1 0 0 1 (A2,4)(D1,4)(E,32) 0 0 C1 A2/D1 4 0 1 (A3,6)(D2,10)(E,32) (4-0)=4 0 (4-0)=4 C2 A3 6 1 1 (A4,14)(D2,10)(E,32) 4+(6-4)=6 1 C3 C2 D2 10 0 1 (A4,14)(D3,15)(E,32) 6+(10-6)=10 1 (10-4)=6 C3 A4 14 1 1 (A5,15)(D3,15)(E,32) 10+(14-10)=14 1 C4 C3 A5/D3 15 1 1 (A6,23)(D4,17)(E,32) 14+(14-15)=15 1 (15-6)=9 C5 C4 D4 17 0 1 (A6,23)(D5,20)(E,32) 15+(17-15)=17 1 (17-14)=3 C5 D5 20 0 0 (A6,23)(D6,27)(E,32) 17+(20-17)=20 1 (20-15)=5 - A6 23 0 1 (A7,26)(D6,27)(E,32) 20+0=20 1 C6 A7 26 1 1 (A8,32)(D6,27)(E,32) 20+(26-23)=23 1 C7 C6 D6 27 0 1 (A8,32)(D7,31)(E,32) 23+(27- 26)=24 1 (27-23)=4 C7 D7 31 0 0 (A8,32)(D8,33)(E,32) 24+(31-27)=28 1 (31-26)=5 - A8 32 0 1 (D8,33)(E,32) 28+0=28 1 C8 D8 33 (33-32)=1 Customers 2,3,5 and 7 were in the system for 5minutes or more