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

gpss_manual

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

A must not be in use for a successful test.

SE - The Storage Entity specified implicitly by

Operand A must be empty for a successful test.

All storage units must not be in use.

SF - The Storage Entity specified implicitly by

Operand A must be full for a successful test. All storage units must be being used.

SNE - The Storage Entity specified implicitly by Operand A must be not empty for a successful test. At least one storage unit must be in use.

SNF - The Storage Entity specified implicitly by

Operand A must be not full for a successful test.

There must be at least one storage unit that can be used.

SNV - The Storage Entity specified implicitly by

Operand A must be in the "unavailable" state for a successful test.

SV - The Storage Entity specified implicitly by Operand A must be in the "available" state for a successful test.

U - The Facility specified implicitly by Operand A must be in use for a successful test.

Special Restrictions

B, if specified, must be the location of a Block in the simulation.

GATE Blocks are extremely powerful, but they can cause a lot of computer time to be used in unsuccessful tests. You may need to arrange your simulation to reduce the frequency of unsuccessful tests. This can be done by placing Transactions with no chance of a successful test on a User Chain using LINK and UNLINK Blocks.

The MB class of SNA should not be used alone to specify a blocking condition in a GATE Block. You should use MATCH Blocks instead.

Refuse Mode

A GATE Block operating in Refuse Mode will refuse entry to a Transaction when the test fails. The refused Transaction will be blocked until the test is successful.

When a Transaction is refused entry, its delay indicator is set and remains so until the Transaction enters a "Simultaneous"

Mode TRANSFER Block. However, since the advent of the

Boolean Variable in the GPSS language, it is more efficient to use a TEST Block and a Boolean Variable when it is necessary to coordinate the state of multiple entities.

Related Windows

Blocks Window - Online view of Block dynamics.

Facilities Window - Online view of Facility Entity dynamics.

Logicswitches Window - Online view of

Logicswitch Entity dynamics.

Storages Window - Online view of Storage Entity dynamics.

GATHER

Wait for related Transactions. GATHER A

Operand

A - Transaction count. Required. The operand must be Name,

PosInteger, ParenthesizedExpression, SNA, or

SNA*Parameter.

Example

GATHER 2

This is the simplest way to use the GATHER Block. The first

Transaction of an Assembly Set (see Section 9.3) is caused to wait when it enters an GATHER Block. When another Transaction in the same Assembly Set enters the Block, both related Transactions are released and put on the Current Events Chain.

Action

When a Transaction enters a GATHER Block, the Match Chain of the Block is searched for a waiting Transaction of the same

Assembly Set. If there are no other members of the same

Assembly Set present, the A Operand is evaluated, truncated. decremented by one, and saved in a storage location in the

Active Transaction. If this number is less than or equal to zero, the Transaction immediately attempts to enter the Next Sequential Block. Otherwise, the Transaction is placed on a special chain in the ASSEMBLY Block, called the Match Chain, to await the arrival of other members of its Assembly Set.

If the Active Transaction arrives to find other members of its

Assembly Set already on the Match Chain, the Active

Transaction is also placed on the chain and the Transaction count saved in the first chained Transaction is reduced by one.

When this count becomes 0, all related Transactions are removed from the Match Chain. All Transactions which have not been preempted at any Facility are then placed on the CEC behind their priority peers.

Preempted Transactions which have completed an assembly at a GATHER Block are not permitted to leave the Block until all preemptions have been cleared. More discussion of the preemption mechanism can be found in Section 9.4.

Preempted Transactions which have been removed from the Match Chain do not participate in later gatherings even though they remain in the GATHER Block.

GATHER Blocks differ from ASSEMBLE Blocks in that Transactions after the first are destroyed at an ASSEMBLE Block.

Special Restrictions

A must be positive.

Transactions which are currently preempted are not permitted to leave GATHER Blocks.

Refuse Mode

A Transaction is never refused entry to a GATHER Block.

Related Blocks

ADOPT - Set the Assembly Set of the Active Transaction.

ASSEMBLE - Wait for and destroy Assembly

Set members.

MATCH - Wait for Assembly Set member.

SPLIT - Create Transactions in the same

Assembly Set.

Related SNAs

A1 - Assembly Set. Return the Assembly Set of the Active Transaction.

