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

gpss_manual

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

Action

When a Transaction enters a RELEASE Block it removes itself from contention for the Facility. This can happen in two ways.

If the Active Transaction owns the Facility, it gives up ownership and proceeds to the Next Sequential Block.

If the Active Transaction has been preempted from ownership of the Facility, it is removed from the Interrupt Chain of the

Facility. Ownership is not affected, because some other

Transaction is the owner. If the Active Transaction is presently clear of all preemptions, it may now move normally in the simulation.

In any case, the Active Transaction is removed from ownership of or contention for the Facility and attempts to enter the Next

Sequential Block. If it neither owns, nor is preempted at the

Facility, an Error Stop occurs.

If the Active Transaction gives up ownership of the Facility, the next owner is taken from the Pending Chain, the Interrupt Chain, and finally the Delay Chain. If there are now Interrupt

Mode PREEMPTs pending at this Facility, the first is given ownership of the Facility. Otherwise, ownership is returned to the most recently preempted Transaction. If both the Pending Chain (waiting Interrupt Mode PREEMPTs) and the Interrupt Chain (preempted Transactions) are empty, the highest priority Transaction on the normal Delay Chain is given ownership. If there are no Transactions waiting, the Facility becomes idle.

When a new owner is chosen from the Delay Chain or the

Pending Chain, it enters the SEIZE or PREEMPT Block immediately, and then is scheduled by placing it on the CEC behind its priority peers. After this entry, the current Active Transaction in the RELEASE Block continues its movement.

Special Restriction

An entering Transaction must own, or currently be preempted at, the Facility. Otherwise an Error

Stop occurs.

Refuse Mode

A RELEASE Block never refuses entry to a Transaction.

Related SNAs

FEntnum - Facility busy. If Facility Entnum is currently busy, FEntnum returns 1. Otherwise FEntnum returns 0.

FCEntnum - Facility capture count. The number of times Facility Entnum has become owned by a

Transaction.

FIEntnum - Facility Entnum interrupted. If Facility Entnum is currently preempted, FIEntnum returns 1. Otherwise FIEntnum returns 0.

FREntnum - Facility utilization. The fraction of time Facility Entnum has been busy. FREntnum is expressed in parts-per-thousand and therefore returns an real value 0-1000, inclusively.

FTEntnum - Average Facility holding time. The average time Facility Entnum is owned by a capturing Transaction.

FVEntnum - Facility in available state. FV Entnum returns 1 if Facility Entnum is in the available state, 0 otherwise.

Related Window

Facilities Window - Online view of Facility Entity dynamics.

REMOVE

A REMOVE Block removes members from a Numeric Group or a Transaction Group.

REMOVE O A,B,C,D,E,F Operands

O - Conditional operator. Relationship of D to E for removal to

occur. These choices are explained below. Optional. The operator must be Null, E, G, GE, L, LE, MAX, MIN, or NE.

A - Group number. Group from which a member or members will be removed. Required. The operand must be Name,

PosInteger, ParenthesizedExpression, SNA, or

SNA*Parameter.

B - Removal limit. The maximum number of Transactions to be removed. Optional. The operand must be ALL, Null, Name,

PosInteger, ParenthesizedExpression, SNA or SNA*Parameter.

C - Numeric value. Numeric value to be removed from a

Numeric Group. Optional. The operand must be Null, Name,

Number, String, ParenthesizedExpression, SNA or

SNA*Parameter.

D - Test value. PR or Parameter number. The member attribute

which determines whether each Group member Transaction should be removed, or PR to use the Transaction priority for the determination. It is evaluated with respect to the

Transaction Group member. Optional. The operand must be

PR or Null, Name, PosInteger, ParenthesizedExpression, SNA, or SNA*Parameter.

E - Reference value. The value against which the D Operand is

compared. The reference value is evaluated with respect to the

Active Transaction. Optional. The operand must be Null, Name,

Number, String, ParenthesizedExpression, SNA or

SNA*Parameter.

F - Block number. The alternate destination for the entering

Transaction. Optional. The operand must be Null, Name,

PosInteger, ParenthesizedExpression, SNA or SNA*Parameter.

Example

REMOVE Inventory

This is the simplest way to use the REMOVE Block. The Transaction entering the REMOVE Block is tested for membership in the Transaction Group named Inventory. If the Transaction is a member it is removed from the Group.

REMOVE G 3,10,,300,11.6,Jump_Block

In this example, Transaction Group 3 is scanned for Transactions which have a value in their Parameter 300 which is greater than 11.6. The first 10 Transactions which meet the test are removed from the Transaction Group. If 10

Transactions cannot be found which pass the test, the entering Transaction attempts to enter the Block labeled Jump_Block.

Otherwise, it proceeds to the Next Sequential Block.

Action

A REMOVE Block excludes numeric values from membership in a Numeric Group, or Transactions from membership in a Transaction Group. Transactions are not displaced from their context. However, there is one exception. The Transaction entering the REMOVE Block may be redirected according to the F Operand.

A REMOVE Block operates in Numeric Mode if Operand C is used. In Numeric Mode, operands A and C are evaluated numerically and the number specified by C is tested for membership in the numeric Group specified by A, which is truncated. If the result from Operand C is a member of the

