Class SnToQrfBlocking
Port of matlab/src/api/sn/sn_to_qrf_blocking.m.
qrf_bas describes a Blocking-After-Service network by a
finite-capacity queue f and an enumeration of the BLOCKING CONFIGURATIONS
reachable behind it. Everything in that enumeration is implied by the model,
so it is derived here rather than demanded from the caller;
options.qrfParams remains an explicit override.
The tables, and the constraint that reads each one in qrf_bas:
f- the ONE finite-capacity queue. The formulation carries a scalar f (ZERO4/ZERO7/ZERO8, THM30, THM3I, THM3L all index it), so a model with two binding buffers is refused here.F(i)- min(buffer size, N) for every queue; N where the buffer is unbounded, since no queue can hold more than the population.BB(m,i)- 1 iff queue i is blocked in configuration m.ZZ(m)- the blocking depth of configuration m.MM(m,0)- head of the FIFO blocking order: the queue that takes the slot when f completes.qrf_basreads ONLY column 0.MM1(m,j)- index of the configuration reached from m when j becomes blocked. Read by THM3L alone, at depth ZM-1.
THREE INVARIANTS, each a correctness condition rather than a convention:
- Configuration 1 MUST be the empty one. ZERO4 iterates
m = 2:MRand ZERO5/ZERO7/ZERO8 testm >= 2to mean "some queue is blocked". ZM = max(ZZ)MUST be the reachable maximum.qrf_basrecomputes ZM from ZZ and closes the depth ladder there, so a truncated enumeration excises states the real chain visits and the polytope stops containing the true distribution -- the bound stops bounding. The size guard therefore REFUSES; it never truncates.- Blocking APPENDS at the tail: a queue that becomes blocked joins behind those already waiting, so MM1's successor is the configuration with j appended, and the head MM(m,0) names never moves.
THE ENUMERATION IS THE FULL ORDERED ONE, and it has to be. A (set, head)
collapse looks sound -- the LP reads configurations only through BB, ZZ,
MM(:,0) and MM1, and both objective and readout sum over m -- and it would
shrink MR from sum_z P(B,z) to 1 + sum_z C(B,z)*z. It was
tried and it is WRONG. Merging the depth-ZM configurations that share a set
and a head makes several THM3L rows, one per depth-(ZM-1) predecessor,
reference the SAME merged successor block. That is extra coupling the fine
system does not have, so the collapsed polytope is strictly SMALLER, not a
projection of the fine one, and it can cut off the true distribution.
Measured on a 4-station model with three feeders (B=3, ZM=3, MR 13 collapsed
vs 16 full), the collapse reported upper bounds of 0.681/0.979/0.768 where
the full enumeration gives 0.709/0.982/0.800: tighter, from a coarser state
space, which is the signature of a cut that is not valid.
So MR is factorial in the number of feeders B, and the size guard is what keeps that honest: it REFUSES an oversized instance rather than trimming the enumeration, because trimming is the same unsound cut by another name.
WHO CAN BE BLOCKED is read from sn.isbasblocking, not from
sn.droprule: LINE accepts the BAS declaration on the upstream station
or on the full destination, and reading droprule at the capped station sees
only the second (BUG-83).
- Since:
- LINE 3.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe derived tables, or the reason they cannot be built. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleVariable-count ceiling of the derived LP. -
Method Summary
Modifier and TypeMethodDescriptionstatic SnToQrfBlocking.ResultsnToQrfBlocking(NetworkStruct sn, double maxVars)
-
Field Details
-
DEFAULT_MAXVARS
public static final double DEFAULT_MAXVARSVariable-count ceiling of the derived LP. A guard, not a tuning knob: the enumeration cannot be truncated (invariant 2), so an oversized model is refused rather than approximated.- See Also:
-
-
Method Details
-
snToQrfBlocking
- Parameters:
sn- network structuremaxVars- variable-count ceiling; passDEFAULT_MAXVARSfor the default- Returns:
- the derived tables, or a Result carrying a non-empty msg
-