Docsity

GPSS - General Purpose Simulation Manual, Study Guides, Projects, Research of Mathematical Modeling and Simulation

Toggle sidebar
bg1
GPSS World Reference
Manual
Table of Contents
Preface xvii
Product Description
About This Manual
Chapter 1 - Introduction
1.1. Highlights
1.2. GPSS World Concepts
1.3. Architecture
1.4. The Modeling Language
1.5. Compatibility
Chapter 2 - Operating GPSS World
2.1. File Directories
2.2. Installation
2.3. The GPSS World Environment
Chapter 3 - Model Statements
3.1. Using Model Statements
3.2. GPSS Statements
3.3. Fields
3.4. Expressions
3.5. Names
3.6. Numbers
3.7. Using Strings
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download GPSS - General Purpose Simulation Manual and more Study Guides, Projects, Research Mathematical Modeling and Simulation in PDF only on Docsity!

GPSS World Reference

Manual

Table of Contents

Preface xvii

Product Description

About This Manual

Chapter 1 - Introduction

1.1. Highlights

1.2. GPSS World Concepts

1.3. Architecture

1.4. The Modeling Language

1.5. Compatibility

Chapter 2 - Operating GPSS World

2.1. File Directories

2.2. Installation

2.3. The GPSS World Environment

Chapter 3 - Model Statements

3.1. Using Model Statements

3.2. GPSS Statements

3.3. Fields

3.4. Expressions

3.5. Names

3.6. Numbers

3.7. Using Strings

Chapter 4 - GPSS Entities

4.1. Transaction Entities

4.2. Block Entities

4.3. Facility Entities

4.4. Function Entities

4.5. Logicswitch Entities

4.6. Matrix Entities

4.7. Queue Entities

4.8. Storage Entities

4.9. Savevalue Entities

4.10. Table Entities

4.11. Userchain Entities

4.12. Variable Entities

4.13. Numeric Group Entities

4.14. Transaction Group Entities

4.15. Random Number Generators

4.16. Data Streams

4.17. Continuous Simulation

Chapter 5 - GPSS World Windows

Chapter 6 - Commands

BVARIABLE

CLEAR

CONTINUE

EQU

EXIT

FUNCTION

DISPLACE

ENTER

EXAMINE

EXECUTE

FAVAIL

FUNAVAIL

GATE

GATHER

GENERATE

INDEX

INTEGRATION

JOIN

LEAVE

LINK

LOGIC

LOOP

MARK

MATCH

MSAVEVALUE

OPEN

PLUS

PREEMPT

PRIORITY

QUEUE

READ

RELEASE

REMOVE

RETURN

SAVAIL

SAVEVALUE

SCAN

SEEK

SEIZE

SELECT

SPLIT

SUNAVAIL

TABULATE

TERMINATE

TEST

TRACE

TRANSFER

UNLINK

UNTRACE

WRITE

Chapter 8 - PLUS

8.1. Defining PLUS Procedures

8.2. The Language

8.3. The Procedure Library

8.3.1. Utility Procedures

8.3.2. Math Procedures

8.3.3. Query Procedures

8.3.4. String Procedures

8.3.5. Probability Distributions

Glossary

GPSS WORLD REFERENCE MANUAL

© Copyright 2000 Minuteman Software.

Holly Springs, NC, U.S.A.

All Rights Reserved.

The software described in this manual is furnished under

license and may be used or copied only in accordance with

the terms of the license agreement.

Minuteman Software

P.O. Box 131

Holly Springs, NC 27540-0131 U.S.A.

GPSS Worldtm^ is a high powered general purpose computer simulation environment, designed for simulation professionals. It is a comprehensive modeling tool covering both discrete and continuous computer simulation, with an extremely high level of interactivity and visualizability.

Using GPSS World, it is possible to predict the effects of design decisions on extremely complex real world systems.

This manual contains information on the use of the GPSS World application program, and is the primary reference for the version of the GPSS language implemented by GPSS World. The first part of the manual shows you all you need to know in order to make full use of the features of the GPSS World application program. The last part of the manual contains a detailed description of each GPSS Statement and a variety of information that may be useful as you become experienced with the use of GPSS World. Most of this manual is acessible via the online Help facility of GPSS World.

A companion manual, entitled GPSS World Tutorial , is included in the documentation set. It contains an introduction to simulation with GPSS, followed by suggested sessions involving many different sample models. You may find one or more examples that correspond closely to your own simulation

  • Chapter 10 contains information on how to get the most from your simulations. It contains performance tips and other information you may find useful.
  • Chapter 11 describes the Report Management Facilities, and the Standard Reports produced by GPSS World.
  • Chapter 12 discusses the statistics generated automatically by GPSS World.
  • Chapter 13 contains the error messages, explanations, and remedial actions.
  • Finally, the Appendix contains a description of the formal grammar, and a short glossary.

