The OpenModelica FMI & SSP-based co-simulation environment.
OMSimulator can be installed as stand-alone application, as C library to be linked into custom applications, and as python package. OMSimulator is also shipped with the OpenModelica installer, which also includes OMEdit as the graphical editor.
pip3 install OMSimulator
The latest documentation is available as pdf and html versions. For OMSimulatorLib a Doxygen source code documentation is available as well.
Required
Optional
Note Make sure you have fetched and initialized the OMSimulator submodules
You can do this in one of two ways
If you have already cloned OMSimulator, then run
git submodule update --init --recursive
If you are cloning the repository, then use
git clone https://github.com/OpenModelica/OMSimulator.git --recurse-submodules
Configure OMSimulator
cd OMSimulator
cmake -S . -B build/ -DCMAKE_INSTALL_PREFIX=install/
Build and install OMSimulator
cd OMSimulator
cmake --build build/ --target install
./install/bin/OMSimulator --version
Setup OMDev
git clone https://openmodelica.org/git/OMDev.git
OMDev/INSTALL.txt
Open a MinGW-64 terminal
Configure OMSimulator
cd OMSimulator
cmake -S . -B build/ -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=install/
Build and install OMSimulator
cd OMSimulator
cmake --build build/ --target install
./install/bin/OMSimulator --version
The following versions of Visual Studio are supported:
It is not strictly required to install the full Visual Studio IDE. The build only requires Visual C++ Build Tools.
Open a Visual Studio command prompt
Configure OMSimulator
cd OMSimulator
cmake -S . -B build/ -DCMAKE_INSTALL_PREFIX=install/
Build and install OMSimulator
cd OMSimulator
cmake --build build/ --config Release --target install
./install/bin/OMSimulator.exe --version
The testsuite of OMSimulator is run on Jenkins for every commit and creating test reports. The project is tested for the following OS:
In addition the OpenModelica project has a number of test cases using OMSimulator for FMU simulation that can be find in this OpenModelica test reports.
To verify your build is compiled and installed correctly see the following instructions.
Build test dependencies
cmake --build build/ --target testsuite-depends
Run partest
cd testsuite/partest/
./runtests.pl -j4
Use -jN
to test with N
threads.
To disable Python tests add -asan
.
We currently have no bat-Script to build and test with CMD, so you have to use OMDev mingw shell for the tests.
Build test dependencies
cmake --build build/ --target testsuite-depends
Run partest
cd testsuite/partest/
./runtests.pl -j4 -platform=win
Use -jN
to test with N
threads.
To disable TLM tests add -notlm
, to disable Python tests add -asan
.