mosaik — Blog

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 feedback, so that we can improve the stable release.

⚠️ Be careful when testing the beta version, things may break! ⚠️

So, what’s new in mosaik 3.3?

The most notable change happens under the hood. We did an internal rework and refactoring of the time handling in mosaik. This shall increase the performance of mosaik noticeably - especially for scenarios with a huge amount of simulators - and also clarifies the implementation of the scheduling process. The scenarios that have worked with previous mosaik versions should work as before - nevertheless, we have already encountered an unexpected behaviour in certain scenarios which we are working on to fix. If you also encounter unexpected behaviour, let us know. This is what we have released the beta version for 🚀

We also have some other useful and more user-facing new features:

mosaik now provides a couple of basic simulators. These can be used to consume output, e.g., storing it in a dict or providing data, e.g., from a custom function.

A simulator can now be connected to itself if the connection is weak or time_shifted. This restriction is technically no longer necessary - now you have even more freedom creating your scenarios!

Last but not least, simulators can now return extra_info for created entities. This can, for example, be used for nominal voltages for nodes in a grid in a pandapower simulator.

Have fun with the new version! If you have feedback, write us a massage here on GitHub Discussions or if you find a bug, feel free to create an issue on GitLab.

Author: Tobias Brandt

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 feature request or want to generally discuss the amazing possibilities with co-simulation and mosaik? We are curious to hear from you! We still have our mailing list, but we see GitHub as the better place to exchange problems, solutions, and ideas. See you there!

Author: Tobias Brandt

Mosaik 3.2.0 released

The mosaik team is thrilled to introduce the latest release, mosaik 3.2. Now, let’s explore the new features.

One notable addition is the incorporation of a visualization tool to simplify understanding the debug information:

Among others, we included a dataflow graph, that shows the direction of the dataflow between simulators and if the connection is time-shifted/weak.

The execution graph shows the order in which the simulators are executed.

The execution time graph shows the execution time of the different simulators and you can also plot execution time per simulator.

We have an additional enhancement for Windows users: Starting now, you can open a new console window for simulators, providing a more comprehensive overview of the simulation process.

On another note, we made the decision to shift from SimPy to asyncio, primarily because of its more robust and active development. With this change, errors connected to a maximum packet size for messages between simulators should be fixed. We paid off a technical debt that we have carried for a long time.

In addition we released the mosaik-api-v3 in a seperate package. This will enable users to have simulators using different versions of the mosaik-api in the same virtual environment in the future. With this change we want to make it possible to continue the development of mosaik and its API without causing the users breaking changes with a new API release. The plan is that you can stay on your API version as long as the current mosaik version supports it and can develop new adapters with newer API versions or update your existing adapters one by one.

We also have some minor changes.

An overview of all changes, can be found in the issues in GitLab.

Have fun with the new version! If you see more potential to improve mosaik or find a bug, feel free to create an issue on GitLab.

Author: Deborah Tolk

We are hiring!

You are interested in developing mosaik to be ready for the next challenges in co-simulation to come? Feel free to take a look at the open job positions at the OFFIS Energy division. Due to a new project especially for mosaik, we have open positions for core mosaik development.

Author: Tobias Brandt

Mosaik 3.1.0 released

The mosaik team is proud to announce the release of mosaik 3.1.

Mosaik now uses a loguru to log its output instead of simply writing it to stdout.

The output of the simulation progress is now handled by tqdm which provides a nice progress bar. By setting print_progress='individual' on your world.run call, you can get individual progress bars for your simulators.

We are also working towards more principled semantics for connecting simulators. To this effect, two features of mosaik have been deprecated:

  • The concept of async_requests and set_data calls has been scheduled for removal in mosaik 4. We believe that simulations can be set up more cleanly by using time_shifted and weak connections. If you have a setup where asynchronous requests are needed, please get in touch via the mailing list or our GitLab issues.
  • Direct connections between persistent outputs and trigger inputs and between non-persistent outputs and non-trigger inputs will no longer be supported in a future version of mosaik. Instead, we will provide adapters that encode the desired semantics more cleanly. If you’re currently using these types of connections, please get in touch via the mailing list or our GitLab issues so that we can learn about your requirements for these adapters.

Internally, mosaik now uses Python type annotations. These can improve your editor’s autocompletion and inline documentation. (See here if your type checker complains about the type of your SIM_CONFIG.)

Last but not least, the new release contains some bug fixes related to lazy stepping, negative max_advance values in same time loop, missing intial data in hybrid simulators, and None value in particular connection structure. An overview of all changes, can be found in the issues in GitLab.

Author: Eike Schulte

Webinar “mosaik 3.0”

The “mosaik 3.0” webinar was held at September 29, 2021 online as part of the ERIGrid 2 project. It contained a introduction to the general idea of mosaik and explanation of the new features of mosaik 3.0. Additionaly, updated tutorials including new mosaik 3.0 features like event-based simulators and same time loops were shown as practical demonstration of the usage of mosaik. The workshop material consisting of the slides and a recording of the presentation can be found at Zenodo.

Author: Jan Sören Schwarz

Mosaik 3.0.0 released

New releases of mosaik, mosaik‘s high-level APIs and many simulators of mosaik’s ecosystem are available! This is a major upgrade to improve the discrete-event capabilities of mosaik’s co-simulations. The main new features are:

  • Simulators’ steps can now also be triggered based on available output of other simulators
  • Output data can be specified as 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
  • Explicit definition of the time resolution in a co-simulation scenario

Co-simulations with components that transmit short-lived messages to other components (e.g. communication simulators, agents of control systems, recognition systems, etc.) can thus be setup in an intuitive and straight-forward way. In comparison with traditional mosaik simulations, these scenarios are also simulated with both higher accuracy and improved performance. Due to the improved interaction capabilities between simulators, it’s now also possible to let simulators converge to a joint system state without a progress in time. The concept of superdense simulation time and efficient scenarios with simulators, which typically operate on different time scales, are now also supported by mosaik. Furthermore, the new features permit to analyze human interactions with simulated mosaik environments as external events (e.g. GUIs) can now be integrated within the co-simulation’s scheduling.

All of this has been achieved with minimal adjustments of mosaik’s API. In this way, old simulators are still supported and the new features are well integrated within the proven co-simulation concepts. Thus, it’s easy to support the new features within your simulators and to setup hybrid co-simulations that use the established time-based scheduling as well as the new discrete-event capabilities. Please have a look at the new documentation and find out how mosaik 3.0 can improve the accuracy and performance of your co-simulations or whether the requirements of your simulation scenarios are supported by mosaik 3.0, so you can make the transition and greatly benefit from the co-simulation concept.

Author: Reef Eilers, Thomas Raub

page 1 of 5

older articles »