MBEntnum - Match at Block. MBEntnum returns a 1 if there is a Transaction at Block Entnum which is in the same Assembly Set as the Active Transaction. MBEntnum returns a 0, otherwise.

Related Windows

Blocks Window - Online view of Block dynamics.

Transaction Snapshot - Picture of the state of a

Transaction in the simulation.

CEC Snapshot - Picture of the state of the Current Events Chain in the simulation.

FEC Snapshot - Picture of the state of the Future Events Chain in the simulation.

GENERATE

A GENERATE Block creates Transactions for future entry into the simulation.

GENERATE A,B,C,D,E Operands

A - Mean inter generation time. Optional. The operand must be

Null, Name, Number, String, ParenthesizedExpression, or

DirectSNA. You may not use Transaction Parameters.

B - Inter generation time half-range or Function Modifier. Optional. The operand must be Null, Name, Number, String,

ParenthesizedExpression, or DirectSNA. You may not use

Transaction Parameters.

C - Start delay time. Time increment for the first Transaction.

Optional. The operand must be Null, Name, Number, String,

ParenthesizedExpression, or DirectSNA. You may not use Transaction Parameters.

D - Creation limit. The default is no limit. Optional. The operand must be Null, Name, PosInteger, String, ParenthesizedExpression, or DirectSNA. You may not use

Transaction Parameters.

E - Priority level. Optional. Zero is the default. The operand

must be Null, Name, integer, String, ParenthesizedExpression, or DirectSNA. You may not use Transaction Parameters.

Example

GENERATE 0.1

This is the simplest way to use the GENERATE Block. This

Block causes a priority zero Transaction to enter the simulation every tenth of a time unit.

Action

When a simulation is begun, or an interactive Command is performed, any GENERATE Block which has not been "primed" is called upon to schedule its first Transaction. Such

Transactions are scheduled to enter the GENERATE Block and placed on the Future Events Chain if they have a positive time increment. Operand C can be used to specify a positive time increment for the first Transaction. Otherwise, the first time increment is calculated from operands A and B.

You cannot use Parameters in GENERATE Block operands. Newly GENERATEd Transactions do not have Parameters, and their entry into such a GENERATE Block would cause an Error Stop.

Before the new Transaction is created, Operand D is evaluated numerically to see if all the Transactions desired have been created. If the creation limit has not been exceeded, processing continues. The GENERATE Block then creates the new Transaction assigning it the next Transaction number, the priority from the E Operand, and the Transaction Mark Time is assigned the value in the absolute system clock. The new Transaction represents a new Assembly Set with one member.

The inter arrival time for the new Transaction is calculated from the A, B, and C operands. If only the A Operand is specified, it is evaluated numerically and used as the time increment. If the A and B operands are present, and B does not specify a function, both A and B are evaluated numerically and a random number between A-B and A+B, inclusively, is used as the time

increment. You can select which random number generator number is to be used as the source of the random number.

This is set in the "Random" page of the Model Settings

Notebook.

CHOOSE Edit / Settings

then select the Random page. Then fill in the desired random

number stream entity number in the entry box marked

"GENERATE". The installation default is to use random number stream number 1.

When Operand B is an FN class SNA, it is a special case called a "function modifier". In this case, the time increment is calculated by multiplying the result of the function by the evaluated A Operand.

If the C Operand is specified, it is evaluated numerically and used as the time increment for the first Transaction. If you wish to cause the first transaction(s) to arrive at time 0, you must use a separate GENERATE block with a creation limit in

Operand D and null values for Operands A and B. If Operand A and / or B is used and C=0, C will be interpreted as null. The following example will create three transactions at time 0.

GENERATE ,,0,3

If the time increment is strictly positive (nonzero), the Transaction is placed on the FEC, if it is zero the Transaction goes to the CEC behind its priority peers, if it is negative an Error Stop occurs.

Special Restrictions

Time values must not be negative.

Either Operand A or Operand D must be used.

GENERATE is the only Block which cannot be used in Manual Simulation Mode. Use a SPLIT

Block to create Transactions interactively.

Refuse Mode

A Transaction is never refused entry to a GENERATE Block.

Related Windows

CEC Snapshot - Picture of the state of the

Current Events Chain in the simulation.

FEC Snapshot - Picture of the state of the

