7.4 CHOICE OF A LANGUAGE FOR A SIMULATION



An important decision in designing a simulation is whether to use a generalpurpose computer language (e.g., FORTRAN, PL/l, or BASIC) or a specialpurpose simulation language (e.g., GPSS or SIMSCRIPT). Special-purpose simulation languages can simplify greatly the task of programming and carrying out simulation experiments-at some cost, however, to the flexibility of the program.

Two points need to be emphasized here. The first is that the two bestknown special-purpose simulation languages, GPSS and SIMSCRIPT, are very well suited for simulating certain types of urban operations research problems. The reason is, essentially, that both of these languages (they could better be described as computer software systems) offer convenient features for simulating probabilistic events and are especially oriented to the analysis of queueing networks. Many problems in urban operations research can be viewed as queueing network problems, as we have seen. Such problems involve certain logical sequences that appear time and again (such as the arrival of a user at a facility, the waiting there until the facility becomes available, and, eventually, the service process at the facility). Rather than reprogramming these oft-repeated logical sequences from the beginning, special-purpose languages provide standardized codes for them. Similarly, the types of data and statistics that are collected during simulations of queueing systems are more or less the same every time (e.g., the average waiting time or the length of the queue at various time instants). Special-purpose languages compute and tabulate automatically many of these data and statistics with practically no effort required on the part of the programmer.

The second point to be emphasized is that general-purpose and specialpurpose simulation languages are not mutually exclusive. SIMSCRIPT, in particular, is especially designed for the inclusion of segments Of FORTRAN code in a simulation program. Although more cumbersome, GPSS programs can also be made compatible with other subroutines written in general-purpose languages. For example, in simulating a spatially distributed queueing system, one may wish to use, say, a FORTRAN code to establish the geographical relationships between incidents and servers, and subsequently use GPSS code to describe the queueing and service processes. Recommended references for GPSS and SIMSCRIPT (both of which have undergone numerous revisions and improvements over the years) include [GORD 75, KIVI 69, and SCHR 74].