Browser width is too narrow.

Rotate the screen or increase the width.

The model of the M/M/C queuing system

The M/M/C queuing system in terms of queuing theory

This system is a classical example of queuing theory and traffic theory.

Entities are arrived as a Poisson process to common queue with FIFO discipline. Queue capacity and queue timeout (maximum waiting time) are infinite. Entities from the queue are distributed between C servers. Free server is selected randomly. The service time value of any server is exponentially distributed.

The characteristics to study are the queue probability, mean waiting time and mean queue length. Since free server selection rule does not affect these characteristics, the selection rule, in general, can be any.

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

The M/M/C queuing model in terms of OpenSIMPLY

The "Generator", "Queue", "Selector" and "Server" blocks are needed for this system description.

In Delphi and Free Pascal the "TGenerator", "TQueue", "TSelector" and "TServer" classes represent these blocks correspondingly.

The Selector block distributes the entities between the servers. This block selects a free server in accordance with the specified selection rule and forwards an entity to this server.

Download executable model of the M/M/C queuing system as an ideal call center.
The M/M/C queuing system block model

Model creation

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

The selection rule for the "Selector" block should be specified with the "RandomSelection" parameter. But, based on remark above, the default "First free selection" rule can used instead. Therefore, this parameter can be omitted.

Normally, the array of "TServer" should be created for the servers. But the "Selector" block can create the specified number of instances of the specified block type and automatically assign them to the selection points. That means no variable for array of the "TServer" is required.

Thus, only the "Gen", "Que" and "Sel" variables will be used for the "TGenerator", "TQueue" and "TSelector" classes instances accordingly. The "TServer" class and initial values will be specified as parameters for the "TSelector" block .

Model parameters

  • Capacity is the total number of entities for simulation.
  • NumberOfServers is the total number of entities for simulation.
  • InterarrivalTime is mean value between entities arrivals.
  • ServiceTime is mean value of service time.
  • ExpTime is a function returning exponentially distributed random values.

Model behavior

The lines below fully describe the model behavior of M/M/C queuing system in terms of OpenSIMPLY:

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

Que:=TQueue.CreateDefault;                                      //  Creating an infinite FIFO Queue.

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

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

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

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

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

Complete program code containing input data and output of results.

program MMCqueue;
{$apptype xxx }  // xxx is a "GUI" or "Console" value.
  TMyModel = class(TModel)             //  Model declaration.  
    procedure Body; override;
  Capacity,                            //  Model parameters.
  NumberOfServers: integer;             
  ServiceTime: Double;                  
procedure TMyModel.Body;               //  Model description.
  Gen: TGenerator;                     //  Blocks declaration.
  Que: TQueue;   
  Sel: TSelector;
  Run(Gen);                            //  Launching the start block.
  Que.ShowStat;                        //  Results.  

  Capacity:=3000;                      //  Initial values of the model.

  Simulate(TMyModel);                  //  Starting a model.

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

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