Peter Lorenz | Simulation und Animation |
---|
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.
GENERATE
-Blocks. The attributes of the variable set are called
Parameters. Parameters can be used, to keep individual characteristic values.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 |
MPL j | Special Transit Time | Difference between the absolute time (AC1 ) and
the value of the floating point parameter j |
P Xj | Parameter value | for X = F| H | B | L: the value of the parameter with the name or number j |
START
is 1, a list of Transactions existing at the end of the simulation run
is written into the standard output.Name | NSA | Range of Values |
---|---|---|
Byte Paramter | PB j | -2^7 . . . 2^7-1 (INTEGER*1) |
Halfword Parameter | PH j | -2^15 . . . 2^15-1 (INTEGER*2) |
Fullword Parameter | PF j |
-2^31 . . . 2^31-1 (INTEGER*4) |
Floating Point Parameter | PL j |
Floating point number with double accuracy |
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 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
Operand | Contents | ||||||
---|---|---|---|---|---|---|---|
A | j specifies the name or number of a Parameter
| ||||||
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 |
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.E
, can be changed during a simulation run using the Block PRIORITY
.PRIORITY
A
.BUFFER
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.
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
MARK
sets the current time AC1
as the new start of the Transit Time measurement for the Transaction, entering this
Block.A
can be empty (the current time is assigned to the
mark-time-word of the Transaction) or contain xpr
PL
.
In that case the absolute time AC1
is assigned to the floating point
parameter with the number that corresponds to the value of xpr
. NSA | Contents |
---|---|
M1 |
Transit Time in relation to the value in the mark-time-word |
MPL j |
Transit Time in relation to the floating point parameter j |
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.
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.
Attribute | Explanation | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
XACT | The 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 . | ||||||||||||||||||
NXTBLK | The NXTBLK contains the next block, that the Transaction will enter. | ||||||||||||||||||
CHAIN | The CHAIN-attribute indicates the Chain, that a Transaction currently belongs to. Possible Chains are
| ||||||||||||||||||
SDPGFT** | This attribute contains the current value of the Transaction-Flag. The following values are possible:
| ||||||||||||||||||
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. |
TABULATE
,
die im folgenden Abschnitt 4.6. behandelt werden.",
"The model contains two TABLE
and TABULATE
Statements
explained in the next section 4.6.")?>. :
ASSIGN
-Block!BUFFER
-Block!MARK
-Block used for?Last Modified | Fri 05-27-11 06:54 GMT | |
English Translation: | S. Osterburg |
Comments please to:pelosim@yahoo.com