GPSS provides a set of abstract components of various types and a set of operators called blocks which perform certain actions on the individual components. The transaction is the component which moves through a sequence of blocks that has been designed to model the system being studied. The state of the components of the model determines the details of how a block of a given type will operate. For example, a block which permits a transaction to take control of a piece of equipment will not allow the transaction to proceed if the equipment is already at maximum capacity.
Several different types of equipment components are available in GPSS. A facility is an entity which is either available for use or is in use by at most one transaction at a time. A storage is similar but has a capacity which may be specified to suit the needs of the model builder. Finally, a logic switch is a simple ON/OFF element which may be set and tested to modify the path of a transaction through the blocks of the model.
We need to emphasize that these components are abstractions. In a model of a factory operation, transactions could represent units being assembled; facilities might represent robot welders and a logic switch could be used to simulate a machine breakdown. Someone modeling a high-speed communications network, on the other hand, might have transactions correspond to messages, facilities to transmission lines and storages represent message buffer space. Whatever the application, GPSS entities provide a natural parallel to the parts of the system of interest.
As transactions move through blocks which operate on equipment entities, GPSS collects equipment usage and transaction behavior statistics such as average contents, average occupancy time, maximum contents and the like, for inclusion in a report produced automatically when the model run completes.
Additional measurement and reporting capabilities are
provided by the queue and table entities. The QUEUE and
DEPART blocks may be placed around a block or group of
blocks where waiting transactions may gather. The queue will
collect and report waiting-line statistics such as maximum
and average queue lengths, average delay, percentage of
transactions that were delayed, and so on. A TABULATE block
enters a sample value into a frequency count table
(histogram) which is included in the standard report at the
end of the run.
GPSS provides an underlying control mechanism which is transparent to the user but which ensures that competition between transactions (for use of a facility, for instance) is consistently arbitrated and that transactions are moved through the blocks of the model in an orderly and efficient way. This control mechanism also administers the GPSS clock which provides the time-base for models.
The GPSS clock is also an abstraction. It measures time in clock units. A clock unit is interpreted appropriately by the person designing the model. In the factory model a clock unit could correspond to a second or a minute, while in the communication network the finer resolution of a one- millisecond clock unit would be more suitable.
Function entities are provided to describe various types of numeric relationships. They may be used to produce random variates from theoretical or empirical probability distributions. They may also be used to modify transaction behavior depending on system-wide, entity or transaction attributes.
Variable entities can be used to perform arithmetic calculations in all implementations of GPSS. The greater flexibility of GPSS/VX and GPSS/C versions permits arithmetic expressions to be entered wherever a constant is permitted.
Certain modeling situations may take advantage of the
set concepts embodied in the group entity-type. Other
situations will benefit from the use of COUNT and SELECT
blocks which permit a number of entities to be examined in a
single operation.
GPSS provides entities known as savevalue's and matrix savevalue's which are numeric storage locations available for use or reference by all transactions. In addition, each transaction has a set of private numeric attributes called parameter's which may be used to hold a variety of information as required by the user, such as a part number code or the size or weight of an item represented by a transaction.
A rich set of Standard Numerical Attributes (SNA's)
provide a convenient notational way to access components of
a model. For instance, Q$BOXOFFICE represents the current
contents of the queue entity named BOXOFFICE. This SNA may
be used wherever a numeric value is allowed. A simple
balking situation could be represented by the block
TEST L Q$BOXOFFICE,FN$BALK,GOAWAYwhich allows transactions to pass through if the current length of the
BOXOFFICE lineup is less than the value
returned by the function BALK, and otherwise re-directs them
to the block GOAWAY. BALK may be written to return a random
variate from any desired probability distribution; or it may
return a value varying with the time of day in the model or
a value dependent on the number of packages (represented by
a transaction parameter) the theatre patron is carrying.
Simulation Software's GPSS products all feature interactive debugging capability which allows setting breakpoints in the model, single-stepping and examining attributes of model entities. Each implementation has additional innovative tools designed to make debugging a much shorter task. Features such as conditional breakpoints and animated displays optimize the model-development process, while internally-compiled code and optimizations shorten the run-times for production model runs.
The following brief example models a bank with a individual queues for each of five tellers. The transactions are customers and facilities are used to represent the bank tellers.
1. SIMULATE 2. LINES EQU 1(5),Q,F 3. ARRIVE FUNCTION RN5,BE 4. GENERATE 20,FN$ARRIVE 5. SELECT MIN 1,LINES,LINES+4,,Q 6. QUEUE P1 7. SEIZE P1 8. DEPART P1 9. ADVANCE 90,20 10. RELEASE P1 11. TERMINATE 1 12. START 100 13. ENDThe following is a line-by-line description of the model:
SIMULATE is a control statement.
EQU defines LINES as the name of the first of a group of
5 corresponding queues and facilities - the lineups and
tellers.
ARRIVE as the name of a function transforming
a random number between 0 and 1, into a value from a builtin
exponential ("BE") distribution - a commonly-used
in simulating arrival processes. The random number is taken from
the fifth builtin stream of such numbers ("RN5").
ARRIVE
defined in the previous line.
MINimum length.
TERMINATE block.
END marks the last line of the model.