The OMSimulator project is a FMI-based co-simulation environment that supports ordinary (i.e., non-delayed) and TLM connections.
Pre-compiled binaries are available for Windows, Linux, and Mac.
Besides the stable versions, you can also download the latest development version.
Installation using pip
is recommended:
pip3 install OMSimulator
Python needs to be version 3.8 or above.
The latest documentation is avilable as pdf and html. For OMSimulatorLib a Doxygen source code documentation is available as well.
- Boost (system, filesystem)
- cmake
- Sphinx
- readline (if using Lua)
- 3rdParty subproject
- FMILibrary
- Lua
- PugiXML
- SUNDIALS CVODE
- SUNDIALS KINSOL
- CTPL
Note: Make sure to fetch the submodules, e.g., using git submodule update --init
.
-
Install libxml2-dev
sudo apt-get install libxml2-dev
-
Configure OMSimulator
make config-3rdParty make config-OMSimulator
For the debug configuration add
BUILD_TYPE=Debug
tomake config-OMSimulator
. -
Build OMSimulator
make OMSimulator -j4
-
Setup OMDev
- Checkout OMDev (OpenModelica Development Environment):
git clone https://openmodelica.org/git/OMDev.git
- Follow the instructions in
OMDev/INSTALL.txt
- Checkout OMDev (OpenModelica Development Environment):
-
Configure OMSimulator
make config-3rdParty make config-OMSimulator
For the debug configuration add
BUILD_TYPE=Debug
tomake config-OMSimulator
. -
Build OMSimulator
make OMSimulator -j4
The following versions of Visual Studio are supported:
- "VS14-Win32" -> "Visual Studio 14 2015"
- "VS14-Win64" -> "Visual Studio 14 2015 Win64"
- "VS15-Win32" -> "Visual Studio 15 2017"
- "VS15-Win64" -> "Visual Studio 15 2017 Win64"
It is not strictly required to install the full Visual Studio IDE. The batch scripts only require Visual C++ Build Tools.
-
Install boost (VS14: 1.63, VS15: 1.64)
- Download and install precompiled boost libs, e.g. from this source
- Set environment variable
BOOST_ROOT
to install path, e.g:BOOST_ROOT=C:\local\boost_1_64_0
-
Configure OMSimulator
.\configWinVS.bat VS15-Win64
To build the debug version change
CMAKE_BUILD_TYPE
toDebug
or change the release type in Visual Studio todebug
. -
Build OMSimulator
.\buildWinVS.bat VS15-Win64
The testsuite of OMSimulator is run on Jenkins for every commit and creating test reports. The project is tested for the following OS:
- linux-arm32
- linux64 without OMPython
- cross-compiled mingw64
- msvc64
- cross-compiled OSX
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 corrrectly see the following instructions.
-
Build test dependencies
make -C testsuite/ difftool resources
-
Run partest
cd testsuite/partest/ ./runtests.pl -j4
Use
-jN
to test withN
threads. To disable TLM tests add-notlm
, 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
make -C testsuite/ difftool resources
-
Run partest
cd testsuite/partest/ ./runtests.pl -j4 -platform=win
Use
-jN
to test withN
threads. To disable TLM tests add-notlm
, to disable Python tests add-asan
.