Some readers will appreciate the formal grammar description in the Appendix. Most of the elements of the GPSS dialect used with GPSS World are defined formally there. The forms of an operand which are acceptable are given under the appropriate Statement description in Chapter 6, 7, or 8.

How This Manual Describes Actions

Concepts with meaning specific to GPSS World are capitalized. For example, the Current Events Chain is a specific construct with a special meaning. When words are used generically, and do not refer to a particular item, they are not capitalized.

Actions you are asked to make immediately, are represented by verbs in uppercase. For example, when you see PRESS, CHOOSE, CLICK, DOUBLE CLICK, SELECT, or TYPE, you are to perform the action, yourself. When actions are referred to, but you are not asked to do them immediately, the verbs are shown in lower case.

Words representing objects or denoting concepts specific to GPSS World, are often shown in italics for emphasis, when first encountered, or capitalized when used frequently. For example, SHOW is an Immediate Command.

Keystrokes you are required to make are indicated by a special font which encloses the name of the key in an outline. For

example, "PRESS e " means that you are to press the key

labeled "Enter" on your keyboard.

When more than one key must be used, the key symbols are

separated by a plus. For example, b + a + H means that you

are to press and hold the left key, while you press and release the right ones.

Mouse actions are required when the capitalized phrases CLICK or DOUBLE CLICK appear. This means that you are to

use mouse button 1 to perform the action. When mouse button 2 is needed, it will be called for explicitly. By default, mouse button 1 is the left mouse button, and 2 the right. You can use the OS/2 control panel to switch these assignments.

Menu items are indicated in a bold Times New Roman font. When more than one level of selection is necessary, they are shown in the order: menu bar item / pull down menu item / cascade menu item. For example

CHOOSE FILE / OPEN

means that you should use either the mouse or the keyboard to choose the "File" item in the menu bar. Then you should choose the "Open" item in the pull down menu. In this example, there is no cascade menu item. For purposes of nomenclature in this manual, "CHOOSE" is used for menu items, "SELECT" is used for other choices.

Dialog window controls are also shown in a bold Times New

Roman font. For example,

SELECT OK

means that you should use either the mouse or the keyboard to select the OK button in the dialog window.

When you see SELECT OK , you can accomplish the same

thing pressing f or e on your keyboard. There is one exception,

however. Since Command / Custom provides for multiline

command lists and PLUS Procedure definitions, the enter key

is used only to break text lines, instead of to SELECT OK.

Characters you are to type into a Text Window are indicated in

a bold Courier New font. For example,

TYPE GENERATE 100

means that you are to type the characters "GENERATE 100", making sure the text window has the focus, and that the text cursor has been positioned to the right place in the window.

Finally, objects in the operating system shell are described with underlining, in order to distinguish them from items within GPSS World, itself. For example,

DOUBLE CLICK on The GPSS World Icon

means that you are to view the desktop or a folder of the Workplace shell containing the icon which represents the GPSS World Session Object, and you are to position the mouse pointer over it and double click mouse button 1.

Text Windows

When a GPSS World Text Window has the focus, keystrokes usually cause the replacement or insertion of characters into

the window. The h key can be used to change between insert

mode and replace mode. The mode is indicated by the shape of the blinking text cursor, which also indicates the insertion point in the window.

Either the keyboard or the mouse can move the text cursor. Clinking mouse button 1 moves the text cursor to the position

under the mouse pointer. The arrow keys, g , d , { , and } all

move the text cursor, as does normal text insertion and deletion.

A new line of text can be started by pressing f or e.

Selected text is shown in inverse, and can take part in special operations. You can select text by dragging mouse button 1 over the target text, by pressing j, and clicking mouse button 1 on the end of selected text, or by double clicking on the word to be selected.

You can delete characters, one at a time, by pressing c or

backspace. Pressing c deletes the character to the right of the

cursor; pressing backspace deletes the character to the left of

the cursor. Selected text can be deleted by choosing Edit /

Cut , or by pressing c. A single level undo is available by

choosing Edit / Undo.

Graphics Windows

Graphics Windows may have menu actions based on the selection of one or more objects in the window. For example, a contiguous sequence of Blocks can be copied form the Block Input Window to the clipboard.

Generally, an object can be selected by clicking on its icon. Swipe selection is supported, as well. In addition, some windows allow extended selection. First select an object. Then scroll to the other end of the selection set of objects, hold down

j while clicking on the second object. That object, the first

object, and all intervening objects will then be selected.

Finally, if you hold down b while clicking on an icon, the object

is toggled into or out of the selection set. A selected object becomes unselected, or an unselected object becomes selected.

Dialog Windows

Although the GPSS World dialog windows are all different, they do have some things in common.

