1%{ @file sn_is_mm1k_loss.m
2 % @brief Checks
if the network
is a single-station M/M/1/K queue with tail drop
4 % @author LINE Development Team
7function
bool = sn_is_mm1k_loss(sn)
8% BOOL = SN_IS_MM1K_LOSS(SN)
9% Returns
true for a single-
class open Source-Queue-Sink system whose queue
is
10% a single-server exponential M/M/1/K with tail drop (DropStrategy.DROP). This
11%
is the exact regime shared by the closed-
form loss scripts qsys_mm1k_loss
12% (probability-based, used by SolverNC) and qsys_mg1k_loss_mgs (moment-based,
13% used by SolverMVA), so both solvers gate their finite-capacity loss branch on
16if sn.nclasses ~= 1 || sn.nclosedjobs ~= 0 || numel(sn.nodetype) ~= 3
19if ~all(sort(sn.nodetype(:))
' == sort([NodeType.Source,NodeType.Queue,NodeType.Sink]))
22qist = sn.nodeToStation(sn.nodetype == NodeType.Queue);
23sist = sn.nodeToStation(sn.nodetype == NodeType.Source);
24if sn.nservers(qist) ~= 1
27if isempty(sn.droprule) || sn.droprule(qist,1) ~= DropStrategy.DROP
30if ~isfinite(sn.cap(qist)) || sn.cap(qist) <= 0
33if abs(sn.scv(sist,1)-1) > 1e-6 || abs(sn.scv(qist,1)-1) > 1e-6