M/M/C/K,T queue system in terms of OpenSIMPLY.

M/M/C/K,T queue system The M/M/C/K,T queue system as M/M/C queue system also receives the entities as a Poisson process. But a queue has limited capacity K and limited timeout (maximum waiting time) T. Queue discipline is also FIFO. The system has a selector that distributes entities to "C"servers. Service time value is exponentially distributed. The free server selection rule has a random selection.



Download executable model of M/M/C/K,T queue system as a simple Call Center.




Model parameters

  • Capacity is the total number of entities for simulation.
  • NumberOfServers is the number of servers.
  • InterArrivalTime is mean value between entities arrivals.
  • QueueCapacity is the number of waiting places in a queue.
  • QueueTimeout is maximum waiting time in a queue.
  • 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.Create([QueueCapacity,ExpTime,QueueTimeout]);       //  Creating a Queue.
                                                                   
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.

Download already compiled executable demos built with OpenSIMPLY.

Complete program code containing input data and output of results.

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

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 description.
var                                    
  Gen: TGenerator;                     //  Blocks declaration.
  Que: TQueue;                          
  Sel: TSelector;                       
begin                                   
  Gen:=TGenerator.Create([Capacity,ExpTime,InterArrivalTime]);       
  Que:=TQueue.Create([QueueCapacity,ExpTime,QueueTimeout]);          
  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;                 
  QueueCapacity:=3;                     
  QueueTimeout:=1;                     
  ServiceTime:=1.3;                    
  NumberOfServers:=2;                  

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


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.