Peter Lorenz German smaller fonts Simulation und Animation

4.5. Attributes of Transactions

Until now we regarded Transactions as a homogeneous model elements without differences in their attribute sets. This is the approach of the queueing theory, that mainly deals with homogeneous streams of demands. In this chapter Transactions will be introduced as individuals, that differ in the number and type of their attributes.

Function Top

Attributes of Transactions are carriers of individual characteristic values.
The Fixed Attribute Set of every Transaction contains - among other values - the Transaction's identification number, its priority, its creation time and its current Block affilliation.
The Variable Attribute Set can be defined by the user in GENERATE-Blocks. The attributes of the variable set are called Parameters. Parameters can be used, to keep individual characteristic values.
Examples for Transactions with individual Attributes: Variable Attributes are neccessary to organize the simulation run. They can represent Transfer destinations, cycle counters, return addresses or running numbers. Every Transaction needs this information individually: Often it is not known how many Transactions are in a cycle or subprogram at the same time, which is why global counters or stacks for return addresses would not help much.

Numerical Standard Attributes Top

The following Attributes of Transactions, the Numerical Standard Attributes (NSA), are available at any time. These Attributes can only by used by the Transaction that own them, though. Along this line, the Attributes are local or hidden from others. Like all Standard Attributes they have their own symbolic names.
NSA Contents Explanation
XID1 Identification Number This number is assigned during the creation of a Transaction and increases by one with every created Transaction. Every number is assigned only once during a simulation run.
PR Priority The Priority can be any integer value. A high value marks a high Priority.
M1 Transit Time Time, since the creation of the Transaction or the last entrance into a MARK-Block without operand
MPLj Special Transit Time Difference between the absolute time (AC1) and the value of the floating point parameter j
PXj Parameter value for X = F| H | B | L: the value of the parameter with the name or number j
In the following example two Transactions are created. Because the D-operand of START is 1, a list of Transactions existing at the end of the simulation run is written into the standard output.


Parameters Top

Parameters are characteristics of Transactions, that the user can assign values as he sees fit and need. GPSS/H knows four types of parameters.
Name NSA Range of Values
Byte Paramter PBj-2^7 . . . 2^7-1 (INTEGER*1)
Halfword Parameter PHj-2^15 . . . 2^15-1 (INTEGER*2)
Fullword Parameter PFj -2^31 . . . 2^31-1 (INTEGER*4)
Floating Point Parameter PLj Floating point number with double accuracy
Some type definitions are not possible. There are no character string Parameters. The user must carefully select the correct parameter type himself, to avoid exceeding the value range.
The equipment of a Transaction with parameters is decided during its creation, and can not be changed later in the simulation run. If no parameters are declared, a Transaction is equipped with the default of 12 halfword parameters.
In both the GENERATE-Block and the SPLIT-Block, that will be introduced later, the desired equipment with parameters can be explicitly specified. In a GENERATE-Block, there can be a list starting with the operand F, that contains one entry per type at the most, in any order.
GENERATE 30,,100,5,,3PF,4PH In intervals of 30 units, beginning after 100 time units, Transactions are created. The creation stops with the fifth Transaction, i.e. after 220 units. Every Transaction gets 3 full word, and 4 half word Parameters.
GENERATE ,,,1,50,2PB,1PL At the beginning of the simulation a Transaction is created. It has the priority 50 and gets two byte Parameters and one floating point Parameter.
GENERATE 20,,,3,,0PH In intervals of 20 time units, beginning after 20 time units Transactions are created. After the the third Transaction the GENERATE-Block stops its activity. The created Transactions save memory: They have no Parameters.

The effect of these GENERATE-statements can be monitored directly in the standard output for Transactions, if the following demonstration program is started:


ASSIGN-Block, um den Parametern Werte zuzuweisen", "The program uses the ASSIGN Block to be explained later for assigning values to the Parameters")?>.

After parameters have been created with GENERATE they have the initial value 0. The value can be changed using the Blocks ASSIGN, INDEX, LOOP, COUNT, SELECT, ALTER and SCAN. GPSS/H allows a value assignment using the BLET-Block.

