Simulation model of the M/M/∞ queuing system
The M/M/∞ queue in terms of queuing theory
This system is a classic example of queuing theory, and is a modified case of the
M/M/1 queue.
Entities arrive at a queue with
FIFO discipline according to a Poisson process.
Queue
capacity and timeout are infinite.
Entities from the queue are distributed between
infinite number of servers.
If an idle server is found, the entity is passed to it, otherwise the entity is placed in a queue.
One of several idle servers is selected randomly.
The service time value of any server is exponentially distributed.
The characteristics under study are the
queue probability,
mean waiting time and
mean queue length.
The M/M/∞ queuing model in terms of OpenSIMPLY
The Generator, Queue and Infinite Server blocks are needed for this system description.
In Delphi and Free Pascal, these blocks are represented by the TGenerator, TQueue and TInfiniteServer classes, respectively.
Model creation
The FIFO is a default discipline for the Queue block, and therefore that must not be specified explicitly.
Thus, only the variables Gen, Que and InfSrv will be used for the instances of the classes TGenerator, TQueue and TInfiniteServer, respectively.
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)
- InterarrivalTime: to specify the mean value between entities arrivals (Generator)
- ServiceTime: to specify the mean value of service time (Server)
- ExpTime: a block function that returns exponentially distributed random values
Model behavior
The lines below fully describe the model behavior of
M/M/∞ queuing system in terms of OpenSIMPLY:
Gen := TGenerator.Create([Capacity, ExpTime, InterarrivalTime]); // Creating a Generator.
Que := TQueue.CreateDefault; // Creating an infinite FIFO Queue.
InfSrv := TInfServer.Create(ExpTime, ServiceTime); // Creating an Infinite Server.
Gen.Connect(Que); // Connecting the Generator to the Queue.
Que.Connect(InfSrv); // Connecting the Queue to the Infinite Server.
To compile a model, the code above should be placed in a
standard wrapper of a model.
Complete program code containing input data and output of results.
program MMInfqueue;
{$AppType GUI}
{$S-}
uses
SimBase,
SimBlocks,
SimStdGUI;
type
TMyModel = class(TModel) // Model declaration.
procedure Body; override;
end;
var
Capacity: Integer; // Model parameters.
InterarrivalTime,
ServiceTime: Double;
procedure TMyModel.Body; // Model description.
var
Gen: TGenerator; // Blocks declaration.
Que: TQueue;
InfSrv: TInfServer;
begin
Gen := TGenerator.Create([Capacity, ExpTime, InterarrivalTime]);
Que := TQueue.CreateDefault;
InfSrv := TInfServer.Create(ExpTime, ServiceTime);
Gen.Connect(Que);
Que.Connect(InfSrv);
Run(Gen); // Launching the start block.
Que.ShowStat; // Results.
end;
begin
Capacity := 3000; // Initial values of the model.
InterarrivalTime := 1;
ServiceTime := 1.3;
Simulate(TMyModel); // Starting a model.
end.
To validate the model of the M/M/∞ queuing system, no formula is needed.
Since infinite server always accepts the entities from the queue, the queue probability, mean queue length and mean waiting time will always be a zero.
It should be noted that for the practical purposes the
M/M/∞ queuing system cannot be used.
There is no real system where the number of servers is infinite.
See the model of the
M/M/C queuing system with a limited number of servers, which a bit more realistic.