18.10.2014 Views

SIMSCRIPT II.5 Programming Language

SIMSCRIPT II.5 Programming Language

SIMSCRIPT II.5 Programming Language

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>SIMSCRIPT</strong> <strong>II.5</strong> <strong>Programming</strong> <strong>Language</strong><br />

notices or temporary entities apply. Like event notices, processes and the corresponding process<br />

notices may be defined using the every statement, if user defined attributes are to be declared, or<br />

with the include phrase, if no user attributes are defined. For example:<br />

processes MACHINE.JOB, CHECK.JOB<br />

every ALLOCATE.TRAIN has a NO.OF.CARS, a DESTINATION<br />

In general, characteristics attributed to events or processes may be taken to apply equally to both<br />

unless stated otherwise.<br />

5.2.4 Scheduling Events and Processes<br />

Process and event notices may be filed in the future events set, scheduling their associated routines<br />

for activation at specific instants in future simulation time, using a schedule statement, which has<br />

the general form:<br />

or<br />

schedule an event at time expression<br />

a process at time expression<br />

This statement creates an event or process notice, sets its time.a attribute (the time for which it is<br />

to be scheduled) to the value of the time expression and files the notice in the appropriate event set.<br />

The time expression must evaluate to a real variable or constant. The words activate, reschedule,<br />

and cause are all synonyms for schedule. The word schedule is commonly used<br />

in conjunction with events and activate with processes. These statements are interpreted to<br />

mean:<br />

and<br />

activate a process called variable at time expression<br />

schedule an event called variable at time expression<br />

where process is the name of the process routine variable associated with the entity class. It may<br />

be seen that this is similar to the usage of create and destroy for entities. A schedule statement<br />

may be written with an explicit variable name, as in:<br />

schedule an ARRIVAL called RUSH.ORDER at time expression<br />

If an event or process notice already exists (as a temporary entity, it may have been created previously),<br />

a schedule statement may specify that it be filed in the future events set using the word<br />

this rather than an:<br />

schedule this event called variable at time expression<br />

190

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!