|Peter Lorenz||Simulation und Animation|
To gain an understanding of how S&A work and to actively participate in the solution of problems of S&A,
the knowledge of at least one simulation system is required.
The system chosen for this introduction is named GPSS. The name stands for General Purpose Simulation System,
the system originates in 1961 and was maintained and developed by Geoffrey Gordon (IBM) for more than a decade.
The versions GPSS/360 and GPSS/V were developed at IBM too.
Today there are GPSS-versions for computers with almost all operating systems.
Their textual interfaces simplify the WWW provision, that we will make extensive use of from now on.
This way GPSS becomes completely platform independent.
During the mid-seventies James Henrikson (Wolverine Software Corp.) developed his GPSS/H. The differences that set it apart from it's predecessors are it's significantly improved runtime efficiency and the integration of a universal programming language. In this chapter 3 we will introduce those components of GPSS/H that make it a simple but universal programming language. GPSS/H as a programming language can be used to generate animation trace files, that bring "life" into the Proof animation layouts. Later this language can be used to provide the input for the model, to analyze results and to describe experiments with models. The introduction into the components of GPSS/H needed for simulation will be given in chapter 4.
The following introduction of the GPSS/H language concept assumes that the reader knows at least one "procedural" programming language such as Pascal, C, FORTRAN or BASIC. GPSS/H is a classical, statement based language, that can be compared to BASIC. An essential difference to BASIC is the strict type concept for all values, that often proves useful when testing programs. Apart from that the usual statements for value assignments, unconditional and conditional branches and for the organisation of cycles can be found. There is a concept for macros but no subprogram technique. Adding to the classical statements for calculating, reading and writing there is a vast number of simulation specific statements, that we will introduce later.
In GPSS/H like in many other programming languages there are several types of values. Every constant and every variable belongs to one of these types. The variables introduced in GPSS/H are called Ampervariables, because their names start with an & (ampersand). There are historic reasons for this: the name variable was already occupied by earlier versions; variables of this kind will be explained in chapter 3.7.
Variables and constants can be combined with operation symbols to create expressions. Such an expression has a value, that can be used for calculations, be assigned to other variables or be used as arguments of functions. Expressions can have arithmetic, logic or string values.
GPSS/H has three classes of statements:
This chapter deals with the control statements, that are similar to the instructions (statements, commands) of other programming languages.
To integrate simulation models into other applications, to read input data from existing files and to make results available for further analysis, statements to read and write files are required.
GPSS/H distinguishes logic, numeric and character-string standard attributes. They are very similar to the standard functions of other programming languages. They can be called with one or more arguments and provide a logical (0/1), numeric or character string result.
In GPSS/H a function is a table of values. The table assigns the result of the function to each possible argument value. When dealing with a continuous function interpolation is used. Functions are for example required for the definition of empirical distribution functions or for the assignment of names and numbers to objects.
The classical GPSS/H variables, that must not be confused with the Ampervariables introduced in chapter 3.1., can be compared to formula functions of other languages: They are expressions and their values are calculated and made available on every call.
Random numbers are required everywhere the model must map the effect of randomness in the reality. In GPSS/H there are generators for standard random numbers that are uniformly distributed on the interval (0; 1) and functions for their transformation into almost thirty different types of distribution.
The input and result data of the simulation can often be much more easy to grasp and explain, when it is displayed in a graphical form. The graphical capabilities of GPSS are quite limited and only of interest from a historic point of view. Today the data can be exported into a business graphic tool or displayed directly on the Web.
|3. GPSS/H as a Programming language|
|3.1.||Constants and Ampervariables|
|3.4.||Input and Output|
|1.||Introduction to Modeling, Simulation and Animation.|
|3.||GPSS/H as a Programming language.|
|4.||GPSS/H Queueing Models.|
|5.||GPSS/H Controling Concepts.|
|Last Modified||Fri 05-27-11 06:54 GMT|
|English Translation:||S. Osterburg|
Comments please to:email@example.com