Introduction to WINDOWS XP Interface and DESKTOP items

advertisement
Lab # 4: Discrete Event Simulation
SSUET/QR/114
LAB # 4
DISCRETE EVENT SIMULATION
OBJECTIVE
The SIGMA Model, BUFFERQ.MOD, in a discrete event Simulation.
THEORY
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.
CE-407: Simulation and Modeling
21
Lab # 4: Discrete Event Simulation
SSUET/QR/114
Fig. No 1
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.
CE-407: Simulation and Modeling
22
Lab # 4: Discrete Event Simulation
SSUET/QR/114
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.
CE-407: Simulation and Modeling
23
Lab # 4: Discrete Event Simulation
SSUET/QR/114
ASSINGMENT
•Design of a server/single queue model with random arrival rate and random service
rate and limited no. of customers in queue.
Use a variable buffer for max. queue length figure No.1
CE-407: Simulation and Modeling
24
Download