Skip to content

Latest commit

 

History

History
168 lines (114 loc) · 4.75 KB

README.md

File metadata and controls

168 lines (114 loc) · 4.75 KB

OMSimulator License: OSMC-PL

The OMSimulator project is a FMI-based co-simulation environment that supports ordinary (i.e., non-delayed) and TLM connections.

Downloads

Full package

Pre-compiled binaries are available for Windows, Linux, and Mac.

Besides the stable versions, you can also download the latest development version.

Python

Installation using pip is recommended:

pip3 install OMSimulator

Python needs to be version 3.8 or above.

Documentation

The latest documentation is avilable as pdf and html. For OMSimulatorLib a Doxygen source code documentation is available as well.

Dependencies

Compilation

Note: Make sure to fetch the submodules, e.g., using git submodule update --init.

Linux / MacOS

  1. Install libxml2-dev

    sudo apt-get install libxml2-dev
  2. Configure OMSimulator

    make config-3rdParty
    make config-OMSimulator

    For the debug configuration add BUILD_TYPE=Debug to make config-OMSimulator.

  3. Build OMSimulator

    make OMSimulator -j4

Windows (OMDev mingw)

  1. Setup OMDev

    • Checkout OMDev (OpenModelica Development Environment): git clone https://openmodelica.org/git/OMDev.git
    • Follow the instructions in OMDev/INSTALL.txt
  2. Configure OMSimulator

    make config-3rdParty
    make config-OMSimulator

    For the debug configuration add BUILD_TYPE=Debug to make config-OMSimulator.

  3. Build OMSimulator

    make OMSimulator -j4

Windows (Visual Studio)

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.

  1. 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
  2. Configure OMSimulator

    .\configWinVS.bat VS15-Win64

    To build the debug version change CMAKE_BUILD_TYPE to Debug or change the release type in Visual Studio to debug.

  3. Build OMSimulator

    .\buildWinVS.bat VS15-Win64

Test your build

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.

Linux / MacOS / Windows (OMDev mingw)

  1. Build test dependencies

    make -C testsuite/ difftool resources
  2. Run partest

    cd testsuite/partest/
    ./runtests.pl -j4

    Use -jN to test with N threads. To disable TLM tests add -notlm, to disable Python tests add -asan.

Windows (Visual Studio)

We currently have no bat-Script to build and test with CMD, so you have to use OMDev mingw shell for the tests.

  1. Build test dependencies

    make -C testsuite/ difftool resources
  2. 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.