MasterSim is an FMI co-simulation master and programming library . The Functional Mockup Interface for Co-Simulation in version 1.0 and 2.0 is supported. Using the functionality of version 2.0 functionality, various iteration algorithms are implemented that take advantage of an FMU’s ability to reset state, thereby improving the stability of the simulation.
MasterSim is actively developed at the Institute for Building Climatology at the TU Dresden (see contact page).
The MasterSim installers for the different platforms are hosted on SourceForge:
Parts of MasterSim
MasterSim consists of three parts:
- MasterSimulator command line program
- MasterSimulator program interface
- MasterSim programming library
First of all, it’s free ! The complete source code is available on the GitHub project page under an open source license.
But there are many other reasons to use MasterSim:
- MasterSim is developed across platforms and is available for Windows, Linux and MacOS
- supports scripted execution
- supports multiple FMU instances within a co-simulation scenario
- Detailed configurable master algorithms
- Auto-connect function in the program interface (very useful when FMUs with many matching inputs and outputs are to be connected)
- Detailed simulation statistics inform about the time-critical parts of the co-simulation; This is very helpful for speed optimization and when choosing suitable algorithms
- Support for variational studies running in parallel (multiple MasterSimulator processes) where the same FMU is used simultaneously in multiple simulations running in parallel
- Diagnostic options assist FMU developers in debugging FMUs
- Source code has few dependencies on third-party libraries (only C/C++ standard library and Qt for the program interface), which ensures a long lifetime and compatibility with many platforms.
- Software and source code is actively developed, used and maintained at the Institute for Building Climate, TU Dresden
With the MasterSim program library, you can easily implement co-simulation functionality in your own programs.
FMU import function
The library supports unpacking FMUs (archives), reading the modelDescription.xml file, importing the function in the dynamic library into memory, which is then encapsulated by C++ functions in a meaningful and convenient way.
Included in the library are the standard master algorithms, such as Gauss-Jacobi , Gauss-Seidel and Newton . These can be integrated or called up in your own program code without major adjustments. Of course, various numerical parameters can be tuned.
Best practice guides and examples
The source code of the command line simulator MasterSimulator and the user interface can be used as an example and guide for your own developments.
Supported co-simulation standard
The library currently supports the FMI co-simulation standard 1.0 and 2.0. Some algorithms (eg all algorithms that reset the state of an FMU) require FMI v2.0, but Gauss-Jacobi and Gauss-Seidel also work with FMI v1.0 interface.