Mouse selection is normally used to set the focus in entry

fields, and make selections in each dialog. Usually, the f or e

key will select OK , the ^ key will select Cancel , and the l

key will select Help.

Getting Help

Online Help is available when you

CHOOSE Help

in a dialog window, or when you

PRESS l

Once the Online Help system is activated, you can utilize a variety of search techniques for information. If you have selected a word in a Text Window, the Help Window will open directly in the topic in the Online Reference Manual.

Universal Keys

Several keys, and key combinations are effective no matter which GPSS World window has the focus. They are generally used to control a translated simulation by quickly passing Commands to the active Simulation Server.

Hot Keys

The Hot Keys initiate an Interactive Command from a single keystroke combination. These are described in Chapter 2.

Function Keys

Function keys can be given ad hoc assignments. You can do this in the Settings Notebook by typing in the new assignment beside the appropriate function key label. Thereafter, when you press the associated function key, the assigned Command is Translated and sent to the Server. You can assign a complex Command List and/or PLUS Procedure redefinition by assigning an INCLUDE Statement to a function key.

Intended Audience

GPSS World is a full strength simulation environment designed for simulation professionals. A significant amount of preparation is required before you can expect to use it to its full potential. This manual is intended for users who are already

Chapter 1. Introduction

Predicting the behavior of complex real world systems -- that's what GPSS World is all about.

Many expensive projects in the past have failed because the end result was not characterized accurately. From maximum capacity to cost of operation, it is essential for detailed knowledge of the behavior of the system under construction to be known as soon as possible. Although purely mathematical models are extremely valuable, and should be used where feasible, the complexity of most real world systems requires the use of Computer Simulation to get the necessary answers. That's where GPSS World comes in.

GPSS World is based on the seminal language of Computer Simulation, GPSS, which stands for General Purpose Simulation System. This language was developed primarily by Geoffrey Gordon at IBM around 1960, and has contributed important concepts to every commercial discrete event Computer Simulation Language developed ever since. GPSS World is a direct descendent of GPSS/PC, the world's first implementation of GPSS for personal computers. Since it's introduction in 1984, GPSS/PC and its successors have saved thousands of users millions of dollars. Now, the Windows Implementation of GPSS World extends these capabilities into an Internet aware environment.

GPSS World is designed to deliver answers quickly and reliably, with the least effort, achieving the highest reliability of results. Consistent with these objectives, visualization of running simulations is highly stylized and a default statistical treatment is built in. This approach means that animations are "free" requiring no additional effort to produce, but are not photo-realistic. GPSS World's forte is transparency, not photo-realism.

Transparency is valuable for three reasons. First, it is dangerous to rely on an opaque "Black-Box" simulation whose internal mechanisms cannot be observed. Not only can you not be sure it fits your situation, but it is difficult to be assured that it even works as intended. Second, successful simulations are valuable and have a surprisingly long lifetime. It is possible that new staff members will be required to become familiar with the internal workings of the simulation -- a near-impossible task unless provision has already been made for a high level of transparency. Third, one of the most effective but least mentioned benefits of Computer Simulation is the insight on system behavior achieved when an experienced Simulation Professional can see the internal dynamics at crucial times in the simulation.

GPSS World was designed to address these issues. Its visualizable nature allows the internal mechanisms of models to be revealed and captured. Its interactivity allows one to

explore and manipulate running simulations. Its built-in data analysis facility can calculate confidence intervals and an Analysis of Variance with a single keystroke.

Most systems can be modeled in any of several ways using GPSS World. Usually only a small subset of the features available need to be used. However, the greatest proficiency requires familiarity with all that GPSS World has to offer. This manual is the primary source of that information.

This chapter consists of 5 sections. The first is a brief overview of the most important aspects of GPSS World. The second explores a few basic concepts which are necessary for moving on to later chapters. The third section discusses the advanced architecture of GPSS World and what you must know to take advantage of it. The fourth section explores the modeling language of GPSS World, and the fifth section is for GPSS/PC users who want to take advantage of the Compatibility Mode of GPSS World. This last feature is available only in the Commercial Version of GPSS World.

Installation and operating procedures are discussed in Chapter

1.1. Highlights

GPSS World is object oriented. Its inhabitants include Model Objects which are used to create Simulation Objects. Simulation Objects are used to play out simulations and create Report Objects. Finally, Text Objects can be used as INCLUDE files to support code sharing and a user source code library.

