GPSSLANG.MOD
From Support
- See also: How to read .MOD pages
Contents |
Description
Many popular simulation packages are based on what is known as a process worldview. (The process approach is also sometimes called network modeling.) Process-oriented simulation languages provide a series of pre-programmed blocks that represent some of the typical processing stages in a queueing system. Examples of such blocks include a block to represent the entity waiting (i.e., a QUEUE block) and another to represent the start of service (i.e., a SEIZE block).
An image of the blocks in GPSSLANG.MOD, which models Copy and Paste Blocks for GPSS, is shown in the figure below:
Event graphs, while much simpler than most process languages to learn and use, are more general. You can build versions of these process languages using SIGMA. GPSSLANG.MOD is an example of this.
State Variables
Variable Name | Abbreviation | Variable Description | Size | Type |
---|---|---|---|---|
QUEUE | Q | Number in the QUEUEs | 5 | Integer |
RESOURCE | R | Status of RESOURCEs | 5 | Integer |
TCOUNT | TCOUNT | Transaction termination counter for run | 1 | Integer |
CEVCHAIN | CEVCHAIN | Current Events Chain | 1 | Integer |
FEVCHAIN | FEVCHAIN | Future Events Chain | 1 | Integer |
STORAGE | STORAGE | Status of STORAGEs | 5 | Integer |
CHAIN | CHAIN | User Chain ID | 1 | Integer |
CLOCK | CLOCK | Current Simulated Time | 1 | Real |
RNK | RNK | Priority ranking attribute for each QUEUE block | 25 | Integer |
PRIORITY | PRIORITY | Priority for a QUEUE block | 1 | Integer |
ENT | ENT | Attributes of a transaction entity | 15 | Integer |
BLOCK | BLOCK | Block ID number for Current Event Chain | 1 | Integer |
ID | ID | Local ID number for QUEUE, RESOURCE, or STORAGE | 1 | Integer |
CHECK | CHECK | Check for Empty Events Chains | 1 | Integer |
Vertices
Vertex Name | Vertex Description | State Changes |
---|---|---|
SIM | SIMULATE BLOCK which starts a simulation run | CEVCHAIN=6, FEVCHAIN=7, CLOCK=0, R[0]=1, R[1]=1, ENT[0]=3+2*BET{.33;.5}, ENT[1]=1, ENT[2]=PUT{FIF;FEVCHAIN}, ENT[0]=0, ENT[1]=1, ENT[2]=PUT{FIF;CEVCHAIN}, RNK[7]=0 |
GEN | GENERATE block, executes every DT time units | ENT[0]=CLOCK+3+3*RND, ENT[1]=1, ENT[2]=PUT{INC;FEVCHAIN} |
QUEUE | QUEUE block, puts transaction in CHAIN | Q[ID]=Q[ID]+PUT{FIF;ID}, ENT[0]=3 |
DEPART | DEPART block, takes transaction out of a queue | Q[ID]=Q[ID]-GET{FST;ID} |
SEIZE | SEIZE block, captures resource, RID | R[ID]=R[ID]-1 |
REL | RELEASE block, frees resource, RID | R[ID]=R[ID]+1 |
ADV | ADVANCE block, delays transaction specified time | ENT[0]=CLOCK+10*ERL{1}, ENT[1]=2, ENT[3]=PUT{INC;FEVCHAIN} |
TIMER | If Current Events Chain is empty, do next event | CHECK=GET{FST;FEVCHAIN}, CLOCK=ENT[0], BLOCK=ENT[1] |
CEvCH | Push transactions down current event chain | CHECK=GET{FST;CEVCHAIN}, BLOCK=ENT[1] |
TERM | Transaction termination counter for run decremented | TCOUNT=TCOUNT-1 |
FILE | File blocked transaction on Current Event Chain | ENT[0]=CLOCK, ENT[1]=BLOCK, ENT[2]=PUT{FST;CEVCHAIN} |
Initialization Conditions
Variable | Description |
---|---|
TCOUNT | Transaction termination counter for run |
Event Relationship Graph
There is no event relationship graph available for this model.
English Translation
An English translation is a verbal description of a model, automatically generated by SIGMA.
The SIGMA Model, GPSSLANG.MOD, is a discrete event simulation. It models Copy/Paste BLOCKS for GPSS.
I. STATE VARIABLE DEFINITIONS.
For this simulation, the following state variables are defined:
CEVCHAIN: Current Events Chain (integer valued) FEVCHAIN: Future Events Chain (integer valued) QUEUE[5]: Number in the QUEUEs (integer valued) RESOURCE[5]: Status if RESOURCEs (integer valued) STORAGE[5]: Status of STORAGEs (integer valued) CHAIN: User Chain ID (integer valued) CLOCK: Current Simulated Time (real valued) RNK[25]: Priority ranking attribute for each QUEUE block (integer valued) PRIORITY: Priority for a QUEUE block (integer valued) ENT[15]: Attributes of a transaction entity (integer valued) BLOCK: Block ID number for Current Event Chain (integer valued) ID: Local ID number for QUEUE, RESOURCE, or STORAGE (integer valued) TCOUNT: Transaction termination counter for run (integer valued) CHECK: Check for Empty Events Chains (integer valued)
II. EVENT DEFINITIONS.
Simulation state changes are represented by event vertices (nodes or balls) in a SIGMA graph. Event vertex parameters, if any, are given in parentheses. Logical and dynamic relationships between pairs of events are represented in a SIGMA graph by edges (arrows) between event vertices. Unless otherwise stated, vertex execution priorities, to break time ties, are equal to 5.
1. The SIM(TCOUNT) event occurs when SIMULATE BLOCK which starts a simulation run.. Initial values for, TCOUNT, are needed for each run. This event causes the following state change(s): CEVCHAIN=6 FEVCHAIN=7 CLOCK=0 RESOURCE[0]=1 RESOURCE[1]=1 ENT[0]=3+2*BET{.33;.5} ENT[1]=1 ENT[2]=PUT{FIF;FEVCHAIN} ENT[0]=0 ENT[1]=1 ENT[2]=PUT{FIF;CEVCHAIN} RNK[7]=0 After every occurrence of the SIM event: Unconditionally, schedule the TIMER() event to occur without delay.
2. The GEN() event occurs when GENERATE block, executes every DT time units. This event causes the following state change(s): ENT[0]=CLOCK+3+3*RND ENT[1]=1 ENT[2]=PUT{INC;FEVCHAIN} After every occurrence of the GEN event: Unconditionally, schedule the QUEUE(ID) event to occur without delay... using the parameter value(s) of 0. (Time ties are broken by an execution priority of 0.)
3. The QUEUE(ID) event occurs when QUEUE block, puts transaction in CHAIN. This event causes the following state change(s): QUEUE[ID]=QUEUE[ID]+PUT{FIF;ID} ENT[0]=3 After every occurrence of the QUEUE event: If RESOURCE[0], then schedule the SEIZE(ID) event to occur without delay... using the parameter value(s) of 0. (Time ties are broken by an execution priority of 0.) If RESOURCE[0]==0, then schedule the FILE(CLOCK,BLOCK) event to occur without delay... using the parameter value(s) of CLOCK,3. (Time ties are broken by an execution priority of 0.)
4. The DEPART(ID) event occurs when DEPART block, takes transaction out of a queue. This event causes the following state change(s): QUEUE[ID]=QUEUE[ID]-GET{FST;ID} After every occurrence of the DEPART event: If 1, then schedule the ADV() event to occur without delay. (Time ties are broken by an execution priority of 0.)
5. The SEIZE(ID) event occurs when SEIZE block, captures resource, RID.. This event causes the following state change(s): RESOURCE[ID]=RESOURCE[ID]-1 After every occurrence of the SEIZE event: Unconditionally, schedule the DEPART(ID) event to occur without delay... using the parameter value(s) of 0. (Time ties are broken by an execution priority of 0.)
6. The REL(ID) event occurs when RELEASE block, frees resource, RID.. This event causes the following state change(s): RESOURCE[ID]=RESOURCE[ID]+1 After every occurrence of the REL event: Unconditionally, schedule the TERM() event to occur without delay. (Time ties are broken by an execution priority of 0.) If TCOUNT>0, then schedule the FILE(CLOCK,BLOCK) event to occur without delay... using the parameter value(s) of CLOCK,3. (Time ties are broken by an execution priority of 1.)
7. The ADV() event occurs when ADVANCE block, delays transaction specified time.. This event causes the following state change(s): ENT[0]=CLOCK+10*ERL{1} ENT[1]=2 ENT[3]=PUT{INC;FEVCHAIN} After every occurrence of the ADV event: If TCOUNT>0, then schedule the CEvCh() event to occur without delay. (Time ties are broken by an execution priority of 2.)
8. The TIMER() event occurs when If Current Events Chain is empty, do next event.. This event causes the following state change(s): CHECK=GET{FST;FEVCHAIN} CLOCK=ENT[0] BLOCK=ENT[1] After every occurrence of the TIMER event: If BLOCK==1, then schedule the GEN() event to occur without delay. (Time ties are broken by an execution priority of 2.) If BLOCK==2, then schedule the REL(ID) event to occur without delay... using the parameter value(s) of 0. (Time ties are broken by an execution priority of 0.)
9. The CEvCh() event occurs when Push transactions down current event chain. This event causes the following state change(s): CHECK=GET{FST;CEVCHAIN} BLOCK=ENT[1] After every occurrence of the CEvCh event: If CHECK, then schedule the CEvCh() event to occur without delay. (Time ties are broken by an execution priority of 0.) If CHECK==0, then schedule the TIMER() event to occur without delay... using the parameter value(s) of -99,-99. (Time ties are broken by an execution priority of 0.) If QUEUE[0] and RESOURCE[0] and CHECK and (BLOCK==3), then schedule the SEIZE(ID) event to occur without delay... using the parameter value(s) of 0. (Time ties are broken by an execution priority of 0.)
10. The TERM() event: This event causes the following state change(s): TCOUNT=TCOUNT-1 No additional events are scheduled here.
11. The FILE(CLOCK,BLOCK) event occurs when File blocked transaction on Current Event Chain. This event causes the following state change(s): ENT[0]=CLOCK ENT[1]=BLOCK ENT[2]=PUT{FST;CEVCHAIN} After every occurrence of the FILE event: If TCOUNT>0, then schedule the CEvCh() event to occur without delay. (Time ties are broken by an execution priority of 0.)