M/M/C queue system in terms of OpenSIMPLY.

M/M/C queue system M/M/C queue system is a classical example of queueing theory and traffic theory. The system consists of a single common queue with FIFO discipline and C servers. Entities are arrived as a Poisson process. Queue capacity and timeout (maximum waiting time) are infinite. Service time value is exponentially distributed. The free server selection rule has a random selection.



Watch also the learning video about M/M/C queue system.

Download executable model of M/M/C queue system as an ideal Call Center.


It should be noted that for the practical purposes the classical M/M/C queue system cannot be used. There is no real system where the number of waiting places is infinite, or client can wait for service indefinitely. Therefore, the M/M/C/K,T queue system with a certain capacity and limited timeout should to be used instead. Such a model can be used to simulate a large number of simple systems like barbershop, easy call center etc.


Model parameters

  • Capacity is the total number of entities for simulation.
  • NumberOfServers is the number of servers.
  • InterArrivalTime is mean value between entities arrivals.
  • ServiceTime is mean value of service time.
  • ExpTime is a block function returning exponentially distributed random values.
  • RandomSelection is the block parameter for selection rule.

For assignment of instances for classes TGenerator, TQueue and TSelector, the variables "Gen", "Que" and "Sel" will be used accordingly. An array of variables for TServer is not needed. TSelector can create specified block type and assign created instances to selection points automatically.

Model behavior

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

Que:=TQueue.CreateDefault;                                      //  Creating an infinite Queue (default).

Sel:=TSelector.Create([NumberOfServers,RandomSelection]);       //  Creating a Selector.

Gen.Next:=Que;                                                  //  Connecting Generator to Queue.

Que.Next:=Sel;                                                  //  Connecting Queue to Selector.

Sel.Assign(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 as in M/M/1 system example.

Download already compiled executable demo of M/M/C queue built with OpenSIMPLY.

Complete program code containing input data and output of results.

program MMCqueue;
{$apptype xxx }  // xxx "GUI" or "Console" 

uses
  SimBase,
  SimBlocks,
  SimStdGUI;
  
type
  TMyModel = class(TModel)             //  Model declaration.  
    procedure Body; override;
  end;	
                                     
var                                   
  Capacity,                            //  Model parameters.
  NumberOfServers: integer;             
  InterArrivalTime,                     
  ServiceTime: Double;                  
 
procedure TMyModel.Body;               //  Model description.
var                                    
  Gen: TGenerator;                     //  Blocks declaration.
  Que: TQueue;                        
  Sel: TSelector;                      
begin                                   
  Gen:=TGenerator.Create([Capacity,ExpTime,InterArrivalTime]);  
  Que:=TQueue.CreateDefault;                                     
  Sel:=TSelector.Create([NumberOfServers,RandomSelection]);       
  Gen.Next:=Que;                                                 
  Que.Next:=Sel;                                                 
  Sel.Assign(1,NumberOfServers,TServer,[ExpTime,ServiceTime]);     
  
  Run(Gen);                            //  Starting of initial block.
                                       
  Que.ShowStat;                        //  Outputting of results.  
 end;

begin   
  Capacity:=3000;                      //  Initial values of the model.
  InterArrivalTime:=1;                 
  ServiceTime:=1.3;                    
  NumberOfServers:=2;                  

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


To validate the model of M/M/C queue system, simulation results can be verified using traffic theory analytics.
The value of queue probability can be obtained by the Erlang_C formula.


The OpenSIMPLY tutorial will help you quickly get started. The tutorial contains practical examples with detailed descriptions.

The project documentation is available in different formats and compatible with any IDE.

Discrete event simulation software OpenSIMPLY is free and open source. Free download. Free use. Try it.