A fast, deterministic discrete-event simulation engine with a built-in Cross-Entropy optimizer. TypeScript, zero dependencies, MIT. Library, CLI, or Web Worker.
npm i @plantagoai/yoursim-engine · npx @plantagoai/yoursim-engine run model.json --prettyA directed graph of 12 block types — sources, queues, resources, pools, routing, batching, assembly — flows entities through limited resources. The engine answers “how does it behave?” (waits, utilization, throughput, with confidence intervals) and “what’s the cheapest design that meets my target?” (a Cross-Entropy optimizer over server counts and buffers). It’s the open-source core that powers YourSim Studio.
12 node types, 8 distributions, resource pools, priorities, reneging, preemption, failures, routing — and groups that replicate (×N) for scale.
Event-driven core; KPIs as mean ± 95% CI, percentiles, and over-time series. Seeded ⇒ reproducible, validated against M/M/1 · M/M/c theory.
The Cross-Entropy method finds the lowest-cost design that meets your service constraints, comparing candidates under common random numbers.
runExperiment, optimize, recordRun, expandGroups) or a CLI (validate · run · optimize · record) — JSON in, JSON out.