Skip to Content
DocumentationAPI Reference

API Reference

Exported Classes

ClassDescription
SimulationEngine<TEventMap, TStore>Main simulation engine
Resource<TEventMap, TStore>Seize/delay/release primitive for shared resources
Queue<T>Standalone FIFO/priority queue with bounded capacity and overflow policies
SimulationErrorError thrown for invalid operations
ConsoleLoggerDefault logger implementation
DefaultStatsCollectorDefault statistics collector
SeededRandomMulberry32 PRNG

Exported Distribution Functions

FunctionDescription
createDistHelper(rng)Creates a DistributionHelper with a custom RNG
uniform(rng, a, b)Continuous uniform
gaussian(rng, mean?, stddev?)Normal (Box-Muller)
exponential(rng, rate)Exponential
poisson(rng, lambda)Poisson (Knuth)
bernoulli(rng, p)Bernoulli
zipf(rng, n, s)Zipf
triangular(rng, min, mode, max)Triangular
weibull(rng, scale, shape)Weibull
lognormal(rng, mu?, sigma?)Lognormal
erlang(rng, k, rate)Erlang
geometric(rng, p)Geometric

Exported Types

TypeDescription
SimEvent<TType, TPayload>Simulation event
SimEntity<TState>Simulation entity
SimContext<TEventMap, TStore>Handler context
EventHandler<TEventMap, TType, TStore>Handler function signature
SimulationResult<TStore>Run result
SimulationEngineOptions<TEventMap, TStore>Engine configuration
ResourceOptions / RequestOptions / RequestHandle / ResourceSnapshotResource types
QueueOptions / EnqueueOptions / QueueSnapshotQueue types
StatsCollector / StatsSummaryStatistics interfaces
DistributionHelperInterface for ctx.dist
SimLogger / LogLevelLogging interfaces
SimulationStatus / SimulationEndStatusLifecycle types
Last updated on