Numeric Group, it is removed from the Group. If the numeric value was not a member of the numeric Group and the F Operand is used, the entering Transaction proceeds to the Block specified by F. Otherwise, the entering Transaction proceeds to the next sequential Block. Only operands A, C, and F can be used in Numeric Mode. There is some loss of efficiency when non-integers are used in Numeric Groups.

A REMOVE Block operates in Transaction Mode if Operand C is not used. In Transaction Mode, there are several options available to select the Transaction(s) to be removed from the

Transaction Group. If you do not specify operands B, D, or E, then only the Transaction entering the REMOVE Block is removed. This mode of operation is called self removal. Otherwise, a "group scan" is performed.

In a group scan, you may test each Transaction for removal by using the conditional operator and/or operands D and E. Also you may limit the number of Transactions to be removed by the

B Operand.

Operand D always refers to the Transaction Group member under test. Notice that any SNA may be used in Operand D.

Any SNA which requires a Transaction for its evaluation uses the current Transaction Group member under test. The result returned by any SNA other than PR is used as a Parameter number whose value is returned as the final result.

In a group scan you may use a conditional operator to specify the relationship between the Transaction attribute (Operand D) and the reference value (Operand E) which will initiate a removal of the Transaction. Both are evaluated numerically.

The default for the conditional operator is E for equality. If you use no conditional operator, but you use Operand D and

Operand E, the values must be equal for the Transaction to be removed from the Transaction Group. If MIN or MAX is used as the conditional operator, all Transactions with the greatest or least attribute (Operand D) are removed, up to the limit count (Operand B).

The B Operand cuts off the group scan when it equals the number of Transactions that have been removed. The default is ALL. If there is no attribute test, that is, if D is not specified,

Transactions are removed until the removal count equals B or until the Group is empty.

The F Operand is used in both Numeric Mode and Transaction

Mode. It indicates an alternate destination to be taken by the entering Transaction when an exception condition occurs. The F Operand is used for the destination Block under the following conditions:

In Numeric Mode, if the numeric value (C

Operand) was not a member of the Group.

In Self Removal Mode, if the Transaction entering the REMOVE Block was not a member of the Transaction Group.

In Group Scan Mode, if no Transaction is removed.

In Group Scan Mode, if the removal count specified by B cannot be reached.

If the F Operand is not used, the entering Transaction always goes to the Next Sequential Block.

Conditional Operators

The conditional operator may be E, G, GE, L, LE, MAX, MIN, or

NE. If no conditional operator is used, E (equality) is assumed.

When the condition is true, the Transaction being tested is removed from the Group. The conditions are defined as follows:

E - The Transaction attribute specified by Operand D must be equal to the reference value specified by Operand E for the Transaction to be removed from the Group.

G - The Transaction attribute specified by Operand D must be greater than the reference value specified by Operand E for the Transaction to be removed from the Group.

GE - The Transaction attribute specified by Operand D must be greater than or equal to the reference value specified by Operand E for the Transaction to be removed from the Group.

L - The Transaction attribute specified by Operand D must be less than the reference value specified by Operand E for the Transaction to be removed from the Group.

LE - The Transaction attribute specified by Operand D must be less than or equal to the reference value specified by Operand E for the

Transaction to be removed from the Group.

MAX - The Transaction attribute specified by Operand D must be equal to the largest such attribute of all Transactions in the Group for the Transaction to be removed from the Group.

MIN - The Transaction attribute specified by

Operand D must be equal to the smallest such

attribute of all Transactions in the Group for the

Transaction to be removed from the Group.

NE - The Transaction attribute specified by

Operand D must be unequal to the reference value specified by Operand E for the Transaction to be removed from the Group.

If no conditional operator is used in Group Scan Mode, E is assumed.

Special Restrictions

If a Numeric Group is referenced, you must not use a conditional operator.

If a Numeric Group is referenced, you must not use Operand B, D, or E.

If Operand D is used, then you must use Operand E or else you must use the conditional operator MIN or MAX.

If Operand E is used, you must use Operand D.

If MIN or MAX is used for the conditional operator, Operand D must be used and Operand

E must not be used.

Refuse Mode

A Transaction is never refused entry to a REMOVE Block.

Related Blocks

Transactions and numbers are added to Groups by JOIN

Blocks. Transactions in Groups can be referenced by ALTER, EXAMINE, REMOVE, and SCAN Blocks. Numbers in Numeric

Groups can be referenced by EXAMINE Blocks.

Related SNAs

GNEntnum - Numeric Group count. GNEntnum returns the membership count of Numeric Group Entnum.

GTEntnum - Transaction Group count. GTEntnum returns the membership count of Transaction Group Entnum.

Related Windows

Numeric Groups Snapshot - Picture of the state of the Numeric Groups in the simulation.

Transaction Groups Snapshot - Picture of the

state of the Transaction Groups in the simulation.

RETURN

A RETURN Block releases ownership of a Facility, or removes a preempted Transaction from contention for a Facility.

RETURN A

Operand

A - Facility number. Required. The operand must be Name,

