MASTERSIM FAQ & Help

Tutorials MASTERSIM

The instructions listed here are intended to make it easier to get started with MASTERSIM.

Tutorial 1 – Structure of the project file

MASTERSIM uses a simple project file that describes the simulation scenario. This project file has the extension msim and contains all the data required to carry out a simulation.

A second file with the same name and the extension bmis saved in the same directory as the project file. This contains the graphical representation of the simulation scenario. As the graphical network display is purely optional, the bmfile can be omitted/ignored/deleted at will.

# Created:	Di. Aug. 14 17:02:20 2022
# LastModified:	Di. Aug. 14 17:02:20 2022

# Project file example for iterating GaussSeidel with time step adjustment
#
# No error test included, time step adjustment based on convergence failures.
tStart                   0 s
tEnd                     12 s
hMax                     30 min
hMin                     1e-06 s
hFallBackLimit           0.001 s
hStart                   1e-07 s
hOutputMin               0.12 s
adjustStepSize           no
preventOversteppingOfEndTime yes
absTol                   1e-06
relTol                   0.01
MasterMode               GAUSS_JACOBI
ErrorControlMode         NONE
maxIterations            1
writeInternalVariables   yes

simulator 0 0 Part1 #ff447cb4 "fmus/simx/Part1.fmu"
simulator 1 1 Part2 #ffc38200 "fmus/simx/Part2.fmu"
simulator 2 1 Part3 #ffff0000 "fmus/simx/Part3.fmu"

graph Part1.x2 Part2.x2
graph Part1.x1 Part2.x1
graph Part2.x3 Part3.x3
graph Part3.x4 Part2.x4

parameters Part1.para1  14.3

Tutorial 2 – Introduction and basic concepts

MASTERSIM is a co-simulation master program that supports FMI co-simulation. If co-simulation is something completely new to you or you are not yet familiar with the functional mock-up interface (FMI), I recommend that you first read a little about the basics, e.g. on the fmi-standard.org website.

MASTERSIM basically connects different simulation models and exchanges data between simulation slaves at runtime. The following diagram illustrates the individual components of the program and the data exchange between them.

FMI diagram of the data flow (files) and programs involved
Diagram of the data flow (files) and programs involved

MASTERSIM consists of two parts:

  1. a graphical user interface (GUI) and
  2. the MasterSimulator simulation program for the command line

The interface makes it very easy to create, adapt and modify simulation projects. A simulation project is saved in two files, the MASTERSIM project and the graphical representation (linking scheme). The latter is optional and not necessary for the simulation.

The simulation is executed by the command line program MasterSimulator, which reads project files, imports referenced FMUs and executes the simulation. The results generated, both by MasterSimulator itself and those of the slaves, are then used by further processing tools to visualize and analyse the results (the free analysis tool with PostProc2 is very well suited for this and my recommendation for MASTERSIM result evaluation).

The separation between the user interface and the actual simulator makes it very easy to use MASTERSIM in a scripted environment or for a systematic variant study as described below in the Workflows section.

Special topics, tips and tricks

With various methods, MASTERSIM can be used much more efficiently and extensively than seems possible using the user interface alone. Script-based editing or creation of the MASTERSIM project file is just one way of increasing efficiency. Further ideas can be found in the tutorials listed and in the manual.


This site is registered on wpml.org as a development site. Switch to a production site key to remove this banner.