OpenModelica / OMSimulator

The OpenModelica FMI & SSP-based co-simulation environment.
Other
72 stars 51 forks source link
co-simulation fmi simulation ssp

OMSimulator License: OSMC-PL

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

Installation

OMSimulator can be used as:

OMSimulator is also included with the OpenModelica installer, which includes OMEdit, a graphical editor.

Documentation

Latest documentation:

FMI Cross-Check Results

Dependencies

Required Tools

Optional Tools

Libraries

Compilation Instructions

Submodule Initialization

Ensure you have initialized OMSimulator submodules:

git submodule update --init --recursive

Or, when cloning:

git clone https://github.com/OpenModelica/OMSimulator.git --recurse-submodules

Build Instructions

Linux / macOS

  1. Configure OMSimulator:

    cd OMSimulator
    cmake -S . -B build/ -DCMAKE_INSTALL_PREFIX=install/
  2. Build and Install:

    cmake --build build/ --target install
    ./install/bin/OMSimulator --version

Windows (OMDev mingw)

  1. Set Up OMDev:

    • Clone OMDev: git clone https://openmodelica.org/git/OMDev.git
    • Follow the setup instructions in OMDev/INSTALL.txt
  2. Configure OMSimulator:

    cd OMSimulator
    cmake -S . -B build/ -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=install/
  3. Build and Install:

    cmake --build build/ --target install
    ./install/bin/OMSimulator --version

Windows (Visual Studio)

  1. Open Visual Studio Command Prompt

  2. Configure OMSimulator:

    cd OMSimulator
    cmake -S . -B build/ -DCMAKE_INSTALL_PREFIX=install/
  3. Build and Install:

    cmake --build build/ --config Release --target install
    ./install/bin/OMSimulator.exe --version

Testing the Build

OMSimulator tests are automatically run on Jenkins, see latest test reports. To verify your build:

Linux / macOS / Windows (OMDev mingw)

  1. Build Test Dependencies:

    cmake --build build/ --target testsuite-depends
  2. Run Tests:

    cd testsuite/partest/
    ./runtests.pl -j4
    • Use -jN to specify N threads.

Windows (Visual Studio)

Testing requires the OMDev mingw shell:

  1. Build Test Dependencies:

    cmake --build build/ --target testsuite-depends
  2. Run Tests:

    cd testsuite/partest/
    ./runtests.pl -j4 -platform=win
    • Use -jN to specify N threads.