PosInteger, ParenthesizedExpression, SNA, or

SNA*Parameter.

Example

RETURN Teller1

In this example, when a Transaction which owns the Facility named Teller1 enters the RETURN Block, it gives up ownership of the Facility.

Action

When a Transaction enters a RETURN Block it removes itself from contention for the Facility. This can happen in two ways.

If the Active Transaction owns the Facility Entity, it gives up ownership and proceeds to the Next Sequential Block.

If the Active Transaction has been preempted from ownership of the Facility, it is removed from the Interrupt Chain of the Facility. Ownership is not affected, because some other Transaction is the owner. If the Active Transaction is presently clear of all preemptions, it may now move normally in the simulation.

In any case, the Active Transaction is removed from ownership of or contention for the Facility and attempts to enter the Next Sequential Block. If it neither owns, nor is preempted at the Facility, an Error Stop occurs.

If the Active Transaction gives up ownership of the Facility, the next owner is taken from the Pending Chain, the Interrupt

Chain, and finally the Delay Chain. If there are now Interrupt

Mode PREEMPTs pending at this Facility, the first is given ownership of the Facility. Otherwise, ownership is returned to the most recently preempted Transaction. If both the Pending Chain (waiting Interrupt Mode PREEMPTs) and the Interrupt Chain (preempted Transactions) are empty, the highest priority Transaction on the normal Delay Chain is given ownership. If there are no Transactions waiting, the Facility becomes idle.

When a new owner is chosen from the Delay Chain or the

Pending Chain, it enters the SEIZE or PREEMPT Block immediately, and then is scheduled by placing it on the CEC behind its priority peers. After this entry, the current Active

Transaction in the RETURN Block continues its movement.

Special Restriction

An entering Transaction must own, or currently be preempted at, the Facility. Otherwise an Error

Stop occurs.

Refuse Mode

A RETURN Block never refuses entry to a Transaction.

Related SNAs

FEntnum - Facility busy. If Facility Entnum is currently busy, FEntnum returns 1. Otherwise FEntnum returns 0.

FCEntnum - Facility capture count. The number of times Facility Entnum has become owned by a

Transaction.

FIEntnum - Facility Entnum interrupted. If Facility Entnum is currently preempted, FIEntnum returns 1. Otherwise FIEntnum returns 0.

FREntnum - Facility utilization. The fraction of time Facility Entnum has been busy. FREntnum is expressed in parts-per-thousand and therefore returns an real value 0-1000, inclusively.

FTEntnum - Average Facility holding time. The average time Facility Entnum is owned by a capturing Transaction.

FVEntnum - Facility in available state. FV Entnum returns 1 if Facility Entnum is in the available state, 0 otherwise.

Related Window

Facilities Window - Online view of Facility Entity dynamics.

SAVAIL

A SAVAIL Block ensures that a Storage Entity is in the available state.

SAVAIL A

Operand

A - Storage name or number. Required. The operand must be

Name, PosInteger, ParenthesizedExpression, SNA, or

SNA*Parameter.

Example

SAVAIL MotorPool

In this example, when a Transaction enters the SAVAIL Block, the Storage Entity MotorPool is assured to be in the available state.

Action

An SAVAIL Block ensures that a Storage Entity is in the available state. If any Transactions are waiting on the Delay Chain of the Storage, they are given a chance to have their storage requests satisfied by the Storage Entity according to the first-fit-with-skip discipline. Those Transactions whose storage requests cannot be satisfied remain on the Delay

Chain of the Storage Entity.

If the Storage Entity is already in the available state, the SAVAIL Block has no effect.

Refuse Mode

A Transaction is never refused entry to a SAVAIL Block.

Related Command

A Storage Entity must be defined in a STORAGE Command before it can be updated by an SAVAIL Block. The STORAGE

Command must exist in the model, or must be sent to the

Simulation Object interactively, before a Transaction can enter the SAVAIL Block. Any attempt to do so before the Storage

Entity is defined, cases an Error Stop.

A Storage Entity can be redefined by an interactive STORAGE Command.

Related SNAs

REntnum - Unused storage capacity. The storage content (or "token" spaces) available for use by entering Transactions at Storage Entity

Entnum.

SEntnum - Storage in use. SEntnum returns the amount of storage content (or "token" spaces) currently in use by entering Transactions at Storage Entity Entnum.

SAEntnum - Average storage in use. SAEntnum returns the time weighted average of storage capacity (or "token" spaces) in use at Storage Entity Entnum.

SCEntnum - Storage use count. Total number of storage units that have been entered in (or "token" spaces that have been used at) Storage Entity Entnum.

SEEntnum - Storage empty. SEEntnum returns

1 if Storage Entity Entnum is completely unused,

0 otherwise.

SFEntnum - Storage full. SFEntnum returns 1 if

Storage Entity Entnum is completely used, 0 otherwise.

SREntnum - Storage utilization. The fraction of total usage represented by the average storage in use at Storage Entity Entnum. SREntnum is expressed in parts-per-thousand and therefore returns an real value 0-1000, inclusively.

SMEntnum - Maximum storage in use at Storage Entity Entnum. The "high water mark".

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