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 />

It is, of course, possible to have more than one process or event of the same kind scheduled to occur<br />

at the same or different times in the future. For example, a machine-shop simulation may have<br />

many indentical machining activities in progress concurrently. Completion of two or more of these<br />

may be scheduled to occur at exactly the same time. If this happens, the timing routine uses a “first<br />

scheduled-first occurs” rule to “break the tie.” The order in which simultaneous events of equal priority<br />

are executed is determined by the sequence in which they were previously scheduled. Although<br />

several events can appear to take place at the same instant in simulated time (the simulation<br />

clock has the same value during the execution of each), there are often good reasons for wanting to<br />

impose a priority ordering. This may be done by specifying the break ties statement:<br />

or<br />

break process/event name ties by high attribute name<br />

break process/event name ties by low attribute name<br />

which gives priority to the process with the high (low) attribute value when two or more propcess<br />

notices of the same type have the same process time. The attributes are, of course, ones that have<br />

been defined in every statements for the process named. In cases where more than one set of tiebreaking<br />

attributes are needed, clauses of the form:<br />

or<br />

, then by high attribute name<br />

, then by low attibute name<br />

can be added to the break ties statement. As many such clauses may be added as are necessary.<br />

Processes defined by the statements:<br />

process<br />

every DISPATCH has a VALUE, a DUE.DATE and a PRIORITY<br />

might have ties resolved among competing process notices by statements such as:<br />

1. break DISPATCH ties by high PRIORITY<br />

2. break DISPATCH ties by high PRIORITY, then by low DUE.DATE<br />

3. break DISPATCH ties by high VALUE, then by LOW PRIORITY,<br />

then by high DUE.DATE<br />

In statement 1, among DISPATCH processes scheduled to occur at the same simulated time, the process<br />

notice with the largest PRIORITY attribute will occur first. In 2, among process notices scheduled<br />

to occur at the same simulated time and having identical PRIORITY values, the notice with the<br />

smallest DUE.DATE will occur first; and similarly for 3 and other variations.<br />

192

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

Saved successfully!

Ooh no, something went wrong!