BANK3.MOD
From Support
- See also: How to read .MOD pages
Contents |
Description
BANK3.MOD is a variation on BANK2.MOD that passes fewer parameters. In BANK3.MOD only the START-LEAVE edge passes the attribute value of NEXT. Note that in BANK3.MOD the value of NEXT is not initialized to 1 but automatically started at zero. This model was simplified by assuming that customers will be served in the order in which they arrived (FIFO - First in first out).
State Variables
Variable Name | Abbreviation | Variable Description | Size | Type |
---|---|---|---|---|
QUEUE | Q | Number of customers in line | 1 | Integer |
SERVERS | S | Number of available tellers | 1 | Integer |
W | W | Array of customer waiting times | 100 | Real |
MST | MST | Mean service time | 1 | Real |
IAT | IAT | Mean interarrival time | 1 | Real |
ID | ID | Customer identification number | 1 | Integer |
IN | IN | I.D. number of customer in service | 1 | Integer |
NEXT | NEXT | I.D. of customer next in line | 1 | Integer |
Vertices
Vertex Name | Vertex Description | State Changes |
---|---|---|
RUN | The simulation is started | None |
ENTER | Arrival of a customer | ID=ID+1,Q=Q+1,W[ID]=CLK |
START | Start of Service | S=S-1, Q=Q-1, NEXT=NEXT+1 |
LEAVE | End of Service | S=S+1,W[IN]=CLK-W[IN] |
Initialization Conditions
Variable | Description |
---|---|
SERVERS | Initial number of tellers |
Event Relationship Graph
English Translation
An English translation is a verbal description of a model, automatically generated by SIGMA.
The SIGMA Model, BANK3.MOD, is a discrete event simulation. It models A BANK USING TRANSIENT ENTITIES .
I. STATE VARIABLE DEFINITIONS.
For this simulation, the following state variables are defined:
QUEUE: NUMBER OF CUSTOMERS WAITING IN LINE (integer valued) SERVERS: NUMBER OF FREE SERVERS (integer valued) IAT: MEAN INTERARRIVAL TIME (real valued) MST: MEAN SERVICE TIME (real valued) W[100]: ARRAY OF CUSTOMER WAITING TIMES (real valued) ID: CUSTOMER IDENTIFICATION NUMBER (integer valued) IN: I.D. NUMBER OF CUSTOMER IN SERVICE (integer valued) NEXT: I.D. OF CUSTOMER NEXT IN LINE (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 RUN(SERVERS,IAT,MST) event occurs when INITIALIZATION OF THE RUN with number of SERVERS, interarrival time, IAT, and mean service time, MST. Initial values for, SERVERS,IAT,MST, are needed for each run. After every occurrence of the RUN event: Unconditionally, INITIATE THE FIRST CUSTOMER ARRIVAL; that is, schedule the ENTER() event to occur without delay.
2. The ENTER() event occurs when ARRIVAL OF CUSTOMERS. This event causes the following state change(s): ID=ID+1 QUEUE=QUEUE+1 W[ID]=CLK After every occurrence of the ENTER event: If SERVERS>0, then START SERVICE WITH AN IDLE SERVER; that is, schedule the START(IN) event to occur without delay. Unconditionally, SCHEDULE THE NEXT CUSTOMER ARRIVAL; that is, schedule the ENTER() event to occur in IAT*ERL{1} time units. (Time ties are broken by an execution priority of 6.)
3. The START(IN) event occurs when START OF SERVICE. This event causes the following state change(s): QUEUE=QUEUE-1 SERVERS=SERVERS-1 NEXT=NEXT+1 After every occurrence of the START event: Unconditionally, SCHEDULE END OF SERVICE FOR CUSTOMER=IN; that is, schedule the LEAVE(IN) event to occur in MST*ERL{1} time units...using the parameter value(s) of NEXT. (Time ties are broken by an execution priority of 6.)
4. The LEAVE(IN) event occurs when END OF SERVICE. This event causes the following state change(s): SERVERS=SERVERS+1 W[IN]=CLK-W[IN] After every occurrence of the LEAVE event: If QUEUE>0, then START SERVICE OF THE NEXT WAITING CUSTOMER; that is, schedule the START(IN) event to occur without delay.
Comments
To understand this: open two sessions of SIGMA at the same time and run BANK2.MOD in one and BANK3.MOD in the other and observe that their outputs are the same even though BANK3.MOD only has one edge passing the value an attribute, while BANK2.MOD has three such edges.