Browser width
is too narrow.

Rotate the screen
or increase
the width.
OpenSIMPLY Free open source simulation software
▲

Simulation Model of M/M/c/K Queue with Reneging

M/M/c/K Queue with Reneging: Theoretical Background

This queuing system can already represent the real objects. Such system is a degenerated case of the M/M/c queue.

Entities arrive at a queue with FIFO discipline according to a Poisson process. Entities from the queue are also distributed between C servers. The service time value of all servers is exponentially distributed. Free server is selected randomly.

The difference is that the queue capacity (the number of waiting places) is not infinite but limited to K places; the queue timeout (maximum waiting time) is also not infinite, but either has a fixed value or follows a specific distribution.

The characteristics under study are the probability of waiting, mean waiting time and mean queue length.

Since how an idle server is selected does not affect the characteristics of interest, this rule can be any, not necessarily random.
M/M/c/K queue with reneging

M/M/c/K Queue with Reneging Model in OpenSIMPLY

The Generator, Queue, Selector and Server blocks are used to describe this system, as in the M/M/c queue.

The Queue block has the initial value to specify the limit of the queue capacity and the limit of the queue timeout.

In Delphi and Free Pascal, these blocks are represented by the classes TGenerator, TQueue, TSelector and TServer, respectively.

Download executable model of the M/M/c/K queue with reneging as almost real call center.
OpenSIMPLY block model of the M/M/c/K queue with reneging

Model Creation

The FIFO is a default discipline for the Queue block, and therefore that must not be specified explicitly.

The connection rule item of the Selector block parameter should be specified with the RandomConnection value. But, based on remark above, the default FirstIdleConnection value can used instead. Therefore, this parameter can be omitted.

Since the Selector block can create the specified number of instances of the block of the specified type and automatically assign them to the selection points, it should not create the TServer type array for a number of servers; and the variable for it is not required.

So, only the variables Gen, Que and Sel will be used for the instances of the classes TGenerator, TQueue and TSelector, respectively. The TServer class and server parameters will be specified as parameters in the Assign method of the TSelector.

Model Parameters

The following variables and functions will be used for the initial values of the blocks.
  • Capacity: to specify the total number of entities for simulation (Generator)
  • QueueCapacity: to specify the number of waiting places for entities (Queue)
  • QueueTimeout: to specify the maximum waiting time for an entity (Queue)
  • NumberOfServers: to specify the number of servers in the system (Selector)
  • InterarrivalTime: to specify the mean value between entities arrivals (Generator)
  • ServiceTime: to specify the mean value of service time (Server)
  • ConstantTime: a block function that returns the specified constant value
  • ExpTime: a block function that returns exponentially distributed random values

Model Behavior

The code below defines the behavior of the >M/M/c/K queue with reneging as an OpenSIMPLY model.

Gen := TGenerator.Create([Capacity, ExpTime, InterarrivalTime]);    //  Creating a Generator.

Que := TQueue.Create([QueueCapacity, ConstantTime, QueueTimeout]);  //  Creating a limited capacity Queue with limited timeout.

Sel := TSelector.Create([NumberOfServers]);                         //  Creating a Selector with default rule.

Gen.Connect(Que);                                                   //  Connecting Generator to Queue.

Que.Connect(Sel);                                                   //  Connecting Queue to Selector.

Sel.Connect(1, NumberOfServers, TServer, [ExpTime, ServiceTime]);   //  Creating Servers and assigning them to Selector.


To compile a model, the code above should be placed in a standard wrapper of a model.
 

Complete Program Code with Input Data and Results

program MMCKreneging;
{$apptype xxx }  // xxx "GUI" or "Console" 
{$S-}
uses
  SimBase,
  SimBlocks,
  SimStdGUI;
  
type
  TMyModel = class(TModel)             //  Model declaration.  
    procedure Body; override;
  end;

var
  Capacity,                            //  Model parameters.
  QueueCapacity,
  NumberOfServers: Integer;
  InterarrivalTime,
  QueueTimeout,
  ServiceTime: Double;
 
procedure TMyModel.Body;               //  Model behavior.
var                                    
  Gen: TGenerator;                     //  Blocks declaration.
  Que: TQueue;   
  Sel: TSelector;
begin 
  Gen := TGenerator.Create([Capacity, ExpTime, InterarrivalTime]);
  Que := TQueue.Create([QueueCapacity, ConstantTime, QueueTimeout]);
  Sel := TSelector.Create([NumberOfServers]); 
  Gen.Connect(Que);
  Que.Connect(Sel);
  Sel.Connect(1, NumberOfServers, TServer, [ExpTime, ServiceTime]);  

  Run(Gen);                            //  Launching the start block.

  Que.ShowStat;                        //  Results.
end;

begin
  Capacity := 3000;                    //  Initial values of the model.
  InterarrivalTime := 1;
  QueueCapacity := 3;
  QueueTimeout :=1 ;
  ServiceTime := 1.3;
  NumberOfServers := 2;

  Simulate(TMyModel);                  //  Starting a model.
end.


The model of an M/M/c/K queue with reneging is much more realistic as the M/M/c queue, but fit only some cases. See the model of the G/M/c/K queue with reneging and retrial, that can be used to simulate a real call center.