Browser width is too narrow.

Rotate the screen or increase the width.
▲

The model of retrial queuing system

The retrial queuing system in terms of queuing theory

This queuing system represents the real objects.

Such a system is an advanced case of M/M/C/K,T queuing system. Entities are also arrived as a Poisson process to common queue. Queue discipline is the FIFO. The queue capacity is limited with K waiting places. The queue timeout (maximum waiting time) is exponentially distributed with T mean value.

The entities from the queue are distributed between C servers. The service time value of all servers is exponentially distributed. Free server is selected randomly.

The difference from the M/M/C/K,T queuing system is that the entities rejected from the queue due to a timeout are split into two flows. The entities of the first one are destroyed. This simulates the losses, the entities (clients) that don't want to try again to get service. The second flow entities are delayed for a time before the forwarded to the queue. This simulates the attempt of entities to get service again. After a delay these entities are mixed with newly arrived entities, and together are passed to the queue.

So, the mixed flow entering the queue is non-Markovian process, and, therefore, the designation of this system is G/M/C/K,T retrial queue. G stands for general distribution.
The G/M/C/K,T queue

The retrial queuing model in terms of OpenSIMPLY

The "Generator", "Selector" and "Server" blocks are used for this system description as for M/M/C/K,T queuing system.

Instead of "Queue" block, the "ResQueue" block with additional "Rescue" output will be used in this model. Through this output the entities rejected because of timeout can be passed further. Besides the "ResQueue", the "Mixer", "Splitter" and "InfiniteServer" blocks will be used for this model. The "Mixer" block unifies the entity flows from multi-input. The "Splitter" block divides the entity flow from the input into two outputs according with the specified portion. The "Terminal" block just destroys the entities, it is an end station. The "InfiniteServer" block is accepts every entity and delays it for a specified time.

In Delphi and Free Pascal the "TGenerator", "TMixer", "TResQueue", "TSelector", "TServer", "TSplitter", "TTerminal" and "TInfiniteServer" classes represent these blocks correspondingly.

Download executable model of the G/M/C/K,T retrial queuing system as a real call center.
The retrial queuing system block model

Model creation

FIFO is the default discipline for the "ResQueue" block, so it does not need to be specified explicitly.

The selection rule for the "Selector" block should be specified with the parameter "RandomSelection", because the servers are searching randomly. But this parameter can be omitted, and the default selection rule "First free selection" will be used instead, if only the queue probability, the mean waiting time or the mean queue length values are of interest.

The "Gen", "Mix", "Que", "Sel", "Splt", "Trm" and "InfSrv" variables will be used for the "TGenerator", "TMixer", "TResQueue", "TSelector", "TSplitter", "TTerminal" and "TInfiniteServer" class instances accordingly.

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, the array for a number of servers of a "TServer" type should not be created, and therefore no variable is required. The "TServer" class and the parameters will be specified in the "Assign" method of the "TSelector".

Model parameters

  • Capacity is the total number of entities for simulation.
  • QueueCapacity is the number of waiting places in a queue.
  • InterarrivalTime is mean value between entities arrivals.
  • QueueTimeout is maximum waiting time in a queue.
  • NumberOfServers is the total number of entities for simulation.
  • ServiceTime is mean value of service time.
  • ExpTime is a block function returning exponentially distributed random values.
  • RetrialsPercentage is a percentage of timeout rejected entities trying to get service again.
  • RetrialDelay is mean time an entity is waiting before the attempt to get service again.

Model behavior

The lines below fully describe the behavior of G/M/C/K,T retrial queuing system in terms of OpenSIMPLY:

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

Mix:=TMixer.CreateDefault;                                      //  Creating a Mixer.

Que:=TResQueue.Create([QueueCapacity,ExpTime,QueueTimeout]);    //  Creating a ResQueue.

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

Splt:=TSplitter.Create(RetrialsPercentage);                     //  Creating a Splitter.

Trm:=TTerminal.CreateDefault;                                   //  Creating a Terminal.

InfSrv:=TInfServer.Create(ExpTime,RetrialDelay);                //  Creating an InfiniteServer.

Gen.Connect(Mix);                                               //  Connecting Generator to Mixer.

Mix.Connect(Que);                                               //  Connecting Mixer to ResQueue.

Que.Connect(1,Sel);                                             //  Connecting ResQueue to Selector.

Que.Connect(2,Splt);                                            //  Connecting ResQueue to Splitter.

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

Splt.Connect(1,InfSrv);                                         //  Connecting Splitter to InfiniteServer.

Splt.Connect(2,Trm);                                            //  Connecting Splitter to Terminal.

InfSrv.Connect(Mix);                                            //  Connecting InfiniteServer to Mixer.


To compile a model, the code above should be placed in a standard wrapper of a model as in the M/M/1 loss system example.

Complete program code containing input data and output of results.

program MMCKTqueue;
{$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,
  RetrialsPercentage,
  RetrialDelay: Double;     
 
procedure TMyModel.Body;             //  Model description.
var                                    
  Gen: TGenerator;                   //  Blocks declaration.
  Mix: TMixer;
  Que: TResQueue;   
  Sel: TSelector;
  Splt: TSplitter;
  Trm: TTerminal;
  InfSrv: TInfServer;
begin 
  Gen:=TGenerator.Create([Capacity,ExpTime,InterarrivalTime]);
  Mix:=TMixer.CreateDefault;                                  
  Que:=TResQueue.Create([QueueCapacity,ExpTime,QueueTimeout]);
  Sel:=TSelector.Create([NumberOfServers]);                   
  Splt:=TSplitter.Create(RetrialsPercentage);                 
  Trm:=TTerminal.CreateDefault;                               
  InfSrv:=TInfServer.Create(ExpTime,RetrialDelay);       

  Gen.Connect(Mix);                                              
  Mix.Connect(Que);                                              
  Que.Connect(1,Sel);                                              
  Que.Connect(2,Splt);                                           
  Sel.Connect(1,NumberOfServers,TServer,[ExpTime,ServiceTime]);
  Splt.Connect(1,InfSrv);                                          
  Splt.Connect(2,Trm);                                           
  InfSrv.Connect(Mix);                                           
    
  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;
  RetrialsPercentage:=20;             
  RetrialDelay:=0.16;

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