With the customer arrival rate arrivalRate
and the service rates at each server being serviceRate1
, serviceRate2
, and serviceRate3
, respectively, you can define this queuing process by
g = {arrivalRate, 0, 0};
m = {serviceRate1, serviceRate2, serviceRate3};
r = {{0, 1, 0}, {0, 0, 1}, {0, 0, 0}};
c = {1, 1, 1};
queuingProcess = QueueingNetworkProcess[g, r, m, c];
If you then want to compute the probability of e.g. having one customer at each server you can use:
sDist = StationaryDistribution[queuingProcess];
PDF[sDist, {1, 1, 1}]
To get the performance measures at all three nodes for some numerical values one can use:
Table[QueueProperties[{queuingProcess /. {arrivalRate -> 5., serviceRate1 -> 7.,
serviceRate2 -> 6.5, serviceRate3 -> 8.3}, i}], {i, 3}]
If you want to perform calculations for several different rates, starting with a function like
queuingProcessF[arrivalRate_, {serviceRate1_, serviceRate2_, serviceRate3_}] :=
QueueingNetworkProcess[{arrivalRate, 0, 0}, {{0, 1, 0}, {0, 0, 1}, {0, 0, 0}},
{serviceRate1, serviceRate2, serviceRate3}, {1, 1, 1}]
might be more appropriate, though.
2) Using the product of the individual QueueingProcess
es
You can define the same queuing process by first defining each individual queue
q1 = QueueingProcess[arrivalRate, serviceRate1];
q2 = QueueingProcess[arrivalRate, serviceRate2];
q3 = QueueingProcess[arrivalRate, serviceRate3];
and then use ProductDistribution
to generate the same StationaryDistribution
:
sDist2 = ProductDistribution[StationaryDistribution[q1], StationaryDistribution[q2],
StationaryDistribution[q3]];
PDF[sDist2, {1, 1, 1}] == PDF[sDist, {1, 1, 1}]
True