Module sim::simulator [−][src]
The simulator module provides the mechanics to orchestrate the models and connectors via discrete event simulation. The specific formalism for simulation execution is the Discrete Event System Specification. User interaction is also captured in this module - simulation stepping and input injection.
Simulation
and WebSimulation
are used for Rust- and npm-based
projects, respectively. The Simulation
methods use the associated
struct types directly, while the WebSimulation
provides an interface
with better JS/WASM compatibility.
Most simulation analysis will involve the collection, transformation,
and analysis of messages. The step
, step_n
, and step_until
methods
return the messages generated during the execution of the simulation
step(s), for use in message analysis.
Structs
Connector | Connectors are configured to connect models through their ports. During simulation, models exchange messages (as per the Discrete Event System Specification) via these connectors. |
Message | Messages are the mechanism of information exchange for models in a a simulation. The message must contain origin information (source model ID and source model port), destination information (target model ID and target model port), and the text/content of the message. |
Simulation | The |
WebSimulation | The |