BUFFERQ.MOD
From Support
- See also: How to read .MOD pages
Contents |
Description
BUFFERQ.MOD is an enrichment of the carwash model, adding a limited waiting space in the queue. If a customer arrives and there is not enough space left in the queue, they leave without joining the queue. The amount of waiting space is called the buffer size.
BUFFERQ.MOD can also be modeled using Boolean variables. See the Comments section.
State Variables
Variable Name | Abbreviation | Variable Description | Size | Type |
---|---|---|---|---|
QUEUE | Q | Number of customers waiting in line | 1 | Integer |
SERVER | S | Number of servers available | 1 | Integer |
BUFFER | B | Space for customers to wait in line | 1 | Integer |
Vertices
Vertex Name | Vertex Description | State Changes |
---|---|---|
RUN | The simulation is started | None |
ARRIVE | Arrival of a customer | None |
ENTER | Customer finds space and enters | Q=Q+1 |
START | Start of Service | S=0, Q=Q-1 |
LEAVE | End of Service | S=1 |
Initialization Conditions
Variable | Description |
---|---|
QUEUE | Initial number of customers waiting in line |
BUFFER | Space for customers to wait in line |
Event Relationship Graph
English Translation
An English translation is a verbal description of a model, automatically generated by SIGMA.
The SIGMA Model, BUFFERQ.MOD, is a discrete event simulation. It models A DETERMINISTIC SERVER WITH BUFFERED QUEUE.
I. STATE VARIABLE DEFINITIONS.
For this simulation, the following state variables are defined: QUEUE: NUMBER OF CUSTOMERS WAITING IN LINE (integer valued) SERVER: SERVER STATUS (IDLE/BUSY=1/0) (integer valued) BUFFER: SPACE FOR CUSTOMERS TO WAIT 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(QUEUE,BUFFER) event occurs when INITIALIZATION OF THE RUN. Initial values for, QUEUE,BUFFER, 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 CUSTOMER ARRIVAL; that is, schedule the ARRIV() event to occur without delay.
2. The ARRIV() event occurs when ARRIVAL OF A CUSTOMER. After every occurrence of the ARRIV event: Unconditionally, SCHEDULE THE NEXT ARRIVAL; that is, schedule the ARRIV() event to occur in 3+5*RND time units. (Time ties are broken by an execution priority of 6.) If QUEUE<BUFFER, then THERE IS SPACE, SO THE CUSTOMER CAN ENTER; that is, schedule the ENTER() event to occur without delay.
3. The ENTER() event occurs when CUSTOMER FINDING SPACE AND ENTERING. This event causes the following state change(s): QUEUE=QUEUE+1 After every occurrence of the ENTER event: If SERVER>0, then THE SERVER IS FREE, SO START SERVICE; that is, schedule the START() event to occur without delay.
4. 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, SERVICE TAKES 5 MINUTES; that is, schedule the LEAVE() event to occur in 5 time units. (Time ties are broken by an execution priority of 6.)
5. The LEAVE() event occurs when CUSTOMER FINISHING SERVICE AND LEAVING. This event causes the following state change(s): SERVER=1 After every occurrence of the LEAVE event: If QUEUE>0, then CUSTOMERS ARE STILL WAITING, SO START SERVICE; that is, schedule the START() event to occur without delay.
Comments
BUFFERQ.MOD can also be modeled using Boolean variables. When using Boolean variables, a condition takes on the value of 1 if it is true and 0 if it is false. We can incorporate limited waiting space using Boolean variables by altering the expression for the state change in the ENTER edge from Q=Q+1, which models an arriving customer unconditionally joining the queue, to the expression Q=Q+(Q<B).
See Limited Waiting Space: BUFFERQ.MOD for more information.