ANIMATE.MOD
From Support
- See also: How to read .MOD pages
Contents |
Description
ANIMATE.MOD is the last in a series of models showing the steps to animate the simulation model BRKDN.MOD. To represent the states of the queue (a dynamic resident entity), we will use a subgraph on your SIGMA directory called, QSIZE.MOD. See Tutorial: Animating Resident Entities and Tutorial Continuation: Animating Transient Entity Motion.
The first model in the series is BRKANAM1.MOD.
State Variables
Variable Name | Abbreviation | Variable Description | Size | Type |
---|---|---|---|---|
QUEUE | Q | The number of jobs waiting in line | 1 | Integer |
SERVER | S | Server is available/busy/broken=1/0/-1 | 1 | Integer |
QSIZE | QSIZE | Size of queue | 1 | Integer |
INPUT | INPUT | Counter for jobs that enter the system | 1 | Integer |
GOOD | GOOD | Counter for jobs that are successfully processed | 1 | Integer |
BAD | BAD | Counter for jobs that are aborted because of resource failure | 1 | Integer |
Vertices
Vertex Name | Vertex Description | State Changes |
---|---|---|
RUN | Initialization of the queue and the server | S=1 |
ENTER | Arrival of a job | Q=Q+1 |
START | Start of service | S=0, Q=Q-1 |
LEAVE | End of service | S=1 |
FAIL | The occurrence of a service failure | S=-1 |
FIX | Completion of repair on the machine | S=1 |
DONE | Records an entity successfully leaving the system | GOOD=GOOD+1 |
WASTE | Records when a job fails | BAD=BAD+1 |
Initialization Conditions
Variable | Description |
---|---|
QUEUE | The initial number of jobs waiting in line |
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, ANIMATE.MOD, is a discrete event simulation. It models A DETERMINISTIC QUEUE (M/D/1) WITH BREAKDOWNS.
I. STATE VARIABLE DEFINITIONS.
For this simulation, the following state variables are defined:
QUEUE: THE NUMBER OF JOBS WAITING IN LINE (integer valued) SERVER: SERVER IS AVAIL/BUSY/BROKEN=1/0/-1 (integer valued) QSIZE: (integer valued) INPUT: (integer valued) GOOD: (integer valued) BAD: (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(QUEUE) event occurs when INITIALIZATION OF THE QUEUE AND THE SERVER. Initial values for, QUEUE, are needed for each run. This event causes the following state change(s): SERVER=1 After every occurrence of the RUN event: Unconditionally, INITIATE THE FIRST JOB ARRIVAL; that is, schedule the ENTER() event to occur without delay. (Time ties are broken by an execution priority of 6.) Unconditionally, SCHEDULE THE FIRST MACHINE BREAKDOWN; that is, schedule the FAIL() event to occur in -15*LN{RND} time units. (Time ties are broken by an execution priority of 4.) If QUEUE>0, then immediately execute the START() event...using the parameter value(s) of QUEUE.
2. The ENTER() event occurs when ARRIVAL OF A JOB. 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 7*ERL{1} time units. (Time ties are broken by an execution priority of 6.) Unconditionally, schedule the 16() event to occur without delay.
3. The START() event occurs when START OF SERVICE. This event causes the following state change(s): SERVER=0 QUEUE=QUEUE-1 After every occurrence of the START event: Unconditionally, THE JOB IS PLACED IN SERVICE FOR 5 MINUTES; that is, schedule the LEAVE() event to occur in 2 time units. (Time ties are broken by an execution priority of 6.) Unconditionally, immediately execute the 0(QSIZE) event... using the parameter value(s) of QUEUE.
4. The LEAVE() event occurs when END OF SERVICE. This event causes the following state change(s): SERVER=1 After every occurrence of the LEAVE event: Unconditionally, schedule the 12() event to occur without delay.
5. The FAIL() event occurs when THE OCCURRENCE OF A SERVICE FAILURE. This event causes the following state change(s): SERVER=-1 After every occurrence of the FAIL event: Unconditionally, immediately cancel the next scheduled occurrence of the LEAVE event. If QUEUE>0, then immediately execute the 14() event. Unconditionally, schedule the HIT() event to occur in 15 time units. (Time ties are broken by an execution priority of 6.)
6. The FIX() event occurs when COMPLETION OF REPAIR ON THE MACHINE. This event causes the following state change(s): SERVER=1 After every occurrence of the FIX event: Unconditionally, SCHEDULE THE NEXT MACHINE FAILURE; that is, schedule the FAIL() event to occur in -50*LN{RND} time units.
7. The 0(QSIZE) event: After every occurrence of the 0 event: If QSIZE==1, then schedule the 1() event to occur without delay. (Time ties are broken by an execution priority of 0.) If QSIZE==2, then schedule the 2() event to occur without delay. (Time ties are broken by an execution priority of 0.) If QSIZE==3, then schedule the 3() event to occur without delay. (Time ties are broken by an execution priority of 0.) If QSIZE>3, then schedule the gt3() event to occur without delay. (Time ties are broken by an execution priority of 0.)
8. The 1() event: No additional events are scheduled here.
9. The 2() event: No additional events are scheduled here.
10. The 3() event: No additional events are scheduled here.
11. The gt3() event: No additional events are scheduled here.
12. The 12() event: After every occurrence of the 12 event: Unconditionally, schedule the DONE() event to occur without delay.
13. The DONE() event: This event causes the following state change(s): GOOD=GOOD+1 No additional events are scheduled here.
14. The 14() event: After every occurrence of the 14 event: Unconditionally, immediately execute the WASTE() event.
15. The WASTE() event: This event causes the following state change(s): BAD=BAD+1 No additional events are scheduled here.
16. The 16() event: After every occurrence of the 16 event: If SERVER==1, then schedule the START() event to occur without delay. Unconditionally, schedule the 0(QSIZE) event to occur without delay... using the parameter value(s) of QUEUE. 17. The HIT() event: After every occurrence of the HIT event: Unconditionally, immediately execute the 18() event. (Time ties are broken by an execution priority of 1.) Unconditionally, schedule the FIX() event to occur without delay.
18. The 18() event: No additional events are scheduled here.
Comments
This model is not available using the educational version of SIGMA.