All SIMULA programs work by coroutines, resume transfers control from one coroutine to another. Detach makes an object independent of, and returns control to its creator.
Class simset adds list processing facilities.
Class simulation adds queues and adgendas, random number generators, a clock, statistics gathering, and other utilities. Processes are the simulation coroutines. There are statements to activate, reactivate, hold, passivate, wait, or cancel processes.
Class miniQNcontext has many of the features also found in Kreutzer's toolboxes. (With more flexibility than allowed by standard Pascal, of course.)
Class DEMOS (Discrete Event Modeling On Simula) has many useful and convenient methods for process synchronization. Statistics are automatically collected and written. See more on patterns of process synchronization including how to do it with the Pascal toolboxes in the next file.
In GPSS, transactions are the basic units being manipulated. They are created in GENERATE blocks, flow from block to block in the model, and are removed by TERMINATE blocks. Along the way they may be forced to wait for resources, wait for gates to open, put themselves into chains (true queues, to us), transfer to blocks other than the normal next block in the model (in effect, a GO TO).
With each kind of block there is an associated symbol, and GPSS models are often drawn as flowcharts using these symbols (as was popular with early Fortran programmers.) Most blocks occur in pairs, relating a single entity, for example, a single server is called a facility, and a transaction can seize and then release a named facility. A storage models a server with multiple capacity. A transaction can enter and leave a storage. The advance block is not paired, it holds a transaction for a period of time (advance the clock).
While simple GPSS models are quick and easy to build, there are no facilities for program structuring. Any transaction can transfer to any block in the model, and diagrams of complex models tend to look like a plate of spaghetti. Anything not forseen by the developers is ackward to incorporate (Fortran subroutines can be called.) The developers did forsee quite a lot, leading to a large community of satisfied, if not happy, habitual users.
Up to top of this document
Back to Simulation notes
To Toolbox index
Back to
Lin Jensen's home page.
Comments, etc, send to