Giter VIP home page Giter VIP logo

omsimulator's Introduction

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

Tools

Required

  • A C++ compiler with C++17 support.
  • cmake

Optional

  • Sphinx for generating documentation.
  • Doxygen for generating documentation.
  • GNU Flex for verifying testsuite results.

Libraries

Compilation

Note Make sure you have fetched and initialized the OMSimulator submodules

You can do this in one of two ways

  1. If you have already cloned OMSimulator, then run

    git submodule update --init --recursive
  2. If you are cloning the repository, then use

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

Linux / MacOS

  1. Configure OMSimulator

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

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

Windows (OMDev mingw)

  1. Setup OMDev

    • Clone OMDev (OpenModelica Development Environment): git clone https://openmodelica.org/git/OMDev.git
    • Follow the instructions in OMDev/INSTALL.txt
  2. Open a MinGW-64 terminal

  3. Configure OMSimulator

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

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

Windows (Visual Studio)

The following versions of Visual Studio are supported:

  • Visual Studio 15 2017 Win64 and later

It is not strictly required to install the full Visual Studio IDE. The build only requires Visual C++ Build Tools.

  1. Open a Visual Studio command prompt

  2. Configure OMSimulator

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

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

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:

  • linux64 without OMPython
  • mingw-ucrt64
  • 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 correctly see the following instructions.

Linux / MacOS / Windows (OMDev mingw)

  1. Build test dependencies

    cmake --build build/ --target testsuite-depends
  2. Run partest

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

    Use -jN to test with N threads.

    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

    cmake --build build/ --target testsuite-depends
  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.

omsimulator's People

Contributors

lochel avatar robbr48 avatar arun3688 avatar adrpo avatar adeas31 avatar bernhard-thiele avatar anheuermann avatar mahge avatar sjoelund avatar openmodelica-hudson avatar farkasrebus avatar atrosinenko avatar robha67 avatar gabibbo97 avatar hyumo avatar lenarb avatar perost avatar vruge avatar frape315 avatar hkiel avatar superlou avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.