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 queuing system.
Entities arrive at a common queue with
FIFO discipline as a Poisson process.
Queue capacity and queue timeout (maximum waiting time) are infinite.
Entities from the queue are distributed between
infinite number of servers.
Free server 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 InfiniteServer 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
- Capacity 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/∞ 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 InfiniteServer.
Gen.Connect(Que); // Connecting the Generator to the Queue.
Que.Connect(InfSrv); // Connecting the Queue to the InfiniteServer.
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.