Class Solver_ssa_analyzer
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidThrows whenfiringDependenceReason(jline.lang.NetworkStruct)is non-empty: the explicit-NRM refusal.static StringWhy the NRM engine cannot run a net with marking-dependent firing rates.static StringfluidRefusal(NetworkStruct sn, String method) Why SolverSSA cannot run a fluid stochastic Petri net under the given method, or "" when it can.static voidimmTputBalance(NetworkStruct sn, SSAResult res) Throughput of the station-class pairs whose service is Immediate, taken from flow balance rather than from the sample path (MATLAB ssa_imm_tput_balance.m).static Stringstatic StringWhether the NRM engine can run this model, as a SENTENCE.static SSAResultsolver_ssa_analyzer(NetworkStruct snInput, SolverOptions options, SolverSSA solverSSA) static doublessaWarmupFrac(NetworkStruct sn, SolverOptions options) Effective warmup (initial-transient) discard fraction of an SSA run, mirroring matlab/src/solvers/SSA/ssa_warmupfrac.m.
-
Method Details
-
firingDependenceReason
Why the NRM engine cannot run a net with marking-dependent firing rates.The NRM builds one constant-propensity reaction per timed mode, so the g(marking) multiplier set by
Transition.setFiringRateDependencehas no place in it, and answering with the nominal rate would be a wrong number under the caller's own method name. The SERIAL engine does apply it:State.handleFireEventscales the mode's firing rate byfiringdep.get(m).apply(epSpace)on the state it is leaving, the same code and the same marking matrix SolverCTMC enumerates. The refusal is therefore confined to an explicitmethod="nrm", and every other method runs such a net on the serial engine. Mirrors matlab/src/solvers/SSA/ssa_firingdep_refusal.m and C++ssa_check_firingdep(solver_ssa_nrm_spn.h).A FLUID NET IS EXEMPT. Its runner (spnFluidRun) recomputes every propensity at each segment, and the marking is constant within a segment, so it applies g(marking) exactly, on the same input-place marking the serial engine reads.
- Parameters:
sn- network structure of the analyzed model- Returns:
- the refusal sentence, or the empty string when no mode carries a dependence
-
fluidRefusal
Why SolverSSA cannot run a fluid stochastic Petri net under the given method, or "" when it can.A fluid net has ONE engine, the NRM Petri runner (its piecewise-deterministic loop), so 'serial' and 'ssa' are withdrawn and every other method is bound by that runner's reach: Place, Transition, Source and Sink nodes only, exponential single-phase firing and arrivals, every Source feeding a Place, and no infinite marking. A marking-dependent firing or flow rate is read by the runner, segment by segment. Returns "" for a model without fluid places. Mirrors matlab/src/solvers/SSA/ssa_fluid_refusal.m.
- Parameters:
sn- network structure of the analyzed modelmethod- the SSA method, with any "ssa." prefix removed- Returns:
- the refusal sentence, or the empty string
-
assertNrmFiringDependence
Throws whenfiringDependenceReason(jline.lang.NetworkStruct)is non-empty: the explicit-NRM refusal.- Parameters:
sn- network structure of the analyzed model
-
ssaWarmupFrac
Effective warmup (initial-transient) discard fraction of an SSA run, mirroring matlab/src/solvers/SSA/ssa_warmupfrac.m.An explicit
options.config.warmupfracis honoured as given, 0 included, clamped to [0, 0.99]. When it is unset (null) the rule is the same in all four codebases: a STEADY-STATE run (infiniteoptions.timespanend) of a model with at least one OPEN class drops the first 20% of its samples, the LDES default, and any other run drops none. An open model starts empty, far from its stationary load; a closed model starts at a feasible state of its fixed population. Transient runs and sample paths keep every sample.- Parameters:
sn- the network structureoptions- the solver options- Returns:
- the fraction of the requested samples whose tallies are discarded
-
solver_ssa_analyzer
public static SSAResult solver_ssa_analyzer(NetworkStruct snInput, SolverOptions options, SolverSSA solverSSA) -
nrmMethodRefusal
Whether the NRM engine can run this model, as a SENTENCE.ONE PREDICATE, TWO CALLERS. The dispatch above asks it to decide whether to PREFER the NRM on the
defaultpath;SolverSSA .supportsModelMethodasks it to decide whethernrmmay be OFFERED at all. Inlined in the dispatch it could answer only the first, sofindSolverreportedssa.nrmrunnable on every model and an explicitSolverSSA(model,"nrm")then raised fromSolver_ssa_analyzer_nrmon the very models this test excludes.- Parameters:
sn- the network structure- Returns:
- empty string when the NRM can run it, else the reason it cannot
-
nrmEligibleReason
-
immTputBalance
Throughput of the station-class pairs whose service is Immediate, taken from flow balance rather than from the sample path (MATLAB ssa_imm_tput_balance.m).Such a station holds a job for zero time, so its departure rate IS its arrival rate. Both SSA engines estimate TN as the time integral of the departure rate, which at an Immediate station is noise: each visit lasts ~Exp(Immediate) and adds rate*dt ~ Exp(1) rather than one departure. TN there is replaced by the arrival rate that SnGetArvRFromTput derives from the other TNs (timed stations, measured cache hit/miss split, stateless routing), swept until a chain of Immediate stations settles; XN, RN of the replaced pairs and CN follow. Sources are excluded, and the step is skipped under JSQ/SQ routing, whose split is not in sn.rt.
- Parameters:
sn- the network structureres- the SSA result, updated in place (TN, RN, CN, XN)
-