Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

gpss_manual

.pdf
Скачиваний:
49
Добавлен:
05.06.2015
Размер:
1.88 Mб
Скачать

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 eon 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.

Menu Operation

You can use either the mouse or the keyboard to choose menu items. In multistep selections, a selection cursor appears to show you which item is about to be chosen. A selection cursor is a dotted line or a "pressed" appearance around a menu

item.The a key, when pressed, will select the first item in the

main menu give it a "pressed" appearance. The w x y z can then be used to move back and forth over the menu items. The

f or e makes the final selection.

Using the Mouse

There are two ways to use a mouse to choose a menu item.

You can position the mouse pointer over the item to be chosen, and then press and release mouse button 1. You can do this in the menu bar, a pull down menu, or a cascade menu.

Alternately, you can press mouse button 1 and not let up immediately. Instead, you can drag over the item in the pull down menu, and over the item in a cascade menu to be chosen, and then release the button. You may find this combined action quicker, although there are keyboard shortcuts, as well.

Using the Keyboard

The keyboard alone can be used to make menu choices. If any menu actions are in process, press ^. Then press a to position

the menu selection cursor on the first item in the menu bar.

Now you can move the selection cursor by using the w x y z, g, or d. Press f or e to make the final menu item choice.

Alternately, you may be able to simply press a mnemonic key. These keys are denoted by the underlined letters occurring in the menu items. After entering keyboard selection mode by

PRESSing a, you can press mnemonic keys to choose succeeding menu items.

Finally, some items have shortcut key combinations listed in the menu, to the right of the item. You can immediately choose a menu item, simply by pressing this key combination. Of course, for you to be able to do this, that window has to have the focus.

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

familiar with the basic elements of the GPSS language. In addition, you are expected to know how to operate your personal computer system. You are expected to know about the file system, disk drives, directories, diskettes, desktop objects, and how to use a mouse. Also, you are expected to know how to operate menus and dialogs by mouse and/or keyboard. This information is available in the documentation of your operating system.

If you are a GPSS/PC user, be sure to read the section entitled

GPSS World Features in Chapter One. It goes over a detailed list of features and changes from the old GPSS/PC environment. More information for each item exists in later chapters. Be sure to refer through the index when you need to know more about any individual item. Online Help and the online Reference Manual are available, as well.

If you are new to GPSS, the General Purpose Simulation System, you should do some preliminary work before you continue with this manual. First, you should read one of the excellent books on the GPSS language. Then, you should carefully work through the companion user manual, entitled

GPSS World Tutorial Manual.

Afterward, you should read the first 4 chapters of this manual, using the remaining chapters as reference material. This course of study will place all the interactive power of GPSS World at your fingertips. It is best to restrict yourself to a subset of the GPSS language until you gain some actual model building experience. Most GPSS modelers are productive without mastering all the Blocks available in the language.

However, you will be most effective by considering simulation methodology, and the GPSS language, to be a topic of continuing study.

You should become familiar with both the Online Help facilities and the online reference manual. Both are handy for quick references, and for providing answers to specific questions.

Acknowledgments

Minuteman Software gratefully acknowledges the contributions by Drs. Averill Law and Stephen Vincent, of implementation of many of the random variate generation algorithms used in

GPSS World’s built-in probability distributions.

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 2.

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

World to be doing many things at the same time. It also means that the simulation environment can utilize the computing capacity of Symmetric Multi-Processing architectures.

GPSS World has been extended by PLUS, the Programming Language Under Simulation. This simple but powerful programming language removes the restrictions that existed in the older GPSS implementations. Data within this environment are untyped, with conversions occurring automatically as needed. In addition, powerful function and probability distribution libraries are directly available to PLUS Procedures. The procedure library supports string manipulations, numeric calculations and probability distributions.

User-defined PLUS Procedures and can be accessed anywhere in the Model. PLUS Experiments, which are invoked by the CONDUCT Command, can be used to control the running of simulations over a parameter space. Expressions, defined in PLUS, can incorporate data elements and System

Numeric Attributes. When parenthesized, PLUS Expressions can appear outside PLUS Procedures, in GPSS Statements. An INCLUDE Command can bring in existing User Procedure Libraries containing tested PLUS Procedures.

GPSS World has comprehensive discrete and continuous modeling capabilities. The new, tightly knit continuous modeling feature allows for easy transition between the continuous and the discrete phases. Several new GPSS Blocks have been added to cover the control of integrations,

Transaction rescheduling, changes to Assembly Sets, user-defined PLUS Blocks, and Data Streams. Data types now include integer and real numeric values, as well as strings. Each type is automatically coerced to the required form, as needed. Even matrix structures have been improved. They can now incorporate up to 6 dimensions.

In Version 4.0 of GPSS World, the PLUS Language has been extended for the definition of an Experiment as a kind of Procedure. This powerful feature permits programmable control and can even be based on simulation results. Thus, completely automatic operation is possible including the exploration of

Response Surfaces. extended for definition of Experiment Objects. This powerful feature permits programmable control and can even be based on simulation results. Thus, completely automatic operation is possible including the exploration of

Response Surfaces.

GPSS World is easy to operate. A full screen text editor can be used in any of the Text Windows. Even the Journal Window and Reports can be customized and annotated. You can use bookmarks as place holders when you are dealing with a large model. When you Create a Simulation, if any errors are detected, they are remembered so that you can correct them one at a time. The cursor moves automatically from one to the next to help you locate each problem. After the Simulation is Created, several Hot Keys can be used in place of Interactive

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

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]