SimulSI
Simulation Intelligence - Model the system. Simulate the future.
SimulSI is a general-purpose, reproducible simulation and scenario experimentation framework for Python. You describe a system - customers and tellers, patients and doctors, jobs and machines, aircraft and gates, requests and servers - as discrete-event processes; SimulSI runs it, measures it, and helps you answer what if? with replications, confidence intervals, scenario comparisons, Monte Carlo and sensitivity analysis.
from simulsi import Experiment, Scenario, Simulation, model
from simulsi.randomness import Exponential
@model(duration=480, parameters={"arrival_rate": 1.0, "tellers": 3})
def bank(sim: Simulation, p):
tellers = sim.resource("teller", capacity=p.tellers)
arrivals, service = sim.stream("arrivals"), sim.stream("service")
def customer(sim):
yield sim.request(tellers) # wait for a teller
yield Exponential(mean=2.6).sample(service) # being served
sim.release(tellers)
def source(sim):
while True:
yield Exponential(rate=p.arrival_rate).sample(arrivals)
sim.process(customer(sim))
sim.process(source(sim))
result = Experiment(
bank,
[Scenario("baseline"), Scenario("four_tellers", {"tellers": 4})],
replications=30,
seed=42,
).run()
print(result.format_summary(["resource.teller.wait.mean", "resource.teller.utilization"]))
print(result.compare("baseline", metrics=["resource.teller.wait.mean"]).format())
Why SimulSI?
Discrete-event engines tell you what happened in one run. Decisions need more: how sure are we, which scenario is better, which input matters most, and can someone else reproduce this? SimulSI is built experiment-first:
| Reproducible by construction | Every run is determined by its seed. Named random streams (sim.stream("arrivals")) are derived from the seed with NumPy's SeedSequence, so adding a resource never shifts another stream. Serial and parallel runs give identical numbers. |
| Scenario comparison | Scenarios share replication seeds (common random numbers) and comparisons use paired confidence intervals, which are usually much tighter than comparing independent runs. |
| Statistics built in | t and bootstrap CIs, Wilson intervals for probabilities, "have I run enough replications?" advice, convergence curves, batch means for long runs. |
| Monte Carlo & sensitivity | Propagate input uncertainty (random or Latin hypercube sampling, vectorised or per simulation run). One-at-a-time, finite-difference, correlation and standardised-regression sensitivity. |
| Provenance | Each experiment records id, model name/version, git commit, timestamp, seeds, parameters, runtime and environment. Results export to JSON, CSV and Parquet. |
| Model introspection | snapshot() of live state, structured event logs, observed flow graphs (arrival -> queue -> service -> departure), entity state machines, and model validation with a smoke run (unreleased resources, possible deadlocks, zero capacities, unreached states). |
| Decision support | Cost/revenue models on top of metrics; an Objective adapter that hands models to scipy.optimize, OR-Tools, evolutionary or Bayesian optimisers without depending on any of them. |
| Local-first | No LLMs, API keys, telemetry or network access. Core dependencies: NumPy, SciPy, pydantic, PyYAML. Plotting, pandas, Parquet and the web dashboard are optional. |
SimulSI is not a replacement for mature engines such as SimPy or Salabim, or for commercial packages; see how SimulSI differs.
Installation
SimulSI is not on PyPI yet; install from source (Python 3.11+):
git clone https://github.com/Yashjindal11/simulsi.git && cd simulsi
python -m venv .venv
.venv/bin/pip install -e . # core
.venv/bin/pip install -e ".[viz]" # + matplotlib plots
.venv/bin/pip install -e ".[all]" # + pandas, Parquet, matplotlib, Plotly
.venv/bin/pip install -e ".[dev]" # everything needed to run the tests
Command line
simulsi init my-study # starter model.py + experiment.yaml
simulsi validate my-study/experiment.yaml # schema check + model smoke run
simulsi run examples/queue.py -p servers=3 # one replication, metrics table
simulsi experiment my-study/experiment.yaml # scenarios x replications, comparison, saved results
simulsi analyze my-study/results/service-desk --precision 0.05
simulsi visualize my-study/results/service-desk --out plots
simulsi benchmark # events/sec on this machine
simulsi ui my-study/results/service-desk # local dashboard on 127.0.0.1
Experiments are described in YAML - data only, validated against a strict schema:
model: model.py:service_desk
simulation: {seed: 42, duration: 480}
experiment: {replications: 30, workers: 4}
parameters: {arrival_rate: 0.9}
scenarios:
- {name: high_demand, parameters: {arrival_rate: 1.3}}
- {name: extra_server, parameters: {servers: 3}}
Examples
| Example | Shows |
|---|---|
queue.py |
Minimal M/M/c model checked against Erlang C |
bank_queue.py |
Reneging customers, staffing scenarios, replication advice |
hospital.py |
Priority triage, several resources, service levels |
warehouse.py |
Time-varying demand, picking/packing buffers, backlog |
manufacturing.py |
Breakdowns with a repair crew, blocking, cost model |
transportation.py |
Shuttle loop, boarding capacity, left-behind passengers |
aviation.py |
Synthetic airport gates, taxiway holds, tows, weather disruption |
python examples/hospital.py
python scripts/run_examples.py # all of them, quick mode
Documentation
- Getting started - installation, quickstart, first experiment
- Core concepts - simulation, events, entities, resources, queues, processes, randomness, metrics, disruptions, validation, introspection
- Experiments and analysis - scenarios, experiments, Monte Carlo, statistics, comparison, sensitivity, cost, optimisation
- Visualization - plots and the web dashboard
- CLI and configuration
- Architecture - design, module map, performance, limitations
- Extending SimulSI
- Research workflow - reproducibility, provenance, statistical practice
- Examples - walkthroughs of the domain examples
- FAQ - including how SimulSI compares with other tools
- Benchmarks - measured numbers and how to reproduce them
Status
SimulSI is alpha software (0.x) and the API may still change. It is tested on Python 3.11-3.13 (Linux, macOS, Windows in CI) with unit, property-based (Hypothesis), statistical, integration, CLI and performance tests - including checks of simulated M/M/c queues against closed-form Erlang-C results.
Contributing
Issues and pull requests are welcome - see CONTRIBUTING.md and the Code of Conduct. For security reports see SECURITY.md.
License
MIT © 2026 Yash Jindal
Metadata
Release files for simulsi 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| simulsi-0.2.0.tar.gz | 226.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| simulsi-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 424.8 kB
Release files / simulsi-0.2.0.tar.gz
| Download URL | simulsi-0.2.0.tar.gz |
|---|---|
| Size | 226.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09a7aa2ba832ae11a57d96634988939dcaada2782a987493aef63a539c84d403
|
|
BLAKE2b-256 checksum How to use checksums |
3844d5af7e8a588b995e1b3b773ab41c48026eb9a7f5f3d3c026b5e952005de7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.
Transparency logRelease files / simulsi-0.2.0-py3-none-any.whl
| Download URL | simulsi-0.2.0-py3-none-any.whl |
|---|---|
| Size | 198.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1275d382af297e768ed7d2fe6831e85ecff9134f3ee68ef5688da54190bb04bf
|
|
BLAKE2b-256 checksum How to use checksums |
38298d75916ee392baf71026cc920952b9c0fb5a1417d0a4ea593b05d80c6bb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.
Transparency log