mosaik — A flexible Smart Grid co-simulation framework

Mosaik is a flexible Smart Grid co-simulation framework.

Mosaik allows you to reuse and combine existing simulation models and simulators to create large-scale Smart Grid scenarios – and by large-scale we mean thousands of simulated entities distributed over multiple simulator processes. These scenarios can then serve as test bed for various types of control strategies (e.g., multi-agent systems (MAS) or centralized control).

Mosaik is written in Python and completely open source (LGPL), including some simple simulators, a binding to network calculation frameworks like PYPOWER or pandpower and a demonstration scenario.

Mosaik API

The mosaik API allows you to easily integrate existing simulators, control strategies or other components into mosaik, no matter in which programming language they are implemented.

Scenario Definition

Mosaik provides a simple API to create large-scale simulation scenarios. You can start simulator processes, instantiate models and connect the resulting entities (e.g., one-by-one or based on probability distributions).

Sim Manager

Mosaik can start new processes for a simulator or alternatively connect to a running instance of it. If a simulator is written in Python 3, it can also be imported and executed in-process.

Coordinated Execution

Mosaik utilizes an event-discrete simulation approach that combines both time-based and event-based mechanisms to coordinate the execution of all simulators. Thus, each simulator can have a different step size which may even vary during the simulation.

Mosaik 3.3.0 beta released

Dear Co-Simulators, The mosaik team is thrilled to announce that we have released mosaik 3.3 beta ! We want to give you the opportunity to test the new version at an early stage and give us…

GitHub Discussions for mosaik

We are proud to announce that you can now find us on GitHub 🥳. We are especially excited to welcome you to the Discussions feature where we want to get in contact with you 💬. You have a question, a…

What users of mosaik say:

Handling complex scenarios is one of the biggest challenges in Smart Grids research – mosaik solves that.
—Peter Palensky, AIT Vienna
Flexibly integrating COTS energy system simulators is a great feature of mosaik.
—Lars Nordström, KTH Stockholm
We need to integrate our MATLAB load and DG models with power system simulation for a large number of scenarios – mosaik makes our life a lot easier.
—Olav Krause, University of Queensland
Mosaik is easy and fun to use. Coherent scenario specification and flexibility toward the co-simulation composition are the strongest features of this tool.
—Anna Magdalena Kosek, Technical University of Denmark
This technological gem, including the integration framework mosaik, is a ground-breaking real-time co-simulation platform.
—OPAL-RT Technologies Inc.

Cite mosaik

If you want to cite mosaik, e.g. in a work in which you use mosaik, you can use this publication:

C. Steinbrink, M. Blank-Babazadeh, A. El-Ama, S. Holly, B. Lüers, M. Nebel-Wenner, R.P. Ramirez Acosta, T. Raub, J.S. Schwarz, S. Stark, A. Nieße, and S. Lehnhoff, “CPES Testing with mosaik: Co-Simulation Planning, Execution and Analysis”, Applied Sciences, vol. 9, no. 5, 2019.
AUTHOR = {Steinbrink, Cornelius and Blank-Babazadeh, Marita and El-Ama, André and Holly, Stefanie and Lüers, Bengt and Nebel-Wenner, Marvin and Ramírez Acosta, Rebeca P. and Raub, Thomas and Schwarz, Jan Sören and Stark, Sanja and Nieße, Astrid and Lehnhoff, Sebastian},
TITLE = {CPES Testing with mosaik: Co-Simulation Planning, Execution and Analysis},
JOURNAL = {Applied Sciences},
VOLUME = {9},
YEAR = {2019},
NUMBER = {5},
URL = {},
ISSN = {2076-3417},
DOI = {10.3390/app9050923}