1function ON = getAvgOrbit(self)
4% Mean number of jobs waiting in the ORBIT of each retrial station, as an
5% (nstations x nclasses) matrix. Stations that are not retrial queues report 0.
7% A retrial station has no waiting room: a job that finds every server busy
8% joins the orbit instead of queueing, so its station population splits into
9% the jobs currently in service and the jobs orbiting. getAvgQLen reports the
10% whole station population, which
is why the orbit had to be recovered by hand
11% as QLen - Util. This method reports it directly.
13% The in-service population
is obtained from the station throughput by Little
's
14% law applied to the servers alone, E[in service] = X * E[S], which holds for
15% any service distribution and any number of servers, so the orbit length is
16% exact whenever QLen and Tput are.
18% See also Queue.setOrbit, NetworkSolver.getAvgTable
20% Copyright (c) 2012-2026, Imperial College London
23[QN,~,~,TN] = self.getAvg();
24sn = self.model.getStruct();
27if ~isfield(sn,'retrialProc
') || isempty(sn.retrialProc)
33 if size(sn.retrialProc,1) < ist || size(sn.retrialProc,2) < r ...
34 || isempty(sn.retrialProc{ist,r})
35 continue % not a retrial station for this class: no orbit
37 rate_ir = sn.rates(ist,r);
38 if ~isfinite(rate_ir) || rate_ir <= 0
41 inService = TN(ist,r) / rate_ir; % Little's law on the servers
42 ON(ist,r) = max(0, QN(ist,r) - inService);