Modeling and Simulation
World Views-II
1
Three-phase Approach
• The three-phase
approach, which
combines some of the
features of event
scheduling with activity
scanning to allow for
variable time advance
and the avoidance of
scanning when it is not
necessary, but keeps the
main advantages of the
activity-scanning
approach.
2
Duration Zero Time Units
• In the three-phase
approach, events are
considered to be
activities of duration
zero time units. With
this definition, activities
are divided into two
categories, which are
called B and C.
3
B activities & C activities
• B activities:
– Activities bound to
occur; all primary
events and
unconditional
activities.
• C activities:
– Activities or events
that are conditional
upon certain
conditions-being true
4
B-type Activities
• The B-type activities
and events can be
scheduled ahead of
time, just as in the
event-scheduling
approach.
• This allows variable
time advance.
• The FEL contains only
B-type events.
Scanning to learn
5
C-type Activities
• C-type activities can
begin or C-type
events occur
happens only at the
end of each time
advance, after all B-
type events have
completed.
6
Three-phase Approach
• In summary, with the
three-phase approach,
the simulation proceeds
with repeated execution
of the 3 phases until it is
completed;
• Phase A :
– Remove the
imminent event from
the FEL and advance
the clock to its event
time.
7
Three-phase Approach
– Remove from the FEL
any other events that
have the same event
time.
• Phase B:
– Execute all B-type
events that were
removed from the
FEL. (This could free
a number of
resources or
otherwise change
system state.)
8
Three-phase Approach
• Phase C :
– Scan the conditions
that trigger each C-
type activity and
activate any whose
conditions are Smet.
– Rescan until no
additional C-type
activities can begin
and no events occur.
9
Summary
• In this module we learnt
Proponents claim that
the activity scanning
and three-phase
approaches are
particularly good at
handling complex
resource problems in
which various
combinations of
resources are needed to
accomplish different
tasks.
10
Summary
• These approaches
guarantee that all
resources being freed at
a given simulated time
will all be freed before
any available resources
are reallocated to new
tasks.
11