Simcraft Docs

Paradigms on one calendar#

Discrete-event, agent-based, and system dynamics modelling are usually separate tools with separate solvers. In OSDL they are three optional component libraries over one kernel, and a hybrid model is an ordinary model.

What the kernel provides#

The core specification is paradigm-neutral. It defines the clock, the calendar ordering, values and expressions, connections and entity escrow, experiments, and the event stream. Nothing in the kernel knows what a queue or a stock is.

Each standard library then defines component behavior for its namespace:

LibraryStyleComponents
desEvent-driven entity flowsource, queue, server, delay, router, sink
abmAgents with statechartspopulation
sdContinuous stocks and flowsstock, flow, auxiliary

Support is declared per library, outside the document. An engine that claims [email protected] must pass the des conformance suite; it has no obligation to abm or sd unless it claims them too.

How they interleave#

Everything schedulable is an entry on the one calendar, ordered by time and insertion sequence:

  • A DES service completion is an event.
  • An ABM rate-triggered transition is an event.
  • An SD integration boundary, every dt, is an event.

Because ordering is total and deterministic, cross-paradigm interaction is just reference and flow. An SD auxiliary can read a DES server's utilization. An ABM statechart can send its agent into a DES queue as an entity. Discrete events at an integration boundary observe stock values from before the boundary update, so the interleaving is well-defined, not racy.

The hybrid clinic example exercises all three: an agent population feeds a queue, and a continuous fatigue stock throttles the servers.

Why not federate solvers#

The common alternative couples separate simulators through a co-simulation interface. Each solver keeps its own clock, and the coupling layer exchanges values at synchronization points. That approach makes time alignment, event ordering, and reproducibility properties of the integration, not of the model.

OSDL's choice is stricter and simpler: one clock, one ordering, one trace. The cost is that every paradigm must be expressed as components on the shared kernel. The benefit is that a hybrid model has the same determinism promise as a single-paradigm one, with no integration layer to configure or debug.

Read more#