ASSIGN
changes the value of one or more parameters of an entering Transaction. Values can be assigned (default), be added (additional + sign in operand A) and be subtracted (additional - in A)
OperandContents
A j specifies the name or number of a Parameter
j The value specified in B is to be assigned to the Parameter j
j+ The value specified in B is to be added to the old value of parameter j.
j- The value specified in B is to be subtracted from the old value of parameter j.
B Expression the value of which is to be assigned, added or subtracted.
C oder D Type of Parameter, specified by PB | PH | PF | PL
ASSIGN 1,13,,PH The value 13 is assigned to the halfword parameter number 1.
ASSIGN AMOUNT,40000,PF The value 40000 is assigned to the full word parameter with the name AMOUNT.
ASSIGN 2-5,RVEXPO(1,0.5),PL An exponentially distributed random number is assigned to every floating point parameter with the number 2 to 5.
ASSIGN BLENTRY,N(AAA),PH The current number of entrances into the Block AAA is assigned to the halfword parameter BLENTRY.
ASSIGN BLENTRY+,1,PH
ASSIGN BLENTRY,PH(BLENTRY)+1,PH
are equivalent

This example is only to demonstrate the effect of ASSIGN-Blocks. The effect can be monitored in the standard output of the program. Using this output you should think about how numbers and names of parameters are assigned during the compilation time. Perhaps you experiment with more ASSIGN-Blocks and other parameter numbers and names.

PrioritiesTop

The priority class or priority is a Transaction characteristic, that decides the order of handling of competing Transactions. Whenever more than one Transactions are waiting for a certain state condition, those with the highest priority have an advantage. They stand higher in the Current Events Chain (CEC), and are checked and moved first by the internal control. This way they are the first to enter a Facility that has become available. In the CEC the priority class is a primary sort criterion.
The priority, specified during the creation of a Transaction with the operand E, can be changed during a simulation run using the Block PRIORITY.
PRIORITY
is a Block that changes the priority of an entering Transaction. The new value for the priority must be specified as operand A.
BUFFER
is a block that restarts the processing of the CEC at the current time. This Block is used to stop a Transaction entering it and to restart all Transactions in the CEC with a higher priority. The Block has no operands.

SLX

In this program it is not possible to find out, whether hotel guests really spent less time in the barber shop than the ordinary customers. In the next section will be explained, how transit times of Xacts can be measured.

Transit TimesTop

Transit Time
M1 verfügbar und errechnet sich als Differenz der aktuellen Zeit zum Mark-Zeit-Wort der Transaktion", "is the simulation time that has passed since a Transaction has been created or since it has last been marked. The Transit Time of a Transaction is available as the Numerical Standard Attribute M1. It is the difference between the current time and the mark-time-word of the Transaction")?>.

To record the duration of not only one but several life stages of a Transaction, floating point parameters can be used. For both cases the MARK-Block is applicable.

MARK
is a Block, that assigns a new value to the mark-time-word of an entering Transaction. The initial value of this attribute is the time, when the Transaction entered the model (i.e. when it was created). MARK sets the current time AC1 as the new start of the Transit Time measurement for the Transaction, entering this Block.
The operand A can be empty (the current time is assigned to the mark-time-word of the Transaction) or contain xprPL. In that case the absolute time AC1 is assigned to the floating point parameter with the number that corresponds to the value of xpr.
The following Numerical Standard Attributes are connected with this Block:
NSA Contents
M1 Transit Time in relation to the value in the mark-time-word
MPLj Transit Time in relation to the floating point parameter j

Standardausgabe und Resultatdatei herunterladen", "User without acces to the server can download the Standard Output and the Result File")?>.
SLX

In the above example program Transit Times of Transactions have been recorded in arrays but where not analyzed or displayed.

This will be possible in chapter 4.6 when the model element class Table will be introduced and applied to the Hotel Barber and other examples. The following chapter may be passed over, it contains a detailed description of the output of Transactions and their Attributes.

Output of Transaction AttributesTop

