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 SimPy simulation library.
- Simulators can have different and varying step sizes. They only need to agree on a common unit of time (e.g., seconds).
- mosaik-web is a web visualization for mosaik simulations.
- mosaik-pypower is an adapter for the PYPOWER load flow analysis library. .
- mosaik-csv and mosaik-householdsim are simple demo simulators that you can use to “simulate” CSV data sets and load-profile based households.
- There is a repository containing a simple demo scenario for mosaik. .