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.

Discrete Simulation Concepts<br />

RANDVAR 0.1 0.2 0.35<br />

10 25 40<br />

0.55 0.8 1.0<br />

100 150 200<br />

Use of the random variable:<br />

Figure 5-8. Storage of RANDVAR Sample Values<br />

0<br />

let NEXT.VALUE = RANDVAR<br />

if RANDVAR greater than LIMIT,<br />

.<br />

.<br />

If the input data had the form:<br />

0.1 10 0.1 25 0.15 40 0.2 100 0.25 150 0.2 200 *<br />

the data would be stored in the same form. Individual probability values are accumulated as the<br />

data are read.<br />

Random variables cannot appear in any other form of read statement, because input of a random<br />

variable "value" obviously means something special. If RANDVAR is an attribute of a permanent<br />

entity, one can say read RANDVAR(I) but not read RANDVAR, because the latter statement is interpreted<br />

as a free-form array read statement. Only a single random variable data list can be read<br />

at one time. If RANDVAR is an attribute of a temporary entity, read RANDVAR is interpreted as read<br />

RANDVAR(entity), using implied subscripting.<br />

5.5 Simulation Analysis<br />

The principal outputs of simulation experiments are statistical measurements. Such quantities as the<br />

average length of a waiting line and the percentage of idle time of a machine are typical examples.<br />

Two features, accumulate and tally, provided in <strong>SIMSCRIPT</strong> <strong>II.5</strong>, allow such information to<br />

be gathered during a simulation run, without requiring any other explicit action to be specified within<br />

the program. These two preamble statements can instruct the compiler that automatic data collection<br />

and analysis are to be performed at appropriate places in a program. The program text can<br />

223

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

Saved successfully!

Ooh no, something went wrong!