1function tf = mam_chain_arrival_is_markovian(sn, c)
2% MAM_CHAIN_ARRIVAL_IS_MARKOVIAN True unless chain C
is fed by an ME/RAP source.
4% The system arrival
MMAP of an open chain
is assembled from
the process of each
5% of
the chain
's classes at its reference station, which for an open chain is the
6% source. When any of those is a matrix-exponential (ME) or rational arrival
7% process (RAP), the assembled (D0,D1) pair is legitimately non-Markovian: D0 may
8% carry negative off-diagonal entries.
10% Callers use this to decide whether MMAP_NORMALIZE may be applied. That routine
11% clips negative entries to zero and re-derives the diagonal, which repairs
12% numerical noise on a genuine MAP but on an ME or RAP substitutes a DIFFERENT,
13% Markovian process with different autocorrelation. The distinction has to be
14% made on the declared process type rather than on the sign pattern, because a
15% MAP perturbed by roundoff also shows small negative entries and does need the
18% Copyright (c) 2012-2026, Imperial College London
22inchain = sn.inchain{c};
26if ~isinf(sum(sn.njobs(inchain)))
27 return; % closed chain: a Poisson surrogate is used, always Markovian
29ist = sn.refstat(inchain(1));
31 if sn.procid(ist, k) == ProcessType.ME || sn.procid(ist, k) == ProcessType.RAP