Class StateProbTwins
python/examples/advanced/stateProbabilities/: the four
state-probability queries, getProbAggr, getProb,
getProbSysAggr and getProbSys.
WHAT A station.setState(n) MEANS HERE. The reference scripts set a
state on the model and then ask a solver for its probability, and the JAR
carries that state on the StatefulNode itself, so the twin does
exactly what the reference does: write the per-class counts onto the stations
the reference writes them onto, then query. A station the reference leaves at
-1 is IGNORED by the query it feeds (getProbAggr reads one
station's row, getProbSysAggr reads them all) and is left at the
model's own default initialization.
THE GOLDEN IS THE BARE SCALAR. Each of these examples is goldened on one
number, the CTMC probability, which the reference prints on a line of its own
after a Pmarg_ctmc = label; parse_optimization_scalar keeps
the FIRST bare float in (0, 100). Everything else printed here is labelled,
so the twin can report the whole comparison without moving that cell.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatepr_allprobs_fcfs.py/statepr_allprobs_ps.py: the four queries on the two-class class-switching model, under every solver that carries them.static voidstatepr_aggr.py: the marginal aggregate probability of one station, by the exact chain and by the normalizing constants.static voidstatepr_aggr_large.py: the same query on a four-class model whose class switches all happen at Queue2.static voidstatepr_sys_aggr.py: the joint aggregate probability that every job sits at the last station.static voidstatepr_sys_aggr_large.py: the same joint query on three queues and four unit-population classes.
-
Method Details
-
stateprAggr
public static void stateprAggr()statepr_aggr.py: the marginal aggregate probability of one station, by the exact chain and by the normalizing constants. -
stateprAggrLarge
public static void stateprAggrLarge()statepr_aggr_large.py: the same query on a four-class model whose class switches all happen at Queue2. -
allprobs
statepr_allprobs_fcfs.py/statepr_allprobs_ps.py: the four queries on the two-class class-switching model, under every solver that carries them.- Throws:
Exception
-
sysAggr
statepr_sys_aggr.py: the joint aggregate probability that every job sits at the last station. -
sysAggrLarge
public static void sysAggrLarge()statepr_sys_aggr_large.py: the same joint query on three queues and four unit-population classes. The MATLAB reference reports about 0.000348.
-