1function tf = sn_has_classdep_routing(sn)
2% SN_HAS_CLASSDEP_ROUTING True when classes are not routed alike.
4% TF = SN_HAS_CLASSDEP_ROUTING(SN) returns
true when the routing probabilities
5% differ between job classes, either because a
class switches class on a hop or
6% because two classes leave the same station with different probabilities. It
7%
is false for a single-
class model and for a multiclass model in which every
8%
class traverses the network identically.
10% This
is the condition under which per-
class visit ratios diverge, so a method
11% that aggregates classes into a per-chain demand vector stops being exact.
12% Used to gate Marie
's aggregation-decomposition in SolverMVA: with all classes
13% routed alike that method reproduces the exact solution, and it degrades as the
14% per-class demand vectors separate.
16% sn.rt is indexed station-major, (i-1)*K+r, matching sn_refresh_visits.
18% Copyright (c) 2012-2026, Imperial College London
28tol = GlobalConstants.FineTol;
33 % Class switching: leaving station i as class r and arriving at j
34 % as some other class s makes the routing class-dependent outright.
36 if r ~= s && sn.rt((i-1)*K+r, (j-1)*K+s) > tol
41 p = sn.rt((i-1)*K+r, (j-1)*K+r);
44 elseif abs(p - shared) > tol