Steady State Queuing Model    Model: QUEUEM

A useful approach for tackling general queuing models is to use the Rate In = Rate Out Principle (RIRO) to derive a set of steady state equations for a queuing system. RIRO assumes a system can reach a state of equilibrium. In equilibrium, the tendency to move out of a certain state must equal the tendency to move towards that state. Given the steady state equations derived from this assumption, we can solve for the probability a system is in a given state at any particular moment. A detailed discussion of this model may be found in Developing More Advanced Models.

MODEL:

! Model of a queue with arrivals in batches. In

 this particular example, arrivals may show up in

 batches of 1, 2, 3, or 4 units;

 

SETS:

! Look at enough states so that P( i) for large i

 is effectively zero, where P( i) is the steady

 state probability of i customers in the system;

  STATE/ 1..41/: P;

 

! Potential batch sizes are 1, 2, 3 or 4 customers,

 and A( i) = the probability that an arriving batch

 contains i customers;

  BSIZE/ 1..4/: A;

ENDSETS

 

DATA:

  ! Batch size distribution;

  A = .1, .2, .3, .4;

  ! Number of batches arriving per day;

  LMDA = 1.5;

  ! Number of servers;

  S    = 7;

  ! Number of customers a server can

    process per day;

  MU   = 2;

ENDDATA

 

! LAST = number of STATES;

  LAST = @SIZE( STATE);

 

! Balance equations for states where the number of

 customers in the system is less than or equal to

 the number of servers;

  @FOR( STATE( N)| N #LE# S:

   P( N) * (( N - 1)* MU + LMDA) =

    P( N + 1) * MU * N +

     LMDA * @SUM( BSIZE( I)| I #LT# N: A( I)

      * P( N - I))

  );

 

! Balance equations for states where number in

 system is greater than the number of servers, but

 less than the limit;

  @FOR( STATE( N)| N #GT# S #AND# N #LT# LAST:

   P( N) * ( S * MU + LMDA) =

    P( N + 1) * MU * S +

     LMDA * @SUM( BSIZE( I)| I #LT# N: A( I) *

      P( N - I))

  );

 

! Probabilities must sum to 1;

  @SUM( STATE: P) = 1;

 

END

Model: QUEUEM