Skip to content
YourSim Engine
DES + design optimization · TypeScript · MIT
YourSim Engine

Simulate any queue or network system — and optimize its design — from one small library.

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 --pretty

What is YourSim Engine?

A 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.

🧱

Model

12 node types, 8 distributions, resource pools, priorities, reneging, preemption, failures, routing — and groups that replicate (×N) for scale.

🎲

Simulate (deterministic)

Event-driven core; KPIs as mean ± 95% CI, percentiles, and over-time series. Seeded ⇒ reproducible, validated against M/M/1 · M/M/c theory.

🎯

Optimize

The Cross-Entropy method finds the lowest-cost design that meets your service constraints, comparing candidates under common random numbers.

Use it as a library (runExperiment, optimize, recordRun, expandGroups) or a CLI (validate · run · optimize · record) — JSON in, JSON out.
📄 1 page

One-pager

What the engine is, what it computes, and why you can trust it.

Read →
📘 whitepaper

Whitepaper

Model, methods (DES + Cross-Entropy), determinism, and validation.

Read →
📦 npm

Install

npm i @plantagoai/yoursim-engine — ESM + types, zero deps.

npm →
⌨ API & CLI

API & CLI

Library functions and the JSON-in/JSON-out command line.

Reference →
⌥ source

GitHub

MIT, open source — read the code, file issues, contribute.

Repo →
🖥 visual

Try it in Studio

Prefer no code? Build and run models visually in the free app.

Open Studio →