A simulation environment built on an open specification.
Simcraft runs discrete-event, agent-based, and system dynamics models written in OSDL, an open JSON document format. One engine, one calendar, deterministic runs: the same document and seed produce the same trace, in the browser or on the command line. Extend it with your own component libraries, and keep models in the version control, data pipelines, and AI workflows you already use.
An open document format
An OSDL document is a complete, executable description of a model, its experiments, and its presentation. It is plain JSON with a published schema. It can be diffed, reviewed, and version-controlled like code, and a layout change never touches the model.
The format is the durable asset. Engines, editors, and libraries are built around the document, and each is replaceable. The specification is public at github.com/simcrafthq/osdl under Apache-2.0.
One calendar, all paradigms
Queues, agent statecharts, and stock-and-flow dynamics run on one simulation clock. Scheduled work is ordered by time and insertion sequence, and integration boundaries for continuous dynamics fall on the same calendar. A hybrid model is one model, not three solvers exchanging messages.
Each paradigm is an optional component library with its own specification and conformance suite. An engine declares which libraries it supports and proves the claim by running their suites.
A verified deterministic kernel
A run is a pure function of the document, the experiment, the parameters, the seed, and any admitted external inputs. Within an engine version, replay of that tuple is bit-exact. Random variates come from pinned sampler algorithms, so a distribution draws the same values everywhere.
The kernel semantics are defined by an executable reference machine written in Lean. Conformance is checked by comparing recorded results and portable events against it, case by case. The suites are public, so an independent implementation can substantiate the same claim.
Documents machines can write
A component library definition declares each type's ports, parameter schema, observable state, emitted events, and a prose semantic contract. From the definition alone, a tool can render palettes, generate parameter forms, validate documents, and prompt a language model with precise component semantics.
A model can be written by hand, generated by a script, or assembled in a visual editor. Each is a view over the same document, and a document that validates runs on any conformant engine that supports its component libraries.
Three models, three paradigms
The specification ships validated example documents. Each one runs in your browser: the engine compiled to WebAssembly, driving a scene and charts from the typed event stream.
M/M/1 queue
Discrete event · desThe classic single-server queue: Poisson arrivals, exponential service, FIFO discipline.
SIR epidemic
System dynamics · sdThree stocks, two flows, and mass-action infection dynamics integrated on the shared clock.
Hybrid clinic
Hybrid · abm + des + sdAgents fall sick and queue for treatment while a continuous fatigue stock throttles capacity.
Where this stands
OSDL 0.1 is a draft. The specification, schemas, standard libraries, examples, and the Lean reference machine are public at github.com/simcrafthq/osdl. Every page on this site is generated from repository sources.
If open foundations for simulation matter to you, leave your email and follow along.