gpss_manual
.pdfAn SNA where the entity, row or column is specified by indirect addressing.
MatrixSNA :==DirectMatrixSNA | IndirectMatrixSNA
Any MX class SNA.
SNA :==DirectSNA | IndirectSNA
Simpleterm :==Name | SNA | SignedNumber
Simplest items in an expression.
MathFunction :== ABS | ATN | COS | EXP | INT | LOG | RND | SIN | SQR | TAN
Mathematical routines in the math library. these may be used to build expressions.
MathFunctionTerm :==MathFunction(Expression)
A call to a math library subroutine with an expression as the argument.
BinaryOperator :== + | - | # | / | \ | ^
Addition, subtraction, multiplication, division, integer division, and exponentiation. The [*] symbol is reserved for indirect addressing. ]#] represents multiplication and ^ represents exponentiation.
BlockName :==
ADOPT | ADVANCE | ALTER |
ASSEMBLE | ASSIGN | BUFFER | CLOSE | COUNT | DEPART |
ENTER | EXAMINE | EXECUTE | FAVAIL | FUNAVAIL | GATE |
GATHER | GENERATE | INDEX |
INTEGRATION | JOIN | LEAVE |
LINK | LOGIC | LOOP | OPEN |
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
GPSS block names.
LogicSwitchOp :== I | R | S
The operators used in the operator field of LOGIC blocks: I
(invert), R (reset), or S (set).
RelationalOp :== E | G | GE | L | LE | NE
The relational operators used in the operator field of certain
GPSS blocks: E (equal), G (greater than), GE (greater than or equal to), L (less than), LE (less than or equal to), NE (not equal to).
ConditionalOp :== E | G | GE | L | LE | MAX | MIN | NE
The conditional operators used in the operator field of certain GPSS blocks: E (equal), G (greater than), GE (greater than or equal to), L (less than), LE (less than or equal to), MAX
(maximum), MIN (minimum), NE (not equal to).
GateOp :== FNV | FV | I | LS | LR | M | NI | NM | NU | SE | SF |
SNE | SNF | SNV | SV | U
The operators used in the operator field of GATE blocks. The operators specify a test condition and an entity type. The operators are:
∙ FNV Facility must be not available.
∙FV Facility must be available. · ∙ I Facility must be preempted.
∙LS logicswitch must be set.
∙LR logicswitch must be reset.
∙M MATCH block must have a Transaction of the same assembly set as the Active Transaction.
∙NI Facility must not be currently preempted.
∙NM MATCH block must NOT have a
Transaction of the same assembly set as the Active Transaction.
∙NU Facility must not be in use.
∙SE Storage must be empty.
∙SF Storage must be full.
∙SNE Storage must be not empty.
∙SNF Storage must be not full.
∙SNV Storage must be not available.
∙SV Storage must be available.
∙U Facility must be in use.
LineNumber :== Number CommandName :==
BVARIABLE | CLEAR | CONDUCT | CONTINUE | EQU | EXIT | FUNCTION | FVARIABLE | HALT |
INCLUDE | INITIAL | INTEGRATE |
MATRIX | QTABLE |
REPORT | RESET |
RMULT | SHOW |
START | STEP | STOP | STORAGE | TABLE | VARIABLE
GPSS Commands do not define block entities. They set the conditions of the simulation and define other GPSS entities.
Verb :== BlockName | CommandName
Statement specific syntax is discussed in Chapters 3, 6, 7, and 8.
1.2. PLUS Grammar
Procedure :=
PROCEDURE ProcedureName ( FormalArgumentList ) Statement
Experiment :=
EXPERIMENT ProcedureName ( FormalArgumentList ) Statement
Statement := CompoundStatement | IfStatement | IfElseStatement | WhileStatement | AssignStatement |
GotoStatement | ReturnStatement | ProcedureCallStatement |
LabeledStatement | TempDeclarationStatement
LabeledStatement := Label Statement Label := Name :
TempDeclarationStatement :=TempVarDeclareStatement |
TempMatrixDeclareStatement TemporaryVarDeclareStatement := TEMPORARY NameList ;
TempMatrixDeclareStatement :=
TEMPORARY MATRIX name [ IntegerList ] ;
CompoundStatement := BEGIN StatementSequence END ;
FormalArgumentList := Name [ , Name ] ... | NULL StatementSequence := Statement [ Statement ] ... | NULL
AssignStatement := Lvalue = Expression ;
IfStatement := IF ( Expression ) THEN Statement
IfElseStatement :=
IF ( Expression ) THEN Statement ELSE Statement
WhileStatement: WHILE ( Expression ) DO Statement
GotoStatement := GOTO LabelName ;
ReturnStatement := RETURN [ Expression ] ;
ProcedureCallStatement := ProcedureCall ;
ProcedureCall := ProcedureName( ExpressionList )
ProcedureName := LibraryProcedureName | Name
FormalArgumentList := Name [ , Name ] ... | NULL
StatementSequence := Statement [ Statement ] ... | NULL
ExpressionList := Expression [ , Expression ] ...
ExperimentName := Name
ModelName := Name
StringConstant := " [Character ]..."
ParenthesizedExpression := ( Expression )
Expression := Expression | SuperResult
:= SuperResult
SuperResult := SuperResult & InterResult
:= InterResult
InterResult := InterResult = SubResult
:= InterResult /= SubResult
:= SubResult
SubResult := SubResult < Comparator
:= SubResult > Comparator
:= SubResult <= Comparator
:= SubResult >= Comparator
:= Comparator
Comparator := Comparator + Term
:= Comparator - Term
:= Term
Term := Term # Factor
:= Term / Factor
:= Term \ Factor
:= Term @ Factor
:= Factor
Factor := Factor ^ Factor
:= - Factor
:= + Factor
:= Number
:= GeneriicDatum
:= TextString
:= ParenthesizedExpression
:= ProcedureCall
:= FunctionCall
:= SNA
GenericDatum := Name
:= ArrayElement
ArrayElement := Name [ ExpressionList ]
LValue := Name
:= Name [ ExpressionList ]
Glossary
Active Transaction - That GPSS Transaction in a simulation
which is at the Head of the Current Events Chain and is the next to attempt entry into a GPSS Block.
Command File - A Secondary Model File intended for
interactive use. A Function Key loaded with an INCLUDE Statement can run a Control File with a single keystroke.
Data Stream - A sequence of text lines identified by a unique positive integer.
Entity Label - A Named Value used in the Label field of a GPSS Statement.
GPSS Statement - A GPSS Block Statement or a Command occurring in a single Text Line.
Immediate Command - A Command which when sent to a
Simulation Object is performed immediately and is not placed on the Command Queue. HALT and SHOW are the only Immediate Commands. A HALT Command interrupts any running simulation and deletes all remaining Commands from the Command Queue.
Interactive Statement - A Model Statement sent to an existing simulation.
Manual Simulation Statement - an Interactive Block
Statement, causing a temporary Block to be created, and causing the Active Transaction to attempt entry.
Model - A sequence of Model Statements.
Model File - A file containing Model Statements.
Model File Number - the 0-relative ordinal of the Model File in
the order encountered by the Translator. The Model Object is assigned Model File Number 0.
Model Statement - A GPSS Statement or a PLUS Procedure definition.
Named Value - A user created name used in a model.
PLUS Procedure - A PLUS PROCEDURE Statement obeying the Syntax rules of the PLUS Language.
Primary Model File - A Model File brought into a Model
Window of a GPSS World Session.
Project - A set of Folders (or directories) for holding files
relating to a single modeling activity. Project directories are set in the Configuration Notebook.
Queued Command - A Command which when sent to a
Simulation Object is placed on a Command Queue behind all other Commands waiting to be performed. All Commands except CONDUCT, HALT and SHOW are Queued Commands.
Secondary Model File - A Text Object Translated as a result of an INCLUDE Command.
Session - The Sequence of Events from the Opening to the
Closing of the GPSS World process.
Simulation - The Result of Translation of a model, whose state can be advanced by a Simulation Object.
Statement - A GPSS Statement or a PLUS Statement.
String - A sequence of characters.
Termination Count - The state variable in each simulation
that, when it becomes nonpositive, causes the simulation to end.
Text Line - A Sequence of up to 250 print characters, including
blanks and tabs, terminated by, but not including, a CR LF sequence.
Trace Indicator - A Transaction state variable that causes a
Trace Message to be created by each Block entry.
Translator - That part of the GPSS World Control Process which converts a model into a simulation.
User Variable - A Named Value not occurring in any GPSS Statement Label field.