Lecture 11 - Introduction To GPSS
Lecture 11 - Introduction To GPSS
Chapter 11
Introduction to GPSS
a l
ep
itn
1
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
1
General Description
- Blocks Æ activities
- Lines Æ sequence of activities
- For a choice, more than one line leaves a
block and the condition for the choice is stated
at the block
- Entities move through the system e.g.
messages in a communication system, motor
vehicles in transportation ..
Block
- Name of block
a l
- Set of data fields (A,B, C, …)
ep
itn
2
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
2
General Description
Resources
GPSS Entities Expressions Queues
Block statements Logic Switches Storages
Reports Plot Data streams
Savevalue Tables User chains
Math libraries (RNGs, Statistical Analysis, etc.)
GPSS Entities
Transaction Block
Facility Function
Logic switch Matrix
Queue Storage
Save value Table
l
User chain Variable
a
ep
Numeric group Transaction group
itn
3
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
3
General Description
a l
TABLE define a table entity
ep
VARIABLE define a variable entity
itn
4
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
4
General Description
GPSS – Blocks
a l
ep
itn
5
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
5
General Description
GPSS – Blocks
- GPSS block diagram consists of many blocks
- An identification number called a ‘location’ is given to each
block
- Movement of transactions is usually from one block to the block
with the next highest location
- Blocks can be given names for the identification if required
a l
ep
itn
6
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
6
Transaction
a l
- ASSIGN, MARK, TRANSFER SUB, SELECT, SPLIT, COUNT
ep
blocks create a transaction parameter
itn
7
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
7
Transaction
Active transaction
- Active transaction go as far as it can
- When it can not move further, another transaction is chosen to
be active
- There can be no more than one active transaction
a l
ep
itn
8
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
8
GPSS Blocks
ADVANCE
An ADVANCE Block delays the progress of a Transaction for a
specified amount of simulated time.
ADVANCE A,B
Operands
A - The mean time increment. Required. The operand must be Name,
Number, String, ParenthesizedExpression, SNA or SNA*Parameter.
B - The time half-range or, if a function, the function modifier. Optional.
The operand must be Null, Name, Number, String,
ParenthesizedExpression, SNA, or SNA*Parameter.
Example
ADVANCE 101.6, 50.3
a l
This example creates a Block which chooses a random number between
ep
51.3 and 151.9, inclusively (i.e. 101.6 plus or minus 50.3), and
delays the entering Transaction that amount of simulated time. 9
itn
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
9
GPSS Blocks
ASSIGN
ASSIGN Blocks are used to place or modify a value in a
Transaction Parameter.
ASSIGN A,B,C
Operands
A - Parameter number of the Active Transaction. Required.
The operand must be Name, PosInteger, ParenthesizedExpression,
SNA, or SNA*Parameter, followed by +, -, or Null.
B - Value. Required. the operand must be Name, Number, String,
ParenthesizedExpression, SNA, or SNA*Parameter.
C - Function number. Optional. The operand must be Null, Name,
PosInteger, ParenthesizedExpression, SNA or SNA*Parameter.
Examples
ASSIGN 2000, 150.6
l
This is the simplest way to use the ASSIGN Block. The value 150.6 is assigned to
a
Parameter number 2000 of the entering Transaction. If no such Parameter
ep
exists, it is created.
itn
10
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
10
GPSS Blocks
DEPART
A DEPART Block registers statistics which indicate a reduction
in the content of a Queue Entity.
DEPART A,B
Operands
A - Queue Entity name or number. Required. The
operand must be Name, PosInteger, ParenthesizedExpression,
SNA or SNA*Parameter.
B - Number of units by which to decrease content of the Queue Entity.
Default value is 1. Optional. The operand must be Null, Name,
PosInteger, String, ParenthesizedExpression, SNA, or SNA*Parameter.
Example
DEPART WaitingLine
a l
In this example the content of the Queue Entity named WaitingLine is reduced by
ep
one and the associated statistics accumulators are updated.
itn
11
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
11
GPSS Blocks
ENTER
When a Transaction attempts to enter an ENTER Block, it either takes or
waits for a specified number of storage units.
ENTER A,B
Operands
A - Storage Entity name or number. Required. The operand
must be Name, PosInteger, ParenthesizedExpression, SNA or
SNA*Parameter.
B - Number of units by which to decrease the available storage capacity. Default
value is 1. Optional. The operand must be Null, Name, PosInteger,
ParenthesizedExpression, SNA, or SNA*Parameter.
Example
ENTER Toolkit, 2
In this example the Active Transaction demands 2 storage units from the storage
l
units available at the Storage Entity named Toolkit. If there are not enough storage
a
units remaining in the Storage Entity, the Transaction comes to rest on the Delay
ep
Chain of the Storage Entity.
itn
12
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
12
GPSS Blocks
GATE
A GATE Block alters Transaction flow based on the state of an entity.
GATE O A,B
Operands
O - Conditional operator. Condition required of entity to be tested
for successful test. Required. The operator must be FNV, FV, I, LS,
LR, M, NI, NM, NU, SE, SF, SNE, SNF, SNV, SV, or U.
A - Entity name or number to be tested. The entity type is implied
by the conditional operator. Required. The operand must be Name,
PosInteger, ParenthesizedExpression, SNA, or SNA*Parameter.
B - Destination Block number when test is unsuccessful. Optional. The operand
must be Null, Name, PosInteger, ParenthesizedExpression, SNA,
SNA*Parameter.
Examples
GATE SNF MotorPool
l
In this example of a "Refuse Mode" GATE Block, the Active Transaction enters the GATE
a
Block if the Storage Entity named MotorPool is not full (i. e. if at least 1 unit of
ep
storage is available). If the Storage is full, the Active Transaction is blocked until 1 or
more storage units become available.
itn
13
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
13
GPSS Blocks
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.
l
Example
a
GENERATE 0.1
ep
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.
itn
14
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
14
GPSS Blocks
LEAVE
A LEAVE Block increases the accessible storage units at a
Storage Entity.
LEAVE A,B
Operands
A - Storage Entity name or number. Required. The operand
must be Name, PosInteger, ParenthesizedExpression, SNA, or
SNA*Parameter.
B - Number of storage units. The default is 1. Optional. The operand must be Null,
Name, PosInteger, ParenthesizedExpression, SNA, or SNA*Parameter.
Example
LEAVE RepairMen,10
a l
In this example, when a Transaction enters the LEAVE Block, the available storage
ep
units at the Storage Entity named RepairMen is increased by 10.
itn
15
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
15
GPSS Blocks
LINK
A LINK Block controls the placement of the Active Transaction on the User Chain
of a Userchain Entity.
LINK A,B,C
Operands
A - Userchain number. The Userchain Entity which may receive the entering
Transaction. Required. The operand must be Name, PosInteger,
ParenthesizedExpression, SNA, or SNA*Parameter.
B - Chain ordering. The placement of new Transactions on the Userchain. Required. The operand must be
LIFO, FIFO, ParenthesizedExpression, SNA, or SNA*Parameter.
C - Next Block location. The destination Block for Transactions which find the Link Indicator of the
Userchain in the off state (reset). Optional. The operand must be Null, Name, PosInteger,
ParenthesizedExpression, SNA or SNA*Parameter.
Example
LINK OnHold,FIFO
In this example, the Active Transaction is placed at the end of the User Chain Entity named OnHold. It is
removed from all chains except Transaction Groups and Interrupt Chains. In other words,
a l
preemptions are not cleared. The Transaction remains on the User Chain until some other
ep
Transaction enters an UNLINK Block and specifically removes it. In the present example, the
Transaction is placed at the end of the User Chain named OnHold.
itn
16
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
16
GPSS Blocks
LOGIC
A LOGIC Block changes the state of a Logicswitch entity.
LOGIC O A
Operands
O - Logic operator. Required. The operator must be S, R,
or I.
A - Logicswitch Entity number. Required. The operand
must be Name, PosInteger, ParenthesizedExpression, SNA, or
SNA*Parameter.
Example
LOGIC S PowerSwitch
l
In this example, the Logicswitch Entity named PowerSwitch is left in the true or
a
"set" state.
ep
itn
17
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
17
GPSS Blocks
MARK
A MARK Block places an absolute clock time stamp into the Active
Transaction or into its Parameter.
MARK A
Operand
A - Parameter number. Parameter to receive value of system clock.
Optional. The operand must be Null, Name, PosInteger,
ParenthesizedExpression, SNA, or SNA*Parameter.
Examples
MARK Beginning
In this example, when a Transaction enters the MARK Block, its Transaction Parameter
named Beginning is given a value equal to the value of the absolute system clock,
AC1.
l
MARK
a
ep
In this example, when a Transaction enters the MARK Block, its Mark Time is set equal to
the value of the absolute system clock.
itn
18
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
18
GPSS Blocks
PRIORITY
A PRIORITY Block sets the priority of the Active Transaction.
PRIORITY A,B
Operands
A - New priority value. Required. The operand must be Name,
integer, String, ParenthesizedExpression, SNA, or SNA*Parameter.
B - Buffer option. Places Active Transaction behind priority peers on CEC.
Optional. The operand must be BU or Null.
Example
PRIORITY 10
In this example any entering Transaction is made to have a priority of 10.
a l
ep
itn
19
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
19
GPSS Blocks
QUEUE
A QUEUE Block updates Queue Entity statistics to reflect an
increase in content.
QUEUE A,B
Operands
A - Queue Entity name or number. Required. The operand
must be Name, PosInteger, ParenthesizedExpression, SNA, or
SNA*Parameter.
B - Number of units by which to increase the content of the Queue Entity. Default
value is 1. Optional. The operand must be Null, Name, PosInteger,
ParenthesizedExpression, SNA, or SNA*Parameter.
Example
a l
QUEUE WaitingLine
ep
In this example the content of the Queue Entity named WaitingLine is increased
by one and the associated statistics accumulators are updated.
itn
20
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
20
GPSS Blocks
RELEASE
A RELEASE Block releases ownership of a Facility, or removes
a preempted Transaction from contention for a Facility.
RELEASE A
Operand
A - Facility number. Required. The operand must be Name,
PosInteger, ParenthesizedExpression, SNA, or SNA*Parameter.
Example
RELEASE Teller1
In this example, when a Transaction which owns the Facility Entity named Teller1
enters the RELEASE Block, it gives up ownership to the Facility.
a l
ep
itn
21
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
21
GPSS Blocks
SAVEVALUE
A SAVEVALUE Block changes the value of a Savevalue Entity.
SAVEVALUE A,B
Operands
A - Savevalue Entity number. Required. May be followed by + or - to
indicate addition or subtraction to existing value. Required. The
operand must be Name, PosInteger, ParenthesizedExpression, SNA, or
SNA*Parameter, followed by +, -, or Null.
B - The value to be stored, added, or subtracted. Required. The operand must be Name,
Number, String, ParenthesizedExpression, SNA, or SNA*Parameter.
Examples
SAVEVALUE Account,99.95
In this example, the Savevalue Entity named Account takes on the value 99.95.
SAVEVALUE The_Bard,"A rose by any other name ..."
a l
In this example, the Savevalue Entity named The_Bard is assigned a string. If the Savevalue
ep
Entity does not exist, it is created.
itn
22
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
22
GPSS Blocks
SEIZE
When the Active Transaction attempts to enter a SEIZE Block, it waits for
or acquires ownership of a Facility Entity.
SEIZE A
Operand
A - Facility name or number. Required. The operand must be Name,
PosInteger, ParenthesizedExpression, SNA, or SNA*Parameter.
Example
SEIZE Teller1
In this example, when a Transaction attempts to enter the SEIZE Block, the state of the
Facility named Teller1 is tested. If it is idle, ownership is given to the Active
Transaction, which is allowed to enter the SEIZE Block and proceed to the Next
l
Sequential Block (NSB). If the Facility is busy (owned), the Active Transaction comes
a
to rest on the Delay Chain of the Facility.
ep
itn
23
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
23
GPSS Blocks
TABULATE
A TABULATE Block triggers the collection of a data item in a Table Entity.
TABULATE A,B
Operands
A - Table Entity name or number. Required. The operand must be Name,
PosInteger, ParenthesizedExpression, SNA, or SNA*Parameter.
B - Weighting factor. Optional. The operand must be Null, Name, Number,
ParenthesizedExpression, SNA, or SNA*Parameter.
Example
TABULATE Sales
When a Transaction enters this TABULATE Block, the Table Entity named Sales is found.
Sales must have been defined in a TABLE Command. Then the statistics associated
l
with the table are updated with no weighting.
a
ep
itn
24
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
24
GPSS Blocks
TERMINATE
A TERMINATE Block removes the Active Transaction from the
simulation and optionally reduces the Termination Count.
TERMINATE A
Operand
A - Termination Count decrement. Default is 0. Optional. The
operand must be Null, Name, PosInteger, ParenthesizedExpression,
SNA, or SNA*Parameter.
Example
TERMINATE 1
In this example, when a Transaction enters the TERMINATE Block it is removed
from the simulation. Also, the Termination Count of the simulation, which is
a l
set by a START Command is decremented by 1.
ep
itn
25
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
25
GPSS Blocks
TEST
A TEST Block compares values, normally SNAs, and controls the destination of the
Active Transaction based on the result of the comparison.
TEST O A,B,C
Operands
O - Relational operator. Relationship of Operand A to Operand B for a successful
test. Required. The operator must be E, G, GE, L, LE, or NE.
a l
In this example of a "Refuse Mode" TEST Block, the Active Transaction enters the
ep
TEST Block if the relative system clock value is greater than 70000.
Otherwise, the Transaction is blocked until the test is true.
itn
26
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
26
GPSS Blocks
TRANSFER
A TRANSFER Block causes the Active Transaction to jump to a new Block
location.
TRANSFER A,B,C,D
Operands
A - Transfer Block mode. Described below. Optional. The operand must
be BOTH, ALL, PICK, FN, P, SBR, SIM, fraction, Name, PosInteger,
ParenthesizedExpression, SNA, SNA*Parameter, or Null.
B - Block number or location. Parameter name or number when in P Mode. Optional. The
operand must be Null, Name, PosInteger, ParenthesizedExpression, SNA, or
SNA*Parameter.
C - Block number or location. Increment value in FN or P Mode. Optional. The operand must
be Null, Name, PosInteger, ParenthesizedExpression, SNA, or SNA*Parameter.
D - Block number increment for ALL Mode. Default is 1. Optional. The operand must be Null,
Name, PosInteger, ParenthesizedExpression, SNA, or SNA*Parameter.
a l
Example:
ep
Look into the modes.
itn
27
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
27
GPSS Blocks
UNLINK
An UNLINK Block removes Transactions from the User Chain of a Userchain Entity.
UNLINK O A,B,C,D,E,F
Operands
O - Relational 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 or NE.
A - User Chain number. User Chain from which one or more Transactions will be removed. Required. The operand must be
Name, PosInteger, ParenthesizedExpression, SNA, or SNA*Parameter.
B - Block number. The destination Block for removed Transactions. Required. The operand must be Name, PosInteger,
ParenthesizedExpression, SNA, or SNA*Parameter.
C - Removal limit. The maximum number of Transactions to be removed. If not specified, ALL is used. Optional. The
operand must be ALL, Null, Name, PosInteger, ParenthesizedExpression, SNA, or SNA*Parameter.
D - Test value. The member Transaction Parameter name or number to be tested, a Boolean variable to be tested, or BACK
to remove from the tail of the chain. Optional. The operand must be Null, Name, PosInteger,
ParenthesizedExpression, SNA, SNA*Parameter or BACK.
E - Reference value. The value against which the D Operand is compared. Optional. The operand must be Null, Name,
Number, String, ParenthesizedExpression, SNA, or SNA*Parameter. Operand E is not used if Operand D is a
Boolean Variable.
F - Block number. The alternate destination for the entering Transaction. Optional. The operand must be Null, Name,
PosInteger, ParenthesizedExpression, SNA, or SNA*Parameter.
a l
Example
ep
UNLINK OnHold,Reentry,1
This is the simplest way to use the UNLINK Block. The first Transaction at the head of the Userchain Entity named OnHold,
if any, is taken off the chain and is directed to the Block labeled Reentry. It is put on the CEC behind Transactions
itn
of the same priority. The Transaction entering the UNLINK Block proceeds to the Next Sequential Block. 28
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
28
GPSS Control Statements
CLEAR
A CLEAR Command returns the simulation to the unused
state.
CLEAR A
Operand
A - ON or OFF. If the A Operand is omitted, ON is
assumed. Optional. The operand must be ON, OFF or
Null.
END
The ENDControl Statement has been replaced by EXIT, which
can terminate a Session. END is now a keyword in the
PLUS Language.
a l
ep
itn
29
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
29
GPSS Control Statements
FUNCTION
There are several types of Function Entities. Each has its own rules pertaining to the table
lookup. For each, the lookup table is specified in one or more Function Follower
Statements. Type C Functions are a special case. They use a table lookup, followed
by a linear interpolation.
The use of Function Commands to define probability distributions has been largely
supplanted by the built-in distributions in the Procedure Library. This is discussed in
Chapter 8. The old Function Types are still supported by GPSS World.
Label / Operands
NAME - Entity Label this entity. Required. The field must be Name.
a l
A - Function argument. Required. The operand must be Name, PosInteger, String,
ep
ParenthesizedExpression, SNA, or SNA*Parameter.
B - Function type (one letter) followed immediately by the number of data pairs in the
itn
Function Follower Statements. Required. 30
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
30
GPSS Control Statements
INITIAL
An INITIAL Command initializes a Matrix Entity, a Logicswitch Entity, Savevalue
Entity, or an element of a Matrix Entity.
INITIAL A,B
Operands
a l
The operand must be Null, Number, String, Name, or UNSPECIFIED.
ep
itn
31
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
31
GPSS Control Statements
RESET
a l
ep
itn
32
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
32
GPSS Control Statements
START
A START Command begins a simulation.
START A,B,C,D
Operands
A - Termination count. Required. The operand must be PosInteger.
B - Printout operand. NP for “no printout”. Default is to print a
standard report. Optional. The operand must be NP or Null.
C - Not used. Kept for compatibility with older dialects of GPSS.
D - Chain printout. 1 to include the CEC and FEC in the standard
report. Optional. The operand must be Null, or PosInteger.
a l
ep
itn
33
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
33
GPSS Control Statements
STORAGE
A STORAGE Command defines a Storage Entity.
NAME STORAGE A
Label / Operand
NAME - Entity Label for this entity. Required. The field must be
Name.
A - Total storage capacity. Required. The operand must be
PosInteger.
Example
MotorPool STORAGE 20
This Command defines a Storage Entity named MotorPool with a total
capacity of 20 units.
a l
ep
Note: Storage name must be defined before the simulation program and
itn
34
name of storage must start with 3 alphabets.
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
34
GPSS Control Statements
TABLE
A TABLE Command initializes a frequency distribution table.
a l
limit of each frequency class. Required. The operand must be Number or
ep
String.
D - Number of frequency classes. Required. The operand must be PosInteger.
itn
35
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
35
Entities
Transaction entities:
GENERATE, SPLIT, TRANSFER, TERMINATE ..
Facilities entities:
SEIZE, RELEASE ..
Queue entities:
QUEUE, DEPART
Storage entities:
ENTER, LEAVE
a l
ep
itn
36
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
36
Action Times
l
function modifier (B)
a
ep
• If ‘B’ is zero, the action time is constant equal to the
itn
mean 37
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
37
Action Times
a l
• ‘E’ field determines the priority of the transaction
ep
itn
38
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
38
Action Times
a l
ep
itn
39
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
39
Succession of Events
a l
– It is kept on a chain
ep
• When processing of a transaction is finished, the
itn
program looks into other transactions at that instant 40
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
40
Choice of Paths
a l
ep
• Setting field ‘A’ to BOTH, allows a transaction to select
an alternate path depending upon existing conditions.41
itn
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
41
Choice of Paths
a l
ep
itn
42
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
42
Facilities and Storages
a l
ep
itn
43
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
43
Facilities and Storages
Example
Type of system Transaction Facility Storage
Communications Message Switch Trunk
Transportation Car Toll booth Road
Data processing Record Key punch Computer memory
al
storage
ep
• LEAVE block allows it to give up the space
itn
44
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
44
Facilities and Storages
Example
GENERATE 5
SEIZE 1 Sample program - 2
ADVANCE 4,3
RELEASE 1 Using facility only
TRANSFER 0.1,ACC,REJ
ACC TERMINATE 1 Get one inspector
REJ TERMINATE 1
myStorage STORAGE 3
a l
ACC TERMINATE 1
ep
REJ TERMINATE 1
itn
45
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
45
Gathering Statistics
a l
lengths, distribution of time spent on the queue etc.
ep
itn
46
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
46
Gathering Statistics
a l
created
ep
• Therefore, MARK block can be considered to reset the
itn
transit time to zero 47
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
47
Gathering Statistics
Example
myStorage STORAGE 3
myTable TABLE M1,5,5,10
Beg GENERATE 5
QUEUE 1 TABLE A,B,C,D
ENTER myStorage
A = transit time tabulation
DEPART 1
MARK B = lower limit of the table
ADVANCE 12,9
C = tabulation interval size
LEAVE myStorage
TABULATE myTable D = no. of intervals
TRANSFER 0.1,ACC,REJ
ACC TERMINATE 1
REJ TERMINATE 1
a l
ep
itn
48
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
48
Conditional Transfers
l
ADVANCE 12,9 TRANSFER ,TAB
a
RELEASE 2
ep
TRANSFER ,TAB CONV3 TERMINATE
itn
49
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
49
Program Control Statements
START
CLEAR
START
a l
ep
JOB – instructs the program to wipe out all preceding model
and proceed with the following problem
itn
50
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
50
Program Control Statements
a l
ep
itn
51
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
51
Reports
Title
a l
is also included.
ep
itn
52
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
52
Reports
General Information
START TIME END TIME BLOCKS FACILITIES STORAGES
0.000 11359.609 32 3 1
l
STORAGES. The number of Storage entities in the simulation at the end of
a
the simulation.
ep
itn
53
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
53
Reports
Names
NAME VALUE
ADDUP 10007.000
CHAIN1 10012.000
COLLECT 10017.000
a l
assigned numbers start at 10000.
ep
itn
54
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
54
Reports
Blocks
LABEL LOC BLOCK TYPE ENTRY COUNT CURRENT-COUNT RETRY
1 GENERATE 61 1 0
2 JOIN 60 0 0
3 JOIN 60 0 0
.. .. .. . .
11 LINK 51 0 0
NXTBLK 12 SEIZE 51 0 0
a l
CURRENT COUNT. The number of Transactions in this Block at the end of the
ep
simulation.
RETRY. The number of Transactions waiting for a specific condition depending on the
itn
55
state of this Block Entity.
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
55
Reports
a l
ep
itn
56
(C) 2005, Pramod Parajuli
cs
Source: www.csitnepal.com
56