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

The format of an external data record is:<br />

1. Process or event name, e.g., REPORT<br />

2. Process activation time in any of three formats<br />

3. Data for the process (optional)<br />

4. Mark.v delimiting character (normally "*")<br />

The name and activation time are read in free form from the external data record. Optional data for<br />

the event or process routine may be in any programmer-defined format. A delimiting symbol is<br />

used by the system to advance properly from one set of external data to the next. As the optional<br />

data may span more than one physical record, and a routine may possibly leave some of these data<br />

unread, the <strong>SIMSCRIPT</strong> <strong>II.5</strong> system must have a way of advancing to the start of a new set of event<br />

or process data when signaled by the timing routine. The <strong>SIMSCRIPT</strong> <strong>II.5</strong> system searches for a<br />

delimiting character that matches the value of a global variable named mark.v. This is an alpha<br />

variable, which by default is an asterisk, "*", but which may be assigned a different value under<br />

program control. This delimiter must terminate each set of external data, triggering an event or process.<br />

5.3.10 Time and Date Expressions in External Data<br />

There are three formats in which event times can be stated. The first is decimal time units<br />

format. In this format, time is specified as a real-valued decimal number such as 0.0, 15.56, or<br />

20.0. The number is interpreted as the absolute time at which the event triggered by the external<br />

data record is to occur. In the second format, day-hour-minute format, three integer numbers<br />

specify the day, hour of the day, and minute of the hour at which the event is to occur. All three<br />

numbers must be present. Sample times and their interpretation are:<br />

0 0 0 representing the start of simulation<br />

0 12 30 12:30 in the afternoon of the first day<br />

2 10 37 10:37 in the morning of the third day<br />

Hours are numbered from 0 to 23 and minutes from 0 to 59. In the third format, calendar time<br />

format, the day is expressed as a calendar date, and the hour and minute of the hour as integer<br />

numbers. For example:<br />

1/15/82 4 30 represents 4:30 in the morning on January 15, l982<br />

Using the calendar date format, the year can be expressed as 1982 or as 82. If the form XX is used,<br />

19XX is assumed. Years after 1999 and before 1900 must therefore be expressed completely.<br />

Before the calendar format can be used, the calendar date of the start of simulation must be set to<br />

provide an origin against which calendar time specifications can be compared. This must be done<br />

210

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

Saved successfully!

Ooh no, something went wrong!