Features
The following sections provide an overview of the features mosaik currently provides. You can also take a look at mosaik’s history to follow its evolution.
Simple and intuitive API for simulators and control strategies:
Only four types of calls from mosaik to a simulator:
- init – Initialize the simulator.
- create – Create model instances.
- step – Perform a simulation step based on some input data for a time interval.
- get_data – Get data from the simulator.
Control strategies can make asynchronous requests to mosaik during a step:
- get_progress – Get the current simulation progress in percent.
- get_related_entities – Get a list of entities related to another entity (to allow traversing the simulated topology).
- get_data – Retrieve data from another simulator.
- set_data – Set input data for another simulator.
Based on plain network sockets with JSON encoded messages.
High-level API implementations that implement the network event loop and provide a simple base class that you can inherit from. Implementations are currently available for:
Implementations for other languages will be added on demand.
Simple but flexible scenario creation:
- Scenario description in pure Python leveraging its simple syntax and great flexibility to support from a few up to tens of thousands entities.
- You just start a simulator and get a model factory. You use that factory to create model instances (entities). You connect the entities with others. You run simulation. Done.
- Connection entities is based on a single primitive called connect. It only connects two entities with each other but can be used as a building block to implement any connection strategy for sets of entities that you can imagine.
Management of external simulator processes:
- Simulators written in Python 3 can be executed in process.
- Simulators can be started as external processes.
- Mosaik can connect to an already running instance of a simulator.
Event-based simulation execution:
- Based on the established Asyncio simulation library.
- Simulators can have different and varying step sizes. They only need to agree on a common time resolution, which can be defined in the scenario.
- Simulators’ steps can be triggered based on available output of other simulators.
- Output data can be specified as persistent or non-persistent (i.e., transient).
- Simulators can request steps asynchronously to react to external events.
- When there’re no interactions, simulators can compute the state transformation of several fundamental time steps at once (max_advance).
Powerful ecosystem:
In our readthedocs we list all our own and external components we know with a short description. All components of the mosaik ecosystem provided by the mosaik team can be found at Gitlab.