Proceedings of The 1997 Winter Simulation Conference Ed. S. Andradóttir, K. J. Healy, D. H. Withers, and B. L. Nelson
Proceedings of The 1997 Winter Simulation Conference Ed. S. Andradóttir, K. J. Healy, D. H. Withers, and B. L. Nelson
Thomas J. Schriber
Daniel T. Brunner
ABSTRACT
This paper provides simulation practitioners and
consumers with a grounding in how discrete-event
simulation software works. Topics include discreteevent systems; entities, resources, control elements and
operations; simulation runs; entity states; entity lists; and
entity-list management. The implementation of these
generic ideas in AutoMod and SLX is described. The
paper concludes with several examples of why it
matters for modelers to know how their simulation
software works, including coverage of SIMAN,
ProModel and GPSS/H as well as the other two tools.
1 INTRODUCTION
1.3 Terminology and Conventions
1.1 Background
Throughout this paper we use terms that we define as
well as terms reserved by the developers of particular
simulation tools. Terms we define are boldfaced on first
use. Tool-specific terms are Capitalized or, where
appropriate, are spelled out in ALL CAPS.
14
15
16
5 ENTITY STATES
17
7.1 AutoMod
User-Managed List
AutoMod Equivalent
Load
Logical Load
Resource; Queue; Block
Counter;
Process Traffic Limit
Action
Current Event List
Future Event List
Delay List;
Condition Delay List;
Load Ready List
Order List
18
SLX Equivalent
Active Object and its Puck(s)
none
Control Variable
Control Variable
Statement
Current Events Chain
Future Events List
Delay List
Set (see section 7.2.4)
SLX Equivalent
Active or Passive Object
Active or Passive Object
User-defined Statement
User-defined based on Set
User-defined based on Set
19
20
Active State to the Ready State and restart the CEC scan.
Higher-priority (and higher-ranked same priority) Xacts
on the CEC can then try to become active, one by one,
before the control-yielding Xact itself again becomes
active at the same simulated time. (A PRIORITY
PR,YIELD Block can alternatively be used in order to
reposition the just-active Xact behind equal-priority
Xacts on the CEC prior to restarting the scan.)
In SLX there is also a YIELD statement. Anormal
YIELD shifts the active Puck to the back of its priority
class on the CEC and picks up the next Puck. It is also
possible to YIELD to a specific other Puck that is on the
CEC, in which case the active Puck is not shifted.
8.5 Conditions Involving the Clock
If an entity needs to wait until a particular clock value
has been reached, every language has a time-dela y for
FEL waiting. But what if an entity needs to wait for a
compound condition involving the clock, such as wait
until my input buffer is empty or it is exactly 5:00 PM?
A typical approach to this is to clone a dummy
(shadow) entity to do the time-based waiting.
Management of dummy entities can be cumbersome,
particularly for very complex rules. ProModel has no
polled waiting, so a dummy entity would be required.
If a single entity tries to wait on a compound condition
involving the clock, other problems can arise. SIMAN
and AutoMod detect the truth of these conditions through
their end-of-EMP polling mechanisms. GPSS/H also
detects the truth through its version of polled waiting
(refusal-mode TEST). But in the absence of a clone that
waits on the FEL until exactly 5:00 PM, all three of those
tools are subject to the possibility that the first EMP that
finds the condition true has a clock value greater than
5:00 PM.
SLX recognizes the clock as a related wait-until target.
A WAIT UNTIL using a future clock value in a way that
contributes to the falseness of the condition will cause
the Puck to be scheduled onto the FEL to force an EMP
at the precise time referenced. This solves the greaterthan-the-desired-time problem. Note that this Puck may
also be waiting on one or more delay lists.
8.6 Mixed-Mode Waiting
Suppose many entities are waiting to capture a
particular resource, while a user-defined controller entity
is waiting for the condition shift status is off-shift and
number waiting is less than six and resource is not
currently in use to take some action (such as shutting the
resource down, in languages that allow user-defined
entities to shut down resources, or printing a status
message). How can we guarantee that the controller will
21
22