Simulation projects require several steps. They normally include model building and data collection, testing and verification, simulation, and the analysis of results. GPSS World has a large number of capabilities addressing each of these steps. In GPSS World, you will create and modify a model using the full-screen text editor. You then Create a Simulation Object by selecting COMMAND / Create Simulation in the Main Window Menu. Thereafter, you have a powerful set of Commands at your disposal to control the running of the simulation. You can enter Commands interactively, or you can include them in the original model. During the testing and verification phase, a large number of window types are available for online viewing and to take snapshots of the simulation. Hot Keys and Point and Shoot breakpoint control make verification and debugging easy. After the simulation is tested, you can have the results reported automatically. Then, with only a few keystrokes, you can perform a statistical analysis.

GPSS World was designed to exploit your computing environment. The use of virtual memory allows your models to grow to a billion bytes. Preemptive multitasking and multithreading mean higher responsiveness and permit GPSS

Commands. Using Model and Simulation settings, you can load your own Commands into one or more function keys in order to get single keystroke response. Windows are easy to open. Generally, only a menu selection is needed. During debugging, even breakpoint control can be accomplished in a Point and Shoot fashion using the mouse.

GPSS World is highly interactive. All Model Statements can be used interactively. When you send a Command, Block Statement, Procedure Definition, or Experiment Definition to an existing Simulation Object, the interaction is used to redefine or manipulate the state of the simulation. This level of control is extremely useful while the behavior of the simulation is being verified. In essence, you can do almost anything to the simulation after it is created.

Itís easy to visualize running simulations. GPSS World can create stylized animations of any GPSS entity type with no more than a mouse click, or two, from you. These windows are dynamic -- showing the changing state of running simulations. In additional, dynamic on-line windows can view the state of the GPSS entities even while the simulation is running. An Expressions Window is available to display the changing values of any number of your own Expressions. In addition, any number of scrollable PLOT Windows can be opened to show the dynamics graphically.

The Commercial Version of GPSS World provides for a set of snapshots, as well. These are advanced features intended for professionals who need detailed knowledge of microstates of the simulation. Static snapshots can be taken of any Transaction, the Future Events Chain, the Current Events Chain, or the membership of the Numeric and Transaction Groups.

Simulations can communicate with the outside world. You can now use five new GPSS Blocks to manipulate Data Streams. They are OPEN, CLOSE, READ, WRITE, and SEEK. The last of these, SEEK, provides for direct access into a data base. Data Streams have many purposes. You can use them to access data files, to create Result Files and custom reports, to access internal data directly.

The analysis of results is easy in GPSS World. It has facilities that support the capture and printing of graphical windows. The Journal Window records the activities associated with the Simulation Object. An automatic Report Management System ensures the safe keeping of each Standard Report. The new ANOVA Library Procedure can perform a complete Analysis of Variance when passed a Result Matrix. That's all there is to the generation of an ANOVA table and a set of Confidence Intervals.

The structure of the modeling language has been simplified in GPSS World. A Model Object is now defined as a sequence of Model Statements. Each can be either a GPSS Statement, a PLUS Procedure definition, or a PLUS Experiment definition. A

Model Object is used to create the corresponding Simulation Object, which can contain any number of PLUS Procedures and/or PLUS Experiments, which can be invoked after the Simulation Object is created. Any Model Statement can be sent to an existing Simulation Object (even while it is running). Such statements are called Interactive Statements. These concepts are discussed in more detail in the next section.

GPSS World does inherit some characteristics from GPSS/PC.

For example, it retains the use of the # character as the

multiplication operator. The reason for this is that * has been

reserved for GPSS Indirect Addressing. Rather than introduce ambiguity into the language, a distinct character was chosen to denote multiplication. Although GPSS Statements, except Function Followers, must still fit on a single line of text, the maximum line length has been increased to 250 characters. The new PLUS Statements are not so restricted. They can span any number of lines.

1.2. GPSS World Concepts

1.2.1. Objects

GPSS World is populated by 4 kinds of objects. Models, Simulations, and Report Objects form the basic types which are used in all GPSS World simulations. Typically, a model is developed by editing the statements in a Model Object. Then, a Create Simulation Command is issued, thereby creating a Simulation Object structured according to the statements in the Model Object. Simulations are run by sending them GPSS Commands, or by including commands in the Model Object, itself. Normally, when a simulation completes, a Report Object is created automatically.

Overall control of multiple simulation runs can be handled within this framework by including a PLUS Experiment in the Model Object. (PLUS is the "Programmming Language Under Simulation" that can be used to define procedures and experiments.) Then, a Run Experiment Command can be sent to the Simulation Object to control a series of simulation runs, and deal the results.

The Text Object completes the 4 types of GPSS World Objects. These are named in INCLUDE Statements to aid the development of large simulations, and for a few other handy uses such as the creation of a source code library.

All GPSS World Objects can be saved at any time, in any state, and reopened in a later session. This includes Simulation Objects, which can be run any number of times from a saved state, thereby facilitating debugging and demonstrations. Simulation Objects can even be saved in the middle of complex Experiments, allowing you to complete the simulation runs at a