Future Events Chain in the simulation.

INDEX

An INDEX Block updates a Parameter of the Active Transaction.

INDEX A,B

Operands

A - Parameter number. Parameter with source value. Required.

The operand must be Name, PosInteger,

ParenthesizedExpression, SNA, or SNA*Parameter.

B - Numeric value. Number to be added to contents of

Parameter. The result goes into Parameter 1. Required. The operand must be Name, Number, ParenthesizedExpression,

SNA, or SNA*Parameter.

Example

INDEX 2,11.7

In this example, when a Transaction enters the INDEX Block its Parameter number 1 is given the sum of 11.7 and the value of Parameter 2 of the Active Transaction.

Action

The INDEX Block adds the numeric equivalent of Operand B to the numeric equivalent of the value of any Transaction Parameter and puts the result into Parameter 1.

If the source Parameter does not exist, an Error Stop occurs.

Otherwise, if Parameter number 1 does not exist for the Active Transaction, it is created.

Special Restriction

A must be positive.

Refuse Mode

A Transaction is never refused entry to an INDEX Block.

Related SNA

PParameter or *Parameter - Parameter value.

Returns the value of Parameter Parameter.

Related Window

Transaction Snapshot - Picture of the state of a

Transaction in the simulation.

INTEGRATION

An INTEGRATION Block disables or enables the integration of a User Variable.

INTEGRATION A,B

Operands

A - User Variable. Required. The operand must be Name.

B - Integration state. Must be Null, ON, or OFF.

Examples

INTEGRATION Population

This is the simplest way to use the INTEGRATION Block. When a Transaction enters this INTEGRATION Block, the integration of the User Variable, Population, is set to the enabled state. This causes the User Variable to be integrated automatically with respect to simulated time. The default of

Operand B is ON.

INTEGRATION Population,OFF

In this example, the entry of the Active Transaction into the INTEGRATION Block assures that the integration of the User Variable Population is disabled. The automatic update of

Population will cease until the integration is again enabled.

Action

A INTEGRATION Block sets the state of an integration to either

ON, or OFF, that is, enabled or disabled.

The default of Operand B is ON, and need not be specified when the integration is to be activated.

Integrations are defined by INTEGRATE Commands, and are automatically begun in the active state. For integrations that are never interrupted, there is no need for INTEGRATION

Blocks in the simulation.

Each INTEGRATE Command can also define one or two threshold expressions. When the value of an integrated variable crosses from one side of a threshold to the other, a new Transaction is created and sent to a destination Block specified in the INTEGRATE Command. In this manner, Continuously integrated variables can be closely incorporated into the discrete side of your simulation. You can use them to perform important duties related to the state of the integrated variable, or simply to move the thresholds.

User Variables can be assigned new values discretely, as well as through integration. You can do so using an EQU Command, or a PLUS Assignment Statement. If you want such assignments to occur within the running of the simulation, you must define a PLUS Procedure that makes the assignment. For example, if you defined a PLUS Procedure as follows:

PROCEDURE Setpop(Pop_Level) BEGIN Population = Pop_Level ;

END ;

you could reinitialize the Population User Variable by entering a PLUS Block, such as

PLUS (Setpop(200))

or by using a parenthesized expression that invokes setpop( ) in some other Block.

See Chapter 4 for a detailed description of Continuous Simulation.

Refuse Mode

A Transaction is never refused entry to an INTEGRATION

Block.

Related Command

INTEGRATE - Define the derivative of a user variable for integration, and activate the integration.

Related Windows

Expressions Window - Online view of values of expressions.

Plot Window - Online view of a plot of up to 8 expressions.

JOIN

A JOIN Block adds the Active Transaction to a Transaction Group, or adds a number to a Numeric Group.

JOIN A,B

Operands

A - Group entity number. Group to which a member will be added. Required. The operand must be Name, PosInteger,

ParenthesizedExpression, SNA, or SNA*Parameter.

B - Numeric value. Number to be added to numeric Group. Optional. The operand must be Null, Name, Number, String,

ParenthesizedExpression, SNA, or SNA*Parameter.

Example

JOIN Solditems

This is the simplest way to use the JOIN Block. The Transaction entering the JOIN Block becomes a member of the

Transaction Group SoldItems.

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