Class LalSsa
lal.ssa). The joint state space is never constructed: each step
asks the event kernel for the moves of the current state.
Two engines are offered. "ssa" is the serial direct method: one
exponential holding time at the total enabled rate, then a cumulative choice
among the enabled moves. "nrm" is the next-reaction method: one clock
per event label, kept in a heap, with clocks rescaled when an agent the
label reads changes and redrawn when the label fires or becomes enabled.
The random stream is a Random seeded by seed,
consumed in the same order as the Python reference (initial-state draws per
agent with an initial distribution, then per step an exponential followed by
a uniform for ssa, or the per-label exponentials and one uniform per
firing for nrm). The draws are not numpy's PCG64 stream, so paths
are not bit-identical to Python; the statistics and seeding semantics are.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classResult ofsimulate(jline.lang.lal.Composition, int, long)(PythonLALSSAResult). -
Method Summary
Modifier and TypeMethodDescriptionstatic LalSsa.Resultsimulate(Composition model, int events, long seed) static LalSsa.Resultstatic LalSsa.ResultSimulate event races without constructing the joint state space.
-
Method Details
-
simulate
-
simulate
-
simulate
public static LalSsa.Result simulate(LalModel snapshot, int events, long seed, double warmupfrac, String method) Simulate event races without constructing the joint state space.- Parameters:
events- positive event budgetseed- random seedwarmupfrac- fraction of the budget discarded before measuring, in [0, 1)method-"ssa"or"nrm"
-