The Standard Output of Transactions contains the values of attributes for all Transactions in the system. Some of them have been introduced in chapter 4.1. Now they will be explained to the detail.
The following table contains all Attributes, that appear in the standard output for Transactions. This output is not displayed after a normal run of a program, because it can be quite lengthy. It is displayed when a simulation run terminates because of a runtime error or if the D-operand of START is specified as 1.

It is advisable to have a look at the standard output for some of the example programs of the previous chapter and to interpret it. In chapter 4.1. this has already been briefly addressed.

The following table again stands here for reference and not for reading, particularly because it contains some topics that have not yet been dealed with.

AttributeExplanation
XACTThe attribute XACT contains the identification number of the Transaction. This number is assigned during the creation with increasing values for every new Transaction. Every number is only assigned once during a simulation run
CURBLK The CURBLK-attribute contains the name or number of the block where the Transaction is currently in. If the Transaction is in the Future Events Chain (FEC), to enter the model for the first time in a GENERATE-Block, the value of CURBLK is BIRTH.
NXTBLKThe NXTBLK contains the next block, that the Transaction will enter.
CHAINThe CHAIN-attribute indicates the Chain, that a Transaction currently belongs to. Possible Chains are
NameChain
CECCurrent Events Chain
FECFuture Events Chain
INTInterrupt Chain
MCHMatching Chain (Waiting for MATCH)
ASMAssembling Chain (Waiting for ASSEMBLE)
GTHGathering Chain (Waiting for GATHER)
UCHUser Chain
SYSSystem Chain
SDPGFT**This attribute contains the current value of the Transaction-Flag. The following values are possible:
FlagExplanation
SScan/Skip-Indicator of the Current Events Chain
DDelay indicator for TRANSFER SIM
PPreemption
GXact leaves GENERATE-Block
FXact can seize Facility that is blocked by FUNAVAIL
TTrace Flag (set by TRACE-Block)
*TRAP Flag for interactive Debugging-Mode
MARK-TIME The MARK-TIME-Attribute contains the mark-time of a Transaction. This is either the entrance time of a Transaction into the model or the time of the last entrance into a MARK-Block, that changed the MARK-time.
MOVE-TIME If the Transaction is in an Interrupt Chain, the MOVE-TIME-Attribute contains the remaining delay from an ADVANCE-block.
If the Xact is in the FEC, MOVE-TIME is the time, when the FEC will be left by the Transaction.
In all other cases, the Attribute contains the time, when the Xact was last moved from the FEC to the CEC.
PRIORITY The PRIORITY-Attribute holds the Priority value of the Transaction.
PC PC is the Preemption-Counter of the XAct. This counter increases whenever the Transaction is superseded with PREEMPT or delayed by FUNAVAIL.
The counter decreases, when the preemption or delay ends.
ASMSET Copies of a Xact created by SPLIT form an Assembly Set. ASMSET is the number of this set. It is equal to the number of the original XAct.
ADDR The ADDR-Attribute contains the current machine address of the XAct.

Shopping Center Top

The model of a Shopping Center is to consider, that customers chose individual ways through the market and buy different amounts of goods.
TABLE und TABULATE, die im folgenden Abschnitt 4.6. behandelt werden.", "The model contains two TABLE and TABULATE Statements explained in the next section 4.6.")?>


Standardausgabe und Resultatdatei herunterladen", "User without acces to the server can download the Standard Output and the Result File")?>.
SLX

. :

Quizzes Top

  1. What are Transaction Attributes used for?
  2. How can Attributes of Transactions be classified?
  3. Name examples of Numerical Standard Attributes for Transaction Attributes!
  4. What Types of Transaction Parameters do you know?
  5. Which Blocks can change the values of Transaction Parameters?
  6. Describe the function of the ASSIGN-Block!
  7. What are Transaction Priorities used for?
  8. Describe the function of the BUFFER-Block!
  9. How can the Transit Times of Transactions be recorded?
  10. What is the MARK-Block used for?
  11. Describe some components of the output of Transactions!
SAHome previous next up Germansmaller fonts Top Line
Last Modified Fri 05-27-11 06:54 GMT Valid CSS!
English Translation:S. Osterburg

Comments please to:pelosim@yahoo.com