PRIORITYQ.MOD

From Support

Jump to: navigation, search

Back to Model Library

See also: How to read .MOD pages

Contents

Description

PRIORITYQ.MOD models a queue with several classes of customers with different priorities. There are two types of customers, with 50% of the arrivals being in each class. (Note the Boolean expression to determine the customer class used in the state change of the ENTER vertex.) Arrivals are then PUT on the list in increasing order of their priority class. Whenever a service starts, the next customer in line is found using the GET function.

State Variables

State Variables in PRIORITYQ.MOD
Variable Name Abbreviation Variable Description Size Type
QUEUE Q Number of customers in line 1 Integer
SERVERS S Number of available tellers 1 Integer
ID ID Customer identification number 1 Integer
D D Delay in line for each customer 1 Integer
W W Sequence of customer waiting times (values of D) 256 Real
RNK RNK Ranking entity attribute for each line 25 Integer
ENT ENT Customer attributes (1=ID,2=CLK,3=PRIORITY) 15 Real

Vertices

Vertices in PRIORITYQ.MOD
Vertex Name Vertex Description State Changes
RUN The simulation is started S=5, RNK[1]=3
ENTER Arrival of a customer ID=ID+1, ENT[1]=ID, ENT[2]=CLK, ENT[3]=1+(RND>.5), Q=Q+PUT{INC;1}
START Start of Service Q=Q-GET{FST;1}, D=CLK-ENT[2], W[ENT[1]]=D, S=S-1
LEAVE End of Service S=S+1

Initialization Conditions

This model has no initialization conditions.

Event Relationship Graph

PRIORITYQ.MOD
PRIORITYQ.MOD

English Translation

An English translation is a verbal description of a model, automatically generated by SIGMA.

The SIGMA Model, PRIORTYQ.MOD, is a discrete event simulation. 
It models A PRIORITY WAITING LINE (USING QUEUE NUMBER 1).
I. STATE VARIABLE DEFINITIONS.
For this simulation, the following state variables are defined:
Q: NUMBER OF CUSTOMERS WAITING IN LINE   (integer valued)
S: NUMBER OF IDLE SERVERS   (integer valued)
ID: CUSTOMER IDENTIFICATION NUMBER   (integer valued)
D: DELAY IN LINE FOR EACH CUSTOMER  (real valued)
W[256]: SEQUENCE OF CUSTOMER WAITING TIMES (VALUES OF D)  (real valued)
RNK[25]: RANKING ENTITY ATTRIBUTE FOR EACH LINE   (integer valued)
ENT[15]: CUSTOMER ATTRIBUTES (1=ID,2=CLK,3=PRIORITY)  (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() event occurs when INITIALIZATION OF THE RUN.
   This event causes the following state change(s):
   S=5
   RNK[1]=3
   After every occurrence of the RUN event:
   Unconditionally, HAVE THE FIRST CUSTOMER ENTER;
   that is, schedule the ENTER() event to occur without delay.
   (Time ties are broken by an execution priority of 3.)
2. The ENTER() event occurs when ARRIVAL OF CUSTOMERS.
   This event causes the following state change(s):
   ID=ID+1
   ENT[1]=ID
   ENT[2]=CLK
   ENT[3]=1+(RND>.5)
   Q=Q+PUT{INC;1}
   After every occurrence of the ENTER event:
   If S>0, then START SERVICE WITH AN IDLE SERVER;
   that is, schedule the START() event to occur without delay.
   Unconditionally, SCHEDULE THE NEXT CUSTOMER ARRIVAL;
   that is, schedule the ENTER() event to occur in 1.3*ERL{1} time units.
   (Time ties are broken by an execution priority of 4.)
3. The START() event occurs when START OF SERVICE .
   This event causes the following state change(s):
   Q=Q-GET{FST;1}
   D=CLK-ENT[2]
   W[ENT[1]]=D
   S=S-1
   After every occurrence of the START event:
   Unconditionally, SCHEDULE END OF SERVICE;
   that is, schedule the LEAVE() event to occur in 5*ERL{1} time units.
   (Time ties are broken by an execution priority of 6.)
4. The LEAVE() event occurs when END OF SERVICE.
   This event causes the following state change(s):
   S=S+1
   After every occurrence of the LEAVE event:
   If Q>0, then CUSTOMER(S) ARE WAITING TO START SERVICE;
   that is, schedule the START() event to occur without delay.
   (Time ties are broken by an execution priority of 4.)

Comments

Back to top

Back to Model Library

Personal tools
Navigation