1function UNb = ctmc_signal_busy(sn, ind, ist, schedIst, SIst, StateSpace, istSpaceShift, wset, probSysState)
2% UNB = CTMC_SIGNAL_BUSY(SN, IND, IST, SCHEDIST, SIST, STATESPACE,
3% ISTSPACESHIFT, WSET, PROBSYSSTATE)
5% Exact per-
class busy-server fraction at station IST, read off
the enumerated
6% state space as a 1 x nclasses row.
8% For a
class that a G-network signal can annihilate,
the departure-based
9% estimator T*E[S]/c
is exact only under exponential service: a job destroyed
10% mid-service leaves behind busy time with no completion, so with phase-type
11% service T*E[S]/c under-counts (M/Er2/1 with lambda+=0.5, lambda-=0.4 gives
12% 0.34941 against a
true 0.37696). The in-service occupancy below
is exact
for
15% PS-like disciplines share
the servers among all resident jobs, so
class k
16% gets
the weighted share n_k w_k / sum_j n_j w_j of
the busy servers;
the
17% remaining disciplines expose
the in-service indicator directly through
20% Copyright (c) 2012-2026, Imperial College London
25isPS = any(schedIst == [SchedStrategy.PS, SchedStrategy.DPS, SchedStrategy.GPS, SchedStrategy.LPS]);
26cols = (istSpaceShift(ist)+1):(istSpaceShift(ist)+size(sn.space{ist},2));
28 if probSysState(st) == 0
31 [ni,nir,sir] = State.toMarginal(sn, ind, StateSpace(st,cols));
36 w = sn.schedparam(ist,:);
40 UNb(k) = UNb(k) + probSysState(st)*(nir(k)*w(k)/wtot)*min(sum(ni),SIst)/SIst;
45 UNb(k) = UNb(k) + probSysState(st)*sir(k)/SIst;