FACTORAL.MOD
From Support
- See also: How to read .MOD pages
Contents |
Description
FACTORAL.MOD demonstrates the use of the SET{X} function, which sets all variables (including CLK) to zero and sets the random number seed to "X." If no value is put in for "X," the original stream continues.
In FACTORAL.MOD, the carwash model is altered so that after RTIME units, the random number seed is reset to 12345 using the SET function. At this time all other variables in the model are also reset: the CLK is reset to zero, values for the other variables are read into the model using a DISK function. This process continues for NREP repetitions.
See INVENTRY.MOD for another example of using the SET function.
State Variables
Variable Name | Abbreviation | Variable Description | Size | Type |
---|---|---|---|---|
QUEUE | Q | Number of customers in line | 1 | Integer |
SERVERS | S | Number of available servers | 1 | Integer |
IAT | IAT | Mean interarrival time | 1 | Real |
MST | MST | Mean service time | 1 | Real |
REP | REP | Counter for replicates | 1 | Integer |
NREP | NREP | Number of replicates in experiment | 1 | Integer |
RTIME | RTIME | Duration of each replicate | 1 | Real |
Vertices
Vertex Name | Vertex Description | State Changes |
---|---|---|
RUN | The simulation is started | None |
ENTER | Arrival of a customer | Q=Q+1 |
START | Start of service | S=S-1, Q=Q-1 |
LEAVE | End of service | S=S+1 |
NEXTR | Start of the next replication | None |
DONE | End of a replication | REP=REP+1 |
Initialization Conditions
Variable | Description |
---|---|
SERVERS | Initial number of tellers |
QUEUE | Initial number of customer in line |
REP | Counter for replicates |
NREP | Number of replicates in experiment |
RTIME | Duration of each replicate |
Event Relationship Graph
English Translation
An English translation is a verbal description of a model, automatically generated by SIGMA.
The SIGMA Model, FACTORAL.MOD, is a discrete event simulation. It models REPLICATIONS OF CARWASH.MOD WITH DIFFERENT SERVERS.
I. STATE VARIABLE DEFINITIONS.
For this simulation, the following state variables are defined:
QUEUE: NUMBER OF CUSTOMERS IN LINE (integer valued) SERVERS: NUMBER OF FREE SERVERS (integer valued) IAT: MEAN INTERARRIVAL TIME (real valued) MST: MEAN SERVICE TIME (real valued) REP: COUNTER FOR REPLICATES (integer valued) NREP: NUMBER OF REPLICATES IN EXPERIMENT (integer valued) RTIME: DURATION OF EACH REPLICATE (real 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,QUEUE,REP,RTIME,NREP) event occurs when INITIALIZATION OF THE RUN. Initial values for, SERVERS,QUEUE,REP,RTIME,NREP, 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 A CUSTOMER. This event causes the following state change(s): QUEUE=QUEUE+1 After every occurrence of the ENTER event: Unconditionally, SCHEDULE THE NEXT ARRIVAL; that is, schedule the ENTER() event to occur in 4*ERL{1} time units. If SERVERS>0, then START SERVICE WITH THE IDLE SERVER; that is, schedule the START() event to occur without delay.
3. The START() event occurs when START OF SERVICE. This event causes the following state change(s): SERVERS=SERVERS-1 QUEUE=QUEUE-1 After every occurrence of the START event: Unconditionally, THE CUSTOMER WILL BE IN SERVICE FOR 5 MINUTES; that is, schedule the LEAVE() event to occur in 5 time units. If CLK==0.0 and QUEUE>0 and SERVERS>0, then TRY TO SERVICE THE INITIAL QUEUE; that is, schedule the START() event to occur without delay. (Time ties are broken by an execution priority of 2.)
4. The LEAVE() event occurs when END OF SERVICE. This event causes the following state change(s): SERVERS=SERVERS+1 After every occurrence of the LEAVE event: If QUEUE>=SERVERS, then SERVICE THE WAITING CUSTOMER; that is, schedule the START() event to occur without delay. If CLK>=RTIME, then schedule the DONE() event to occur without delay. (Time ties are broken by an execution priority of 4.)
5. The DONE() event occurs when END OF A REPLICATION. This event causes the following state change(s): REP=REP+1 After every occurrence of the DONE event: Unconditionally, immediately cancel all scheduled occurrences of the LEAVE event. Unconditionally, immediately cancel the next scheduled occurrence of the ENTER event. Unconditionally, immediately cancel all scheduled occurrences of the START event. If REP<=NREP and SET{12345}, then READ THE NEXT EXPERIMENTAL DESIGN POINT ON DISKS ; that is, schedule the NEXTR(SERVERS,QUEUE,REP,RTIME,NREP) event to occur without delay... using the parameter value(s) of DISK{FACTOR1.DAT;0},DISK{FACTOR2.DAT;0}, DISK{FACTOR3.DAT;0},DISK{FACTOR4.DAT;1},DISK{FACTOR4.DAT;2}.
6. The NEXTR(SERVERS,QUEUE,REP,RTIME,NREP) event occurs when STARTING OF THE NEXT REPLICATION. After every occurrence of the NEXTR event: Unconditionally, schedule the ENTER() event to occur without delay.