Class BasBlock
A station that blocks after service holds a completed job at its server until the
job's destination has room. The trailing block of the local row (nvars column 2R)
holds one counter per TARGET CODE code(r, jst, s) = 1 + r + R*(s + R*jst)
(0-based r, jst, s): how many completed class-r jobs the station holds for station
jst, where they will enter as class s. A multi-server station (a Delay, a multiserver
queue) can hold several jobs at once, one per server that completed towards a full
destination, each released only into its own target and as its own class.
Before BUG-110 a single {0,1} column recorded only THAT a job was held: the second completion towards a full destination was re-served instead of held, a held job was released into whichever destination freed first and as any class, and the chain split into many closed communicating classes.
Same encoding and rules as Python native ctmc_ssg.bas_*. The code set is
derived from sn alone (see codes(NetworkStruct, int)).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA become-blocked arc: the rate factor and the local row after the job is held.static final classA departure arc: the rate factor, the held block after it (null = unchanged), and whether it is the transfer of a held job. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleLINE's immediate rate, used for every vanishing move, here a held job's transfer. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleananyHeld(int[] h) static MatrixappendHeld(NetworkStruct sn, int ind, Matrix space) Appends the held block to every row of a station's local space: each row is widened by ncols zero columns and repeated once per admissible held vector (per class at most its jobs in service across its codes, a single-server station at most one job in total).static BasBlock.BlockArcblockArc(NetworkStruct sn, int indA, int[] codes, Matrix row, int classA, int nodeP, int classP) Become-blocked arc for a completion of class_a refused by class_p at node_p, or null: the factor free/in-service of class_a and the row with one more job held for that target.static intcode(NetworkStruct sn, int r, int jst, int s) static int[]codes(NetworkStruct sn, int ind) Sorted target codes of the true-BAS blocking station at node ind, read from sn.static int[]codes(NetworkStruct sn, int ind, Matrix isbasblocking, Matrix isbasdestination) Sorted target codes of node ind: one per (held class r, destination station jst, arriving class s) such that the routing sends class r at ind to class s at jst with positive probability and jst is a BAS destination for class s.static int[]decode(NetworkStruct sn, int code) Inverse ofcode(jline.lang.NetworkStruct, int, int, int): {r, jst, s}, all 0-based.static List<BasBlock.DepArc>depArcs(NetworkStruct sn, int indA, int[] codes, Matrix row, int classA, int nodeP, int classP) The departure arcs of class_a at blocking station ind_a towards class_p at node_p, from the pre-event local row.static int[]Held counts per code, read from the trailing block of a local row.static intindexOf(int[] codes, int code) static booleanisBlocking(NetworkStruct sn, int ind) True when node ind is a true-BAS blocking station of sn.static intncols(int[] codes) Width of the block: one counter per code, at least one column.static booleansingleServer(NetworkStruct sn, int ist) True when station ist serves one job at a time (not INF, at most one server).static MatrixCopy of a local row (1 x w) with its trailing block set to h.
-
Field Details
-
TRANSFER_RATE
public static final double TRANSFER_RATELINE's immediate rate, used for every vanishing move, here a held job's transfer.- See Also:
-
-
Method Details
-
code
-
decode
Inverse ofcode(jline.lang.NetworkStruct, int, int, int): {r, jst, s}, all 0-based. -
isBlocking
True when node ind is a true-BAS blocking station of sn. -
codes
Sorted target codes of the true-BAS blocking station at node ind, read from sn. -
codes
Sorted target codes of node ind: one per (held class r, destination station jst, arriving class s) such that the routing sends class r at ind to class s at jst with positive probability and jst is a BAS destination for class s. A destination that can hold the whole closed population never refuses and is left out.The destination mask is
sn.isbasdestination, the union over blocking stations, rather than a per-station mask, because a per-station declaration does not survive into sn (sn.dropruleis normalized at infinite-capacity stations). Where several blocking stations declare differently this can list a code a per-station mask would not; such a counter is simply never incremented.- Parameters:
isbasblocking- (nnodes x 1) blocking flagsisbasdestination- (nstations x nclasses) destination mask
-
ncols
public static int ncols(int[] codes) Width of the block: one counter per code, at least one column. -
indexOf
public static int indexOf(int[] codes, int code) -
singleServer
True when station ist serves one job at a time (not INF, at most one server). -
held
Held counts per code, read from the trailing block of a local row. -
anyHeld
public static boolean anyHeld(int[] h) -
withHeld
Copy of a local row (1 x w) with its trailing block set to h. -
depArcs
public static List<BasBlock.DepArc> depArcs(NetworkStruct sn, int indA, int[] codes, Matrix row, int classA, int nodeP, int classP) The departure arcs of class_a at blocking station ind_a towards class_p at node_p, from the pre-event local row. With nothing held: one ordinary arc. Otherwise the transfer of a held job for exactly this target (rate TRANSFER_RATE, no routing probability, block minus one) and, unless the station is single-server, the completion of a job still in service at factor free/in-service of its class. -
blockArc
public static BasBlock.BlockArc blockArc(NetworkStruct sn, int indA, int[] codes, Matrix row, int classA, int nodeP, int classP) Become-blocked arc for a completion of class_a refused by class_p at node_p, or null: the factor free/in-service of class_a and the row with one more job held for that target. A single-server station already holding a job has no server left. -
appendHeld
Appends the held block to every row of a station's local space: each row is widened by ncols zero columns and repeated once per admissible held vector (per class at most its jobs in service across its codes, a single-server station at most one job in total). Called while nvars(ind, 2R) already holds the width.
-