mosaik ecosystem

mosaik as a co-simulation tool organizes the data exchange between simulators and coordinates the execution of the connected simulators. This part is called the mosaik core. To become useful, other components need to be connected to it; these other components form the mosaik ecosystem.

mosaik is a co-simulation library. The components and tools form the mosaik ecosystem.

mosaik is a co-simulation library. The components and tools form the mosaik ecosystem.

The ecosystem consists of pre-made bindings to programming languages that make connecting your own simulators easier, see List of high-level APIs, and of pre-made bindings to simulation tools, which are listed below.

While not strictly part of the ecosystem, we also list some example scenarios below to show how these tools can be coupled, and some tools which help with the building of scenarios and the visualization and analysis of results.

mosaik components

Here is a list of simulators that are already connected to mosaik. Most of them are available on PyPI and may therefore be installed using pip or your favorite Python package manager. For simulators that are not available there, we link to their repositories, instead.

The couplings (though usually not the underlying simulation tools) marked with mosaik are developed by us; the others are developed elsewhere. If you have a mosaik simulator that is publically available and might be of use to others, feel free to contact us (mosaik@offis.de) so we can add it to this list. Please provide a short summary (3 to 5 lines) of your simulator’s capabilities (similar to the ones below) when you do.

Basic components

mosaik InputSimulator. Provide constant values or values calculated by a simple Python function to the rest of the simulation. This is mostly intended for test purposes. In real simulations, this will often be replaced by one of the input simulators.

mosaik OutputSimulator. Collect values in Python dicts and access them in your scenario script after the simulation is over. This is mostly intended for test purposes; in real simulations you would usually employ one of the output simulators, instead.

Input simulators

mosaik mosaik-csv. Read (and write) CSV files following a slightly adapted format. This is generally useful if you want to inject existing time-series into your simulation, for example historic price or weather data.

Output and visualization

mosaik mosaik-web. Visualize (parts of) your simulation as an automatically laid-out grid and show live data for one attribute per node. This is mostly useful if the main component in your simulation is a simulator for electrical grids.

mosaik mosaik-csv. Write data from your simulation to a CSV file. Timestamps based on the current simulated time will be added automatically.

mosaik mosaik-hdf5. Write results from your simulation to an HDF5 file.

mosaik InfluxDB 2. Write data from your simulation into an InfluxDB 2 database, with timestamps based on the simulated time. You can add a measurement name to identify the simulation run, and the data’s source entity information will be stored in tags.

mosaik mosaik-timescaledb. Store your simulation outputs in a PostgreSQL database, potentially with TimescaleDB integrated. The adapter can use your existing database structure or create it for you based on the connected attributes. You can also specify run IDs to store data for multiple runs in the same database.

Messaging protocols

mosaik ZeroMQ. Read and write data from a ZeroMQ connection.

mosaik mosaik-104. Connect mosaik to something via the IEC 60870-5-104 protocol. This adapter is relatively limited in the amount of data that can be transmitted. There’s also a draft for an adapter written directly in Python here.

Communication simulation

mosaik mosaik-omnet. Connect the discrete event simulator OMNeT++ (or its commercial cousin OMNEST) to mosaik. In OMNeT++, you use a special scheduler and write modules that can be called with data from mosaik and send data back to mosaik. For the common case that OMNeT++ is used to simulate a communication infrastructure with the INET framework, special apps are provided as a further simplification.

mosaik communication simulator. Simulate communication as delays.

Other general simulation tools

mosaik mosaik-mango. Connect a multi-agent simulation written in the framework mango to mosaik. Special mosaik agents in the agent simulation will appear as entities in the mosaik simulation. Input from mosaik will result in these agents being called, and they can also send data back to mosaik. For this, time between both frameworks is synchronized.

mosaik FMI adapter. Use Functional Mockup Units (FMU) (based on the FMI standard) as simulators in mosaik.

Simulator packages

These are packages of multiple simulators, that therefore do not cleanly integrate into one of the categories above.

pysimmods. Simulation models for different parts of the energy system.

ZDIN-ZLE components. Models for digitalized energy systems from the project ZLE.

QEMS - Quarter Energy Management System. Simulate an energy management system for neighborhoods for analyzing and optimizing energy flows.

Illuminator. An easy-to-use Energy System Integration Development kit to demystify energy system operation, illustrate challenges that arise due to the energy transition and test state-of-the-art energy management concepts.

Outdated simulators

The following simulators still exist, but are not actively maintained. We recommend that you do not use them for new mosaik simulations.

mosaik InfluxDB adapter. Store data from your simulation in an InfluxDB 1 time series database.

mosaik mosaik-sql adapter. Store simulation results into SQL database. If you are using a PostgreSQL database, we recommend that you use the mosaik-timescaledb adapter, instead.

mosaik Odysseus-adapter. Write results to the data stream management system Odysseus.

mosaik mosaik-pypower. Simulate load flows using the PYPOWER library. This adapter is not actively maintained anymore. We recommend that you use mosaik-pandapower-2, mentioned above, instead.

mosaik mosaik-householdsim. Simulate households based on residual load profiles. This simulator is tightly integrated with the mosaik-PYPOWER adapter.

Example simulations

The following repositories contain scenarios using mosaik, which might be helpful to learn from. Scenarios marked with mosaik are developed by us; the others are developed elsewhere.

If you have a publically accessible scenario, feel free to reach out to us to have it included in this list. Ideally, you provide a short description with it.

mosaik The mosaik-demo contains a simple demo scenario for mosaik.

mosaik The DES demo is a simple example scenario showing the new mosaik 3.0 DES features

mosaik COmmunication SIMulation for Agents (cosima) is an example scenario with integrated communication simulation based on OMNeT++.

mosaik The aiomas demo is an example project, demonstrating how to couple a multi-agent system written in aiomas to mosaik.

mosaik The mango demo is an example project, demonstrating how to couple a multi-agent system written in mango to mosaik.

mosaik The binder tutorials contains Python notebooks with example scenarios that can be executed on mybinder.

Benchmark Model Multi-Energy Networks contains the implementation of a multi-energy networks (heat and electricity grid) benchmark model developed in the ERIGrid 2.0 project.

Benchmark Model Multi-Energy Networks STL is based on the multi-energy networks benchmark and contains a same time loop for improved initialization of the simulators.

ZDIN-ZLE scenarios contains the research and development of digitalized energy systems from the project ZLE using mosaik (collection of simulation scenarios).

QEMS - Quarter Energy Management System Scenarios contains scenarios of an energy management system for neighborhoods for analyzing and optimizing energy flows.

nestli (Neighborhood Energy System Testing towards Large-scale Integration) is a co-simulation environment for benchmarking the performance of BACS (building automation and control systems). Is uses EnergyPlus and FMUs with mosaik.

mosaik tooling