Modeling and Simulation
The Event Scheduling Time
Advance Algorithm-II
1
Event-scheduling/Time-advance Algorithm
• The sequence of actions
that a simulator (or
simulation language)
must perform to advance
the clock and build a new
system snapshot is called
the
Event-scheduling/Time-
advance Algorithm,
whose steps are listed in
Advancing simulation
time and updating
system image
2
Old System Snapshot At Time t
3
New System Snapshot At Time t1
4
List Processing
• The length and contents
of the FEL are constantly
changing as the
simulation progresses,
and thus its efficient
management in a
computerized simulation
will have a major impact
on the efficiency of the
computer program
representing the model.
The management of a
list is called list
processing
5
Cancellation Of An Event
• The major list processing
operations performed
on a FEL are removal of
the imminent event,
addition of a new event
to the list, and
occasionally removal of
some event (called
Cancellation of an
Event). As the imminent
event is usually at the
top of the list, its
removal is as efficient as
possible.
6
Removal And Addition Of Events From The FEL
• The removal and
addition of events
from the FEL is
illustrated in Advancing
simulation time and
updating system
image.
– Event 3 with event
time t1 represents,
say, a service
completion event at
server 3
7
Removal And Addition Of Events From The FEL
• Since it is the imminent
event at time t, it is
removed from the FEL
in step 1 of the event-
scheduling/time-
advance algorithm:
8
Removal And Addition Of Events From The FEL
• When event 4 (say, an
Arrival Event) with
event time t* is
generated at step 4, one
possible way to
determine its correct
position on the FEL is to
conduct a top-down
search:
9
Least Efficient Way To Maintain The FEL
• The least efficient way
to maintain the FEL is to
leave it as an unordered
list (additions placed
arbitrarily at the top or
bottom), which would
require at step 1 (of a
Figure) complete search
of the list for the
imminent event before
each clock advance
10
Summary
• To summarize the
discussion, when using
the Event-scheduling
Approach, a simulation
analyst concentrates on
events and their effect
on system state
11