Skip to content

lochel/OMSimulator

 
 

Repository files navigation

OMSimulator License: OSMC-PL

The OpenModelica FMI & SSP-based co-simulation environment.

Downloads

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.

Documentation

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

FMI cross-check results

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.

About

OpenModelica FMI & TLM based simulator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 33.4%
  • C++ 33.1%
  • JavaScript 15.2%
  • Python 9.5%
  • C 3.1%
  • CMake 1.3%
  • Other 4.4%