Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ git clone https://github.com/OpenModelica/OMSimulator.git --recurse-submodules

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

## Testing the Build
Expand Down
55 changes: 47 additions & 8 deletions doc/UsersGuide/source/OMSimulator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,68 @@
OMSimulator
===========

OMSimulator is a command line wrapper for the OMSimulatorLib library.
OMSimulator is a command line interface for the OMSimulatorLib library.
It can be used to simulate Functional Mock-up Units (FMUs) and System
Structure and Parameterization (SSP) files, as well as execute dedicated
Python simulation scripts using the OMSimulator Python API.

.. index:: OMSimulator; Flags

OMSimulator Flags
-----------------

A brief description of all command line flags will be displayed using
A brief description of all command line flags can be displayed using

:code:`OMSimulator --help`:

.. literalinclude :: omsimulator-help.inc
:language: bash
.. literalinclude:: omsimulator-help.inc
:language: text

To use flag :code:`logLevel` with option debug (:code:`--logLevel=1`)
or debug+trace (:code:`--logLevel=2`) one needs to build OMSimulator
with debug configuration enabled. Refer to the `OMSimulator README on GitHub <https://github.com/OpenModelica/OMSimulator/blob/master/README.md>`_
To use the :code:`logLevel` flag with option debug (:code:`--logLevel=1`)
or debug+trace (:code:`--logLevel=2`), OMSimulator needs to be built with
debug configuration enabled. Refer to the
`OMSimulator README on GitHub
<https://github.com/OpenModelica/OMSimulator/blob/master/README.md>`_
for further instructions.

.. index:: OMSimulator; Examples

Examples
--------

OMSimulator supports several ways of running simulations.

Running a Python script
~~~~~~~~~~~~~~~~~~~~~~~

A dedicated Python script can be passed directly to OMSimulator. The script
can use the OMSimulator Python API to create and configure a simulation.

.. code-block:: bash

OMSimulator example.py

This is useful when the simulation setup is created programmatically or
when a simulation needs additional Python logic.

Running an SSP file
~~~~~~~~~~~~~~~~~~~

An SSP file can be passed directly to OMSimulator. OMSimulator loads the
system structure from the SSP file and executes the simulation.

.. code-block:: bash

OMSimulator example.ssp

Running an FMU
~~~~~~~~~~~~~~

An FMU can also be passed directly to OMSimulator.

.. code-block:: bash

OMSimulator --timeout 180 example.lua
OMSimulator example.fmu

This provides a simple way to simulate an FMU without creating an SSP
system explicitly.
5 changes: 1 addition & 4 deletions doc/UsersGuide/source/OMSimulatorLib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ OMSimulatorLib
This library is the core of OMSimulator and provides a C interface that can
easily be utilized to handle co-simulation scenarios.

.. index:: OMSimulatorLib; C-API

C-API
=====
The following is a list of the available C-API functions:

.. include:: OMSimulatorLib.inc
48 changes: 0 additions & 48 deletions doc/UsersGuide/source/OMSimulatorLua.rst

This file was deleted.

172 changes: 0 additions & 172 deletions doc/UsersGuide/source/OMSimulatorPython.rst

This file was deleted.

Loading