Package jline.examples.java.advanced
Class PassAndSwapCyclicExample
java.lang.Object
jline.examples.java.advanced.PassAndSwapCyclicExample
Validate the CTMC (exact) and LDES (simulation) solvers on a CLOSED CYCLIC
network of two pass-and-swap (PAS / order-independent) queues against the
exact product-form brute-force normalizing constant.
Topology: --> Queue1 --> Queue2 --> (cyclic, R closed classes)
PAS queues are order-independent, so the network is product-form. The brute
force enumerates the whole ORDERED state space to obtain the normalizing
constant G, hence exact per-class throughputs and mean queue lengths, which
are compared against the solvers.
Both stations must be valid OI queues: the TOTAL service rate mu_i(c) must
depend only on the customer multiset.
station 1: M/M/k OI queue, class-independent -> mu1(c) = min(n,k1)*s1
station 2: infinite-server, class-dependent -> mu2(c) = sum_j beta2[c_j]
For station 2 the prefix sums depend on order, so the ordered-state
enumeration is genuinely needed (it does not collapse to class counts).
Class indices passed to mu(.) are 0-based (c(0) the oldest job).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidValidate CTMC and LDES against the exact brute-force product form (pas_cyclic_ctmc_vs_bruteforce.m).static doubleBrute-force normalizing constant of the closed cyclic PAS network (pas_cyclic_normconst_bruteforce.m).
-
Constructor Details
-
PassAndSwapCyclicExample
public PassAndSwapCyclicExample()
-
-
Method Details
-
pas_cyclic_normconst_bruteforce
public static double pas_cyclic_normconst_bruteforce()Brute-force normalizing constant of the closed cyclic PAS network (pas_cyclic_normconst_bruteforce.m).A pass-and-swap queue is an order-independent station: its total service rate is a function mu_i(c) of the ordered class sequence c at the station, and the stationary law is product-form and INVARIANT to the swap graph, so the swap graph is not needed here. G is obtained by splitting the population vector K into the per-class counts m at station 1 and K-m at station 2, then summing the OI balance function over every ordered arrangement of each station's count vector.
- Returns:
- the normalizing constant G at the full population
-
pas_cyclic_ctmc_vs_bruteforce
public static void pas_cyclic_ctmc_vs_bruteforce()Validate CTMC and LDES against the exact brute-force product form (pas_cyclic_ctmc_vs_bruteforce.m). -
main
-