API Reference
Exported Classes
| Class | Description |
|---|---|
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 |
SimulationError | Error thrown for invalid operations |
ConsoleLogger | Default logger implementation |
DefaultStatsCollector | Default statistics collector |
SeededRandom | Mulberry32 PRNG |
Exported Distribution Functions
| Function | Description |
|---|---|
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
| Type | Description |
|---|---|
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 / ResourceSnapshot | Resource types |
QueueOptions / EnqueueOptions / QueueSnapshot | Queue types |
StatsCollector / StatsSummary | Statistics interfaces |
DistributionHelper | Interface for ctx.dist |
SimLogger / LogLevel | Logging interfaces |
SimulationStatus / SimulationEndStatus | Lifecycle types |
Last updated on