TWOTYPES.MOD

From Support

Jump to: navigation, search

Back to Model Library

See also: How to read .MOD pages

Contents

Description

TWOTYPES.MOD models a queuing system with two types of jobs and two types of technicians.

State Variables

State Variables in TWOTYPES.MOD
Variable Name Abbreviation Variable Description Size Type
QUEUE Q Number of waiting jobs in queue [TYPE+2*TECH] 4 Integer
FREE FREE Number of idle technicians of each type 2 Integer
TYPE TYPE Type of job (0=SHORT, 1=LONG) 1 Integer
TECH TECH Type of technician (0=TRAINEE;1=EXPERIENCED) 1,1 Integer
TIME TIME Processing times by type and tech 2,2 Integer

Vertices

Vertices in TWOTYPES.MOD
VERTEX NAME Vertex Description State Changes
RUN Run initialization None
ARRIV Arrival of a job TYPE=(RND<.3), TECH=(TYPE==0&RND<.3) or (TYPE==1&RND<.8)
ENTER Job joining the queue Q[TYPE+2*TECH]=Q[TYPE+2*TECH]+1
START Start of service FREE[TECH]=FREE[TECH]-1, Q[TYPE+2*TECH]=Q[TYPE+2*TECH]-1
LEAVE End of service FREE[TECH]=FREE[TECH]+1
INPUT Read input data TIME[TYPE;TECH]=DISK{TWOTYPES.DAT;0}

Initialization Conditions

Initialization Conditions in TWOTYPES.MOD
Variable Description
FREE[i] Number of idle technicians of each type

Event Relationship Graph

There is no Event Relationship Graph available for this model.

TWOTYPES.MOD as seen in SIGMA
TWOTYPES.MOD as seen in SIGMA

English Translation

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

The SIGMA Model, TWOTYPES.MOD, is a discrete event simulation. 
It models TWO JOB TYPES AND TWO TYPES OF TECHNICIANS.
I. STATE VARIABLE DEFINITIONS.
For this simulation, the following state variables are defined:
Q[4]: NUMBER OF WAITING JOBS IN QUEUE[TYPE+2*TECH]   (integer valued)
FREE[2]: NUMBER OF IDLE TECHNICIANS OF EACH TYPE   (integer valued)
TYPE: TYPE OF JOB (0=SHORT, 1=LONG)   (integer valued)
TECH: TYPE OF TECHNICIAN (0=TRAINEE;1=EXPERIENCED)   (integer valued)
TIME[2,2]: PROCESSING TIMES BY TYPE AND TECH   (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(FREE[0],FREE[1]) event occurs when RUN INITIALIZATION.
   Initial values for, FREE[0],FREE[1], are needed for each run.
   After every occurrence of the RUN event:
   Unconditionally, INITIATE THE FIRST JOB ARRIVAL;
   that is, schedule the ARRIV() event to occur without delay.
   Unconditionally, schedule the INPUT(TYPE,TECH) event to occur without delay...
   using the parameter value(s) of 0,0.
   (Time ties are broken by an execution priority of 4.)
2. The INPUT(TYPE,TECH) event occurs when READ INPUT DATA.
   This event causes the following state change(s):
   TIME[TYPE;TECH]=DISK{TWOTYPES.DAT;0}
   After every occurrence of the INPUT event:
   If TYPE<1 and TECH<=1, then schedule the INPUT(TYPE,TECH) event to occur without delay...
   using the parameter value(s) of TYPE+1,TECH.
   (Time ties are broken by an execution priority of 4.)
   If TYPE==1 and TECH<1, then schedule the INPUT(TYPE,TECH) event to occur without delay...
   using the parameter value(s) of 0,TECH+1.
   (Time ties are broken by an execution priority of 4.)
3. The ARRIV() event occurs when ARRIVAL OF A JOB.
   This event causes the following state change(s):
   TYPE=(RND<.3)
   TECH=(TYPE==0&RND<.3)|(TYPE==1&RND<.8)
   After every occurrence of the ARRIV event:
   Unconditionally, SCHEDULE THE NEXT ARRIVAL;
   that is, schedule the ARRIV() event to occur in 4*ERL{1} time units.
   (Time ties are broken by an execution priority of 6.)
   Unconditionally, ENTER THE SYSTEM AND JOIN THE QUEUE;
   that is, schedule the ENTER(TYPE,TECH) event to occur without delay...
   using the parameter value(s) of TYPE,TECH.
4. The ENTER(TYPE,TECH) event occurs when JOB JOINING THE QUEUE.
   This event causes the following state change(s):
   Q[TYPE+2*TECH]=Q[TYPE+2*TECH]+1
   After every occurrence of the ENTER event:
   If FREE[TECH]>0, then START SERVICE WITH THE FREE TECHNICIAN;
   that is, schedule the START(TYPE,TECH) event to occur without delay...
   using the parameter value(s) of TYPE,TECH.
   (Time ties are broken by an execution priority of 3.)
5. The START(TYPE,TECH) event occurs when START OF SERVICE.
   This event causes the following state change(s):
   FREE[TECH]=FREE[TECH]-1
   Q[TYPE+2*TECH]=Q[TYPE+2*TECH]-1
   After every occurrence of the START event:
   Unconditionally, THE JOB CAN LEAVE AFTER ITS SERVICE TIME;
   that is, schedule the LEAVE(TYPE,TECH) event 
   to occur in TIME[TYPE;TECH]*ERL{1} time units...
   using the parameter value(s) of TYPE,TECH.
   (Time ties are broken by an execution priority of 6.)
6. The LEAVE(TYPE,TECH) event occurs when END OF SERVICE.
   This event causes the following state change(s):
   FREE[TECH]=FREE[TECH]+1
   After every occurrence of the LEAVE event:
   If TECH==0 and Q[0]>0, then SERVICE THE WAITING JOB;
   that is, schedule the START(TYPE,TECH) event to occur without delay...
   using the parameter value(s) of 0,0.
   If TECH==0 and Q[0]==0 and Q[1]>0, then SERVICE THE WAITING JOB;
   that is, schedule the START(TYPE,TECH) event to occur without delay...
   using the parameter value(s) of 1,0.
   If TECH==1 and Q[2]>0, then SERVICE THE WAITING JOB;
   that is, schedule the START(TYPE,TECH) event to occur without delay...
   using the parameter value(s) of 0,1.
   If TECH==1 and (Q[3]>0 and Q[2]==0), then SERVICE THE WAITING JOB;
   that is, schedule the START(TYPE,TECH) event to occur without delay...
   using the parameter value(s) of 1,1.

Comments

Back to top

Back to Model Library

Personal tools
Navigation