diff --git a/BUILD.md b/BUILD.md index 790956b5d..8a7e3b6b1 100644 --- a/BUILD.md +++ b/BUILD.md @@ -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 diff --git a/doc/UsersGuide/source/OMSimulator.rst b/doc/UsersGuide/source/OMSimulator.rst index 4cd4d4233..a8ea411db 100644 --- a/doc/UsersGuide/source/OMSimulator.rst +++ b/doc/UsersGuide/source/OMSimulator.rst @@ -3,22 +3,28 @@ 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 `_ +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 +`_ for further instructions. .. index:: OMSimulator; Examples @@ -26,6 +32,39 @@ for further instructions. 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. diff --git a/doc/UsersGuide/source/OMSimulatorLib.rst b/doc/UsersGuide/source/OMSimulatorLib.rst index ff6bade2a..dc7936189 100644 --- a/doc/UsersGuide/source/OMSimulatorLib.rst +++ b/doc/UsersGuide/source/OMSimulatorLib.rst @@ -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 diff --git a/doc/UsersGuide/source/OMSimulatorLua.rst b/doc/UsersGuide/source/OMSimulatorLua.rst deleted file mode 100644 index 3f2ade4bf..000000000 --- a/doc/UsersGuide/source/OMSimulatorLua.rst +++ /dev/null @@ -1,48 +0,0 @@ -.. index:: OMSimulatorLua - -.. _oms-lua : - -OMSimulatorLua -================= - -This is a shared library that provides a Lua interface for the OMSimulatorLib -library. - -.. index:: OMSimulatorLua; Examples - -Examples --------- - -.. code-block:: lua - - oms_setTempDirectory("./temp/") - oms_newModel("model") - oms_addSystem("model.root", oms_system_sc) - - -- instantiate FMUs - oms_addSubModel("model.root.system1", "FMUs/System1.fmu") - oms_addSubModel("model.root.system2", "FMUs/System2.fmu") - - -- add connections - oms_addConnection("model.root.system1.y", "model.root.system2.u") - oms_addConnection("model.root.system2.y", "model.root.system1.u") - - -- simulation settings - oms_setResultFile("model", "results.mat") - oms_setStopTime("model", 0.1) - oms_setFixedStepSize("model.root", 1e-4) - - oms_instantiate("model") - oms_setReal("model.root.system1.x_start", 2.5) - - oms_initialize("model") - oms_simulate("model") - oms_terminate("model") - oms_delete("model") - -.. index:: OMSimulatorLua; Scripting Commands - -Lua Scripting Commands -###################### - -.. include:: OMSimulatorLua.inc diff --git a/doc/UsersGuide/source/OMSimulatorPython.rst b/doc/UsersGuide/source/OMSimulatorPython.rst deleted file mode 100644 index 717f76279..000000000 --- a/doc/UsersGuide/source/OMSimulatorPython.rst +++ /dev/null @@ -1,172 +0,0 @@ -.. index:: OMSimulatorPython - -.. _oms-python : - -OMSimulatorPython -================= - -This is a shared library that provides a Python interface for the -OMSimulatorLib library. - -Installation using ``pip`` is recommended: - -.. code-block:: shell-session - - > pip3 install OMSimulator --upgrade - -.. index:: OMSimulatorPython; Examples - -Examples --------- - -.. code-block:: python - - from OMSimulator import OMSimulator - - oms = OMSimulator() - oms.setTempDirectory("./temp/") - oms.newModel("model") - oms.addSystem("model.root", oms.system_sc) - - # instantiate FMUs - oms.addSubModel("model.root.system1", "FMUs/System1.fmu") - oms.addSubModel("model.root.system2", "FMUs/System2.fmu") - - # add connections - oms.addConnection("model.root.system1.y", "model.root.system2.u") - oms.addConnection("model.root.system2.y", "model.root.system1.u") - - # simulation settings - oms.setResultFile("model", "results.mat") - oms.setStopTime("model", 0.1) - oms.setFixedStepSize("model.root", 1e-4) - - oms.instantiate("model") - oms.setReal("model.root.system1.x_start", 2.5) - - oms.initialize("model") - oms.simulate("model") - oms.terminate("model") - oms.delete("model") - -The python package also provides a more object oriented API. The -following example is equivalent to the previous one: - -.. code-block:: python - - import OMSimulator as oms - - oms.setTempDirectory('./temp/') - model = oms.newModel("model") - root = model.addSystem('root', oms.Types.System.SC) - - # instantiate FMUs - root.addSubModel('system1', 'FMUs/System1.fmu') - root.addSubModel('system2', 'FMUs/System2.fmu') - - # add connections - root.addConnection('system1.y', 'system2.u') - root.addConnection('system2.y', 'system1.u') - - # simulation settings - model.resultFile = 'results.mat' - model.stopTime = 0.1 - model.fixedStepSize = 1e-4 - - model.instantiate() - model.setReal('root.system1.x_start', 2.5) - #or system.setReal('system1.x_start', 2.5) - - model.initialize() - model.simulate() - model.terminate() - model.delete() - -.. index:: OMSimulatorPython; Scripting Commands - -Python Scripting Commands -------------------------- - -.. include:: OMSimulatorPython.inc - -Example: Pi -^^^^^^^^^^^ - -This example uses a simple Modelica model and FMI-based batch -simulation to approximate the value of pi. - -A Modelica model is used to calculate two uniform distributed -pseudo-random numbers between 0 and 1 based on a seed value and -evaluates if the resulting coordinate is inside the unit circle or -not. - -.. code-block:: modelica - - model Circle - parameter Integer globalSeed = 30020 "global seed to initialize random number generator"; - parameter Integer localSeed = 614657 "local seed to initialize random number generator"; - Real x; - Real y; - Boolean inside = x*x + y*y < 1.0; - protected - Integer state128[4]; - algorithm - when initial() then - state128 := Modelica.Math.Random.Generators.Xorshift128plus.initialState(localSeed, globalSeed); - (x, state128) := Modelica.Math.Random.Generators.Xorshift128plus.random(state128); - (y, state128) := Modelica.Math.Random.Generators.Xorshift128plus.random(state128); - end when; - annotation(uses(Modelica(version="4.0.0"))); - end Circle; - -The model is then exported using the FMI interface and the generated -FMU can then be used to run a million simulations in just a few -seconds. - -.. code-block:: python - :caption: Batch simulation of the simple `Cirlce` model with different seed values. All OMSimulator-related comands are highlighted for convenience. - :linenos: - :emphasize-lines: 3,5-6,8-10,12-13,22-25,29-30 - - import math - import matplotlib.pyplot as plt - import OMSimulator as oms - - # redirect logging to file and limit the file size to 65MB - oms.setLogFile('pi.log', 65) - - model = oms.newModel('pi') - root = model.addSystem('root', oms.Types.System.SC) - root.addSubModel('circle', 'Circle.fmu') - - model.resultFile = '' # no result file - model.instantiate() - - results = list() - inside = 0 - - MIN = 100 - MAX = 1000000 - for i in range(0, MAX+1): - if i > 0: - model.reset() - model.setInteger('root.circle.globalSeed', i) - model.initialize() - if model.getBoolean("root.circle.inside"): - inside = inside + 1 - if i >= MIN: - results.append(4.0*inside/i) - model.terminate() - model.delete() - - plt.plot([MIN, MAX], [math.pi, math.pi], 'r--', range(MIN, MAX+1), results) - plt.xscale('log') - plt.ylabel('Approximation of pi') - plt.savefig('pi.png') - -The following figure shows the approximation of pi in relation to the -number of samples. - -.. figure :: images/pi.png - - Results of the above batch simulation which approximates the value of pi diff --git a/doc/UsersGuide/source/OMSimulatorPython3.rst b/doc/UsersGuide/source/OMSimulatorPython3.rst index 30223787f..af32fc85f 100644 --- a/doc/UsersGuide/source/OMSimulatorPython3.rst +++ b/doc/UsersGuide/source/OMSimulatorPython3.rst @@ -50,13 +50,13 @@ Command Line Interface ----------------------- In addition to the Python API, the **oms3 Python** package installs a -``OMSimulatorPython3`` command line entry point that can run a ``.ssp`` or -``.fmu`` file directly, without having to write a driver script: +``OMSimulator`` command line entry point that can run a ``.ssp`` or +``.fmu`` or ``.py`` file directly, without having to write a driver script: .. code-block:: bash - OMSimulatorPython3 model.ssp - OMSimulatorPython3 model.fmu + OMSimulator model.ssp + OMSimulator model.fmu All simulation settings (start/stop time, tolerance, ...) are taken from the model itself; use the flags below to override them. Both file types are @@ -67,28 +67,30 @@ The full list of command line arguments can also be printed at any time with: .. code-block:: bash - OMSimulatorPython3 --help + OMSimulator --help -.. list-table:: OMSimulatorPython3 command line flags +The table below summarizes the most commonly used flags. For a complete list, refer to :doc:`OMSimulator`. + +.. list-table:: OMSimulator command line flags :header-rows: 1 :widths: 20 20 60 * - Flag - Value - Description - * - ``--result-file`` + * - ``--resultFile`` - ``FILE`` - Override the result file name. - * - ``--start-time`` + * - ``--startTime`` - ``TIME`` - Override the simulation start time. - * - ``--stop-time`` + * - ``--stopTime`` - ``TIME`` - Override the simulation stop time. * - ``--tolerance`` - ``TOL`` - Override the solver tolerance (``.fmu`` only). - * - ``--step-size`` + * - ``--stepSize`` - ``SIZE`` - Override the (maximum) simulation step size (``.fmu`` only). * - ``--mode`` @@ -107,7 +109,7 @@ The full list of command line arguments can also be printed at any time with: - ``.fmu`` | ``.ssp`` - Only validate the file against its schema; do not simulate. -.. index:: OMSimulatorPython3; Command Line Interface Examples +.. index:: OMSimulator; Command Line Interface Examples Examples ^^^^^^^^ @@ -115,21 +117,21 @@ Examples .. code-block:: bash # Simulate an FMU using its own declared defaults - OMSimulatorPython3 model.fmu + OMSimulator model.fmu # Force model-exchange mode with the Euler solver and a custom step size - OMSimulatorPython3 model.fmu --mode me --solver euler --step-size 1e-3 + OMSimulator model.fmu --mode me --solver euler --stepSize 1e-3 # Only validate an FMU or SSP against its schema, without simulating - OMSimulatorPython3 model.fmu --validate - OMSimulatorPython3 model.ssp --validate + OMSimulator model.fmu --validate + OMSimulator model.ssp --validate # Override the stop time and result file of an SSP - OMSimulatorPython3 model.ssp --stop-time 10 --result-file out.mat + OMSimulator model.ssp --stopTime 10 --resultFile out.mat # Drop the "model.root" prefix from exported signal names (.fmu or .ssp) - OMSimulatorPython3 model.fmu --stripRoot - OMSimulatorPython3 model.ssp --stripRoot + OMSimulator model.fmu --stripRoot + OMSimulator model.ssp --stripRoot Quick start Example ------------------- diff --git a/doc/UsersGuide/source/SSP.rst b/doc/UsersGuide/source/SSP.rst deleted file mode 100644 index 6606c5ea1..000000000 --- a/doc/UsersGuide/source/SSP.rst +++ /dev/null @@ -1,78 +0,0 @@ -.. index:: SSP -.. _omsimulator-ssp-support : - -SSP Support -=========== - -Composite models are imported and exported in the *System Structure Description (SSD)* format, which is part of the *System Structure and Parameterization (SSP)* standard. - -.. index:: SSP; Bus connections - -Bus Connections ---------------- - -Bus connections are saved as annotations to the SSD file. Bus connectors are only allowed in weakly coupled and strongly coupled systems. Bus connections can exist in any system type. Bus connectors are used to hide SSD connectors and bus connections are used to hide existing SSD connections in the graphical user interface. It is not required that all connectors referenced in a bus are connected. One bus may be connected to multiple other buses, and also to SSD connectors. - -The example below contains a root system with two subsystems, ``WC1`` and ``WC2``. Bus connector ``WC1.bus1`` is connected to ``WC2.bus2``. Bus connector ``WC2.bus2`` is also connected to SSD connector ``WC1.C3``. - -.. code-block:: xml - :emphasize-lines: 10-19,27-36,47-56 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/UsersGuide/source/api/activateVariant.rst b/doc/UsersGuide/source/api/activateVariant.rst index 21f70d9c4..c2fefdcc9 100644 --- a/doc/UsersGuide/source/api/activateVariant.rst +++ b/doc/UsersGuide/source/api/activateVariant.rst @@ -8,37 +8,9 @@ using this API and make changes to that particular variant and simulate them. #END# -#LUA# -.. code-block:: lua - - status = oms_activateVariant(crefA, crefB) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.activateVariant(crefA, crefB) - -#END# - #CAPI# .. code-block:: c oms_status_enu_t oms_activateVariant(const char* crefA, const char* crefB); #END# - - -#DESCRIPTION# - An example of activating the number of available variants in a ssp file - - oms_newModel("model") - oms_addSystem("model.root", "system_wc") - oms_addSubModel("model.root.A", "A.fmu") - oms_duplicateVariant("model", "varA") // varA will be the current variant - oms_duplicateVariant("varA", "varB") // varB will be the current variant - oms_activateVariant("varB", "varA") // Reactivate the variant varB to varA - oms_activateVariant("varA", "model") // Reactivate the variant varA to model - -#END# diff --git a/doc/UsersGuide/source/api/addBus.rst b/doc/UsersGuide/source/api/addBus.rst index 49161460b..f29ee128a 100644 --- a/doc/UsersGuide/source/api/addBus.rst +++ b/doc/UsersGuide/source/api/addBus.rst @@ -5,20 +5,6 @@ addBus Adds a bus to a given component. #END# -#LUA# -.. code-block:: lua - - status = oms_addBus(cref) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.addBus(cref) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/addConnection.rst b/doc/UsersGuide/source/api/addConnection.rst index 44cde9ad4..83349785d 100644 --- a/doc/UsersGuide/source/api/addConnection.rst +++ b/doc/UsersGuide/source/api/addConnection.rst @@ -6,20 +6,6 @@ Adds a new connection between connectors `A` and `B`. The connectors need to be specified as fully qualified component references, e.g., `"model.system.component.signal"`. #END# -#LUA# -.. code-block:: lua - - status = oms_addConnection(crefA, crefB, suppressUnitConversion) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.addConnection(crefA, crefB, suppressUnitConversion) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/addConnector.rst b/doc/UsersGuide/source/api/addConnector.rst index 9e264c8ba..fc4b7796e 100644 --- a/doc/UsersGuide/source/api/addConnector.rst +++ b/doc/UsersGuide/source/api/addConnector.rst @@ -5,55 +5,6 @@ addConnector Adds a connector to a given component. #END# -#LUA# -.. code-block:: lua - - status = oms_addConnector(cref, causality, type) - - The second argument "causality", should be any of the following, - - oms_causality_input - oms_causality_output - oms_causality_parameter - oms_causality_bidir - oms_causality_undefined - - The third argument "type", should be any of the following, - - oms_signal_type_real - oms_signal_type_integer - oms_signal_type_boolean - oms_signal_type_string - oms_signal_type_enum - oms_signal_type_bus - - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.addConnector(cref, causality, type) - - The second argument "causality", should be any of the following, - - oms.input - oms.output - oms.parameter - oms.bidir - oms.undefined - - The third argument "type", should be any of the following, - - oms.signal_type_real - oms.signal_type_integer - oms.signal_type_boolean - oms.signal_type_string - oms.signal_type_enum - oms.signal_type_bus - - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/addConnectorToBus.rst b/doc/UsersGuide/source/api/addConnectorToBus.rst index 8b4eb314d..a13d437ac 100644 --- a/doc/UsersGuide/source/api/addConnectorToBus.rst +++ b/doc/UsersGuide/source/api/addConnectorToBus.rst @@ -5,20 +5,6 @@ addConnectorToBus Adds a connector to a bus. #END# -#LUA# -.. code-block:: lua - - status = oms_addConnectorToBus(busCref, connectorCref) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.addConnectorToBus(busCref, connectorCref) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/addResources.rst b/doc/UsersGuide/source/api/addResources.rst index d913b3378..9677c892f 100644 --- a/doc/UsersGuide/source/api/addResources.rst +++ b/doc/UsersGuide/source/api/addResources.rst @@ -5,41 +5,6 @@ addResources Adds an external resources to an existing SSP. The external resources should be a ".ssv" or ".ssm" file #END# -#LUA# -.. code-block:: lua - - status = oms_addResources(cref, path) - - -- Example - oms_importFile("addExternalResources1.ssp") - -- add list of external resources from filesystem to ssp - oms_addResources("addExternalResources", "../../resources/externalRoot.ssv") - oms_addResources("addExternalResources:externalSystem.ssv", "../../resources/externalSystem1.ssv") - oms_addResources("addExternalResources", "../../resources/externalGain.ssv") - -- export the ssp with new resources - oms_export("addExternalResources", "addExternalResources1.ssp") - - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.addResources(cref, path) - - ## Example - from OMSimulator import OMSimulator - oms = OMSimulator() - oms.importFile("addExternalResources1.ssp") - ## add list of external resources from filesystem to ssp - oms.addResources("addExternalResources", "../../resources/externalRoot.ssv") - oms.addResources("addExternalResources:externalSystem.ssv", "../../resources/externalSystem1.ssv") - oms.addResources("addExternalResources", "../../resources/externalGain.ssv") - ## export the ssp with new resources - oms_export("addExternalResources", "addExternalResources1.ssp") - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/addSignalsToResults.rst b/doc/UsersGuide/source/api/addSignalsToResults.rst index bfd03b2ed..870e22199 100644 --- a/doc/UsersGuide/source/api/addSignalsToResults.rst +++ b/doc/UsersGuide/source/api/addSignalsToResults.rst @@ -5,19 +5,6 @@ addSignalsToResults Add all variables that match the given regex to the result file. #END# -#LUA# -.. code-block:: lua - - status = oms_addSignalsToResults(cref, regex) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.addSignalsToResults(cref, regex) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/addSubModel.rst b/doc/UsersGuide/source/api/addSubModel.rst index fb3539b44..6c2302140 100644 --- a/doc/UsersGuide/source/api/addSubModel.rst +++ b/doc/UsersGuide/source/api/addSubModel.rst @@ -5,19 +5,6 @@ addSubModel Adds a component to a system. #END# -#LUA# -.. code-block:: lua - - status = oms_addSubModel(cref, fmuPath) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.addSubModel(cref, fmuPath) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/addSystem.rst b/doc/UsersGuide/source/api/addSystem.rst index 92a4cf9db..aa29c5942 100644 --- a/doc/UsersGuide/source/api/addSystem.rst +++ b/doc/UsersGuide/source/api/addSystem.rst @@ -5,19 +5,6 @@ addSystem Adds a (sub-)system to a model or system. #END# -#LUA# -.. code-block:: lua - - status = oms_addSystem(cref, type) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.addSystem(cref, type) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/compareSimulationResults.rst b/doc/UsersGuide/source/api/compareSimulationResults.rst index 1da835c08..737ee4c2d 100644 --- a/doc/UsersGuide/source/api/compareSimulationResults.rst +++ b/doc/UsersGuide/source/api/compareSimulationResults.rst @@ -6,20 +6,6 @@ This function compares a given signal of two result files within absolute and relative tolerances. #END# -#LUA# -.. code-block:: lua - - oms_compareSimulationResults(filenameA, filenameB, var, relTol, absTol) - -#END# - -#PYTHON# -.. code-block:: python - - oms.compareSimulationResults(filenameA, filenameB, var, relTol, absTol) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/copySystem.rst b/doc/UsersGuide/source/api/copySystem.rst index 1fe07077b..a74650a7a 100644 --- a/doc/UsersGuide/source/api/copySystem.rst +++ b/doc/UsersGuide/source/api/copySystem.rst @@ -5,20 +5,6 @@ copySystem Copies a system. #END# -#LUA# -.. code-block:: lua - - status = oms_copySystem(source, target) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.copySystem(source, target) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/delete.rst b/doc/UsersGuide/source/api/delete.rst index 11e21b70c..14fbab211 100644 --- a/doc/UsersGuide/source/api/delete.rst +++ b/doc/UsersGuide/source/api/delete.rst @@ -5,20 +5,6 @@ delete Deletes a connector, component, system, or model object. #END# -#LUA# -.. code-block:: lua - - status = oms_delete(cref) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.delete(cref) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/deleteConnection.rst b/doc/UsersGuide/source/api/deleteConnection.rst index 0b7621cdc..e6acda861 100644 --- a/doc/UsersGuide/source/api/deleteConnection.rst +++ b/doc/UsersGuide/source/api/deleteConnection.rst @@ -5,20 +5,6 @@ deleteConnection Deletes the connection between connectors `crefA` and `crefB`. #END# -#LUA# -.. code-block:: lua - - status = oms_deleteConnection(crefA, crefB) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.deleteConnection(crefA, crefB) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/deleteConnectorFromBus.rst b/doc/UsersGuide/source/api/deleteConnectorFromBus.rst index 53179fe65..2429f7553 100644 --- a/doc/UsersGuide/source/api/deleteConnectorFromBus.rst +++ b/doc/UsersGuide/source/api/deleteConnectorFromBus.rst @@ -5,20 +5,6 @@ deleteConnectorFromBus Deletes a connector from a given bus. #END# -#LUA# -.. code-block:: lua - - status = oms_deleteConnectorFromBus(busCref, connectorCref) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.deleteConnectorFromBus(busCref, connectorCref) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/deleteResources.rst b/doc/UsersGuide/source/api/deleteResources.rst index dedd48afc..76d9ed1cb 100644 --- a/doc/UsersGuide/source/api/deleteResources.rst +++ b/doc/UsersGuide/source/api/deleteResources.rst @@ -16,39 +16,6 @@ It is not possible to delete the references of ".ssm" seperately as the ssm file The filename of the reference or resource file is provided by the users using colon suffix at the end of cref. (e.g) ":root.ssv" -#END# - -#LUA# -.. code-block:: lua - - status = oms_deleteResources(cref) - - -- Example - oms_importFile("deleteResources1.ssp") - -- delete only the references in ".ssd" file - oms_deleteResources("deleteResources.root:root.ssv") - -- delete both references and resources - oms_deleteResources("deleteResources:root.ssv") - oms_export("deleteResources1.ssp") - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.deleteResources(cref)) - - ## Example - from OMSimulator import OMSimulator - oms = OMSimulator() - oms.importFile("deleteResources1.ssp") - ## delete only the references in ".ssd" file - oms.deleteResources("deleteResources.root:root.ssv") - ## delete both references and resources - oms.deleteResources("deleteResources:root.ssv") - oms.export("deleteResources1.ssp") - - #END# #CAPI# diff --git a/doc/UsersGuide/source/api/doStep.rst b/doc/UsersGuide/source/api/doStep.rst index 3ec869606..0ea37e7d1 100644 --- a/doc/UsersGuide/source/api/doStep.rst +++ b/doc/UsersGuide/source/api/doStep.rst @@ -7,13 +7,6 @@ will be determined by the master algorithm and is limited by the definied minimal and maximal step sizes. #END# -#PYTHON# -.. code-block:: python - - status = oms.doStep(cref) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/duplicateVariant.rst b/doc/UsersGuide/source/api/duplicateVariant.rst index bbd6c2039..adc3acd8e 100644 --- a/doc/UsersGuide/source/api/duplicateVariant.rst +++ b/doc/UsersGuide/source/api/duplicateVariant.rst @@ -11,50 +11,9 @@ as default variant. #END# -#LUA# -.. code-block:: lua - - status = oms_duplicateVariant(crefA, crefB) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.duplicateVariant(crefA, crefB) - -#END# - #CAPI# .. code-block:: c oms_status_enu_t oms_duplicateVariant(const char* crefA, const char* crefB); #END# - -#DESCRIPTION# -An example of creating a multi-variant modelling is presented below - -.. code-block:: lua - - oms_newModel("model") - oms_addSystem("model.root", "system_wc") - oms_addSubModel("model.root.A", "A.fmu") - oms_setReal("model.root.A.param1", "10") - oms_duplicateVariant("model", "varB") - oms_addSubModel("varB.root.B" ,"B.fmu") - oms_setReal("varB.root.A.param2", "20") - oms_export("varB", "variant.ssp") - -The variant.ssp file will have the following structure - -.. code-block:: - - Variant.ssp - SystemStructure.ssd - varB.ssd - resources\ - A.fmu - B.fmu - -#END# diff --git a/doc/UsersGuide/source/api/export.rst b/doc/UsersGuide/source/api/export.rst index ac0139170..44f68f205 100644 --- a/doc/UsersGuide/source/api/export.rst +++ b/doc/UsersGuide/source/api/export.rst @@ -5,20 +5,6 @@ export Exports a composite model to a SPP file. #END# -#LUA# -.. code-block:: lua - - status = oms_export(cref, filename) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.export(cref, filename) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/exportDependencyGraphs.rst b/doc/UsersGuide/source/api/exportDependencyGraphs.rst index fbbfda5cd..e453d0f0f 100644 --- a/doc/UsersGuide/source/api/exportDependencyGraphs.rst +++ b/doc/UsersGuide/source/api/exportDependencyGraphs.rst @@ -5,21 +5,7 @@ exportDependencyGraphs Export the dependency graphs of a given model to dot files. #END# -#LUA# -.. code-block:: lua - - status = oms_exportDependencyGraphs(cref, initialization, event, simulation) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.exportDependencyGraphs(cref, initialization, event, simulation) - -#END# - -#CAPI# +s#CAPI# .. code-block:: c oms_status_enu_t oms_exportDependencyGraphs(const char* cref, const char* initialization, const char* event, const char* simulation); diff --git a/doc/UsersGuide/source/api/exportSSMTemplate.rst b/doc/UsersGuide/source/api/exportSSMTemplate.rst index d46d057e2..4fdfe5ceb 100644 --- a/doc/UsersGuide/source/api/exportSSMTemplate.rst +++ b/doc/UsersGuide/source/api/exportSSMTemplate.rst @@ -7,20 +7,6 @@ The mapping entry contains two attributes namely source and target. The source a The function can be called for a top level model or a certain FMU component. If called for a top level model, start values of all FMUs are exported to the SSM file. If called for a component, start values of just this FMU are exported to the SSM file. #END# -#LUA# -.. code-block:: lua - - status = oms_exportSSMTemplate(cref, filename) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.exportSSMTemplate(cref, filename) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/exportSSVTemplate.rst b/doc/UsersGuide/source/api/exportSSVTemplate.rst index 33ce45a4e..d086f32b6 100644 --- a/doc/UsersGuide/source/api/exportSSVTemplate.rst +++ b/doc/UsersGuide/source/api/exportSSVTemplate.rst @@ -6,19 +6,6 @@ Exports all signals that have start values of one or multiple FMUs to a SSV file If called for a top level model, start values of all FMUs are exported to the SSV file. If called for a component, start values of just this FMU are exported to the SSV file. #END# -#LUA# -.. code-block:: lua - - status = oms_exportSSVTemplate(cref, filename) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.exportSSVTemplate(cref, filename) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/exportSnapshot.rst b/doc/UsersGuide/source/api/exportSnapshot.rst index 0d576d92a..f24c3d62a 100644 --- a/doc/UsersGuide/source/api/exportSnapshot.rst +++ b/doc/UsersGuide/source/api/exportSnapshot.rst @@ -9,20 +9,6 @@ the C-API. The Lua and Python bindings take care of the memory and the caller doesn't need to call free. #END# -#LUA# -.. code-block:: lua - - contents, status = oms_exportSnapshot(cref) - -#END# - -#PYTHON# -.. code-block:: python - - contents, status = oms.exportSnapshot(cref) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/freeMemory.rst b/doc/UsersGuide/source/api/freeMemory.rst index 248c34c60..54e53fc7d 100644 --- a/doc/UsersGuide/source/api/freeMemory.rst +++ b/doc/UsersGuide/source/api/freeMemory.rst @@ -6,19 +6,6 @@ Free the memory allocated by some other API. Pass the object for which memory is allocated. #END# -#LUA# - -This function is neither needed nor available from the Lua interface. - -#END# - -#PYTHON# -.. code-block:: python - - oms.freeMemory(obj) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/getBoolean.rst b/doc/UsersGuide/source/api/getBoolean.rst index 252d882b7..ef1e15b3c 100644 --- a/doc/UsersGuide/source/api/getBoolean.rst +++ b/doc/UsersGuide/source/api/getBoolean.rst @@ -5,19 +5,6 @@ getBoolean Get boolean value of given signal. #END# -#LUA# -.. code-block:: lua - - value, status = oms_getBoolean(cref) - -#END# - -#PYTHON# -.. code-block:: python - - value, status = oms.getBoolean(cref) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/getDirectionalDerivative.rst b/doc/UsersGuide/source/api/getDirectionalDerivative.rst index ed0b4eaad..16390c1b1 100644 --- a/doc/UsersGuide/source/api/getDirectionalDerivative.rst +++ b/doc/UsersGuide/source/api/getDirectionalDerivative.rst @@ -4,19 +4,6 @@ getDirectionalDerivative This function computes the directional derivatives of an FMU. #END# -#LUA# -.. code-block:: lua - - value, status = oms_getDirectionalDerivative(cref) - -#END# - -#PYTHON# -.. code-block:: python - - value, status = oms.getDirectionalDerivative(cref) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/getFixedStepSize.rst b/doc/UsersGuide/source/api/getFixedStepSize.rst index ac08b384e..f6d39ddd9 100644 --- a/doc/UsersGuide/source/api/getFixedStepSize.rst +++ b/doc/UsersGuide/source/api/getFixedStepSize.rst @@ -7,19 +7,6 @@ co-simulation systems and also for the integrator step size in model exchange systems. #END# -#LUA# -.. code-block:: lua - - stepSize, status = oms_setFixedStepSize(cref) - -#END# - -#PYTHON# -.. code-block:: python - - stepSize, status = oms.getFixedStepSize(cref) - -#END# #CAPI# .. code-block:: c @@ -31,7 +18,7 @@ systems. #OMC# .. code-block:: modelica - (stepSize, status) := oms_setFixedStepSize(cref); + (stepSize, status) := oms_getFixedStepSize(cref); #END# diff --git a/doc/UsersGuide/source/api/getInteger.rst b/doc/UsersGuide/source/api/getInteger.rst index d22d1614c..c05b75b18 100644 --- a/doc/UsersGuide/source/api/getInteger.rst +++ b/doc/UsersGuide/source/api/getInteger.rst @@ -5,19 +5,6 @@ getInteger Get integer value of given signal. #END# -#LUA# -.. code-block:: lua - - value, status = oms_getInteger(cref) - -#END# - -#PYTHON# -.. code-block:: python - - value, status = oms.getInteger(cref) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/getModelState.rst b/doc/UsersGuide/source/api/getModelState.rst index 169031e60..9827bcb7d 100644 --- a/doc/UsersGuide/source/api/getModelState.rst +++ b/doc/UsersGuide/source/api/getModelState.rst @@ -5,13 +5,6 @@ getModelState Gets the model state of the given model cref. #END# -#LUA# -.. code-block:: lua - - modelState, status = oms_getModelState(cref) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/getReal.rst b/doc/UsersGuide/source/api/getReal.rst index e12b546a1..c21465d5c 100644 --- a/doc/UsersGuide/source/api/getReal.rst +++ b/doc/UsersGuide/source/api/getReal.rst @@ -5,19 +5,6 @@ getReal Get real value. #END# -#LUA# -.. code-block:: lua - - value, status = oms_getReal(cref) - -#END# - -#PYTHON# -.. code-block:: python - - value, status = oms.getReal(cref) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/getResultFile.rst b/doc/UsersGuide/source/api/getResultFile.rst index 88e0e91b0..6b64d7cc7 100644 --- a/doc/UsersGuide/source/api/getResultFile.rst +++ b/doc/UsersGuide/source/api/getResultFile.rst @@ -5,13 +5,6 @@ getResultFile Gets the result filename and buffer size of the given model cref. #END# -#PYTHON# -.. code-block:: python - - filename, bufferSize, status = oms.getResultFile(cref) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/getSolver.rst b/doc/UsersGuide/source/api/getSolver.rst index fb204b7b7..1c0267518 100644 --- a/doc/UsersGuide/source/api/getSolver.rst +++ b/doc/UsersGuide/source/api/getSolver.rst @@ -5,19 +5,6 @@ getSolver Gets the selected solver method of the given system. #END# -#LUA# -.. code-block:: lua - - solver, status = oms_getSolver(cref) - -#END# - -#PYTHON# -.. code-block:: python - - solver, status = oms.getSolver(cref) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/getStartTime.rst b/doc/UsersGuide/source/api/getStartTime.rst index 4a16ea4c6..610b9d3e7 100644 --- a/doc/UsersGuide/source/api/getStartTime.rst +++ b/doc/UsersGuide/source/api/getStartTime.rst @@ -5,19 +5,6 @@ getStartTime Get the start time from the model. #END# -#LUA# -.. code-block:: lua - - startTime, status = oms_getStartTime(cref) - -#END# - -#PYTHON# -.. code-block:: python - - startTime, status = oms.getStartTime(cref) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/getStopTime.rst b/doc/UsersGuide/source/api/getStopTime.rst index ebb64156e..9c0fa7586 100644 --- a/doc/UsersGuide/source/api/getStopTime.rst +++ b/doc/UsersGuide/source/api/getStopTime.rst @@ -5,19 +5,6 @@ getStopTime Get the stop time from the model. #END# -#LUA# -.. code-block:: lua - - stopTime, status = oms_getStopTime(cref) - -#END# - -#PYTHON# -.. code-block:: python - - stopTime, status = oms.getStopTime(cref) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/getString.rst b/doc/UsersGuide/source/api/getString.rst index 51a2423f5..2a972d2b0 100644 --- a/doc/UsersGuide/source/api/getString.rst +++ b/doc/UsersGuide/source/api/getString.rst @@ -10,20 +10,6 @@ using the C-API. The Lua and Python bindings take care of the memory and the caller doesn't need to call free. #END# -#LUA# -.. code-block:: lua - - value, status = oms_getString(cref) - -#END# - -#PYTHON# -.. code-block:: python - - value, status = oms.getString(cref) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/getSubModelPath.rst b/doc/UsersGuide/source/api/getSubModelPath.rst index 7663f17ad..ef2cb40ce 100644 --- a/doc/UsersGuide/source/api/getSubModelPath.rst +++ b/doc/UsersGuide/source/api/getSubModelPath.rst @@ -5,13 +5,6 @@ getSubModelPath Returns the path of a given component. #END# -#PYTHON# -.. code-block:: python - - path, status = oms.getSubModelPath(cref) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/getSystemType.rst b/doc/UsersGuide/source/api/getSystemType.rst index de5e2f15c..4033fa91c 100644 --- a/doc/UsersGuide/source/api/getSystemType.rst +++ b/doc/UsersGuide/source/api/getSystemType.rst @@ -5,20 +5,6 @@ getSystemType Gets the type of the given system. #END# -#LUA# -.. code-block:: lua - - type, status = oms_getSystemType(cref) - -#END# - -#PYTHON# -.. code-block:: python - - type, status = oms.getSystemType(cref) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/getTime.rst b/doc/UsersGuide/source/api/getTime.rst index 8835755fc..82eed7672 100644 --- a/doc/UsersGuide/source/api/getTime.rst +++ b/doc/UsersGuide/source/api/getTime.rst @@ -5,19 +5,6 @@ getTime Get the current simulation time from the model. #END# -#LUA# -.. code-block:: lua - - time, status = oms_getTime(cref) - -#END# - -#PYTHON# -.. code-block:: python - - time, status = oms.getTime(cref) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/getTolerance.rst b/doc/UsersGuide/source/api/getTolerance.rst index 0e33c2776..5167a62df 100644 --- a/doc/UsersGuide/source/api/getTolerance.rst +++ b/doc/UsersGuide/source/api/getTolerance.rst @@ -5,19 +5,6 @@ getTolerance Gets the tolerance of a given system or component. #END# -#LUA# -.. code-block:: lua - - relativeTolerance, status = oms_getTolerance(cref) - -#END# - -#PYTHON# -.. code-block:: python - - relativeTolerance, status = oms.getTolerance(cref) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/getVariableStepSize.rst b/doc/UsersGuide/source/api/getVariableStepSize.rst index dff08a6a0..a039a4653 100644 --- a/doc/UsersGuide/source/api/getVariableStepSize.rst +++ b/doc/UsersGuide/source/api/getVariableStepSize.rst @@ -5,20 +5,6 @@ getVariableStepSize Gets the step size parameters. #END# -#LUA# -.. code-block:: lua - - initialStepSize, minimumStepSize, maximumStepSize, status = oms_getVariableStepSize(cref) - -#END# - -#PYTHON# -.. code-block:: python - - initialStepSize, minimumStepSize, maximumStepSize, status = oms.getVariableStepSize(cref) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/getVersion.rst b/doc/UsersGuide/source/api/getVersion.rst index 73b6f289a..6e48f2393 100644 --- a/doc/UsersGuide/source/api/getVersion.rst +++ b/doc/UsersGuide/source/api/getVersion.rst @@ -5,21 +5,6 @@ getVersion Returns the library's version string. #END# -#LUA# -.. code-block:: lua - - version = oms_getVersion() - -#END# - -#PYTHON# -.. code-block:: python - - oms = OMSimulator() - oms.getVersion() - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/importFile.rst b/doc/UsersGuide/source/api/importFile.rst index 18d562117..387cdc8c6 100644 --- a/doc/UsersGuide/source/api/importFile.rst +++ b/doc/UsersGuide/source/api/importFile.rst @@ -5,19 +5,6 @@ importFile Imports a composite model from a SSP file. #END# -#LUA# -.. code-block:: lua - - cref, status = oms_importFile(filename) - -#END# - -#PYTHON# -.. code-block:: python - - cref, status = oms.importFile(filename) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/importSnapshot.rst b/doc/UsersGuide/source/api/importSnapshot.rst index 01e27677a..62c7905bb 100644 --- a/doc/UsersGuide/source/api/importSnapshot.rst +++ b/doc/UsersGuide/source/api/importSnapshot.rst @@ -6,19 +6,6 @@ Loads a snapshot to restore a previous model state. The model must be in virgin model state, which means it must not be instantiated. #END# -#LUA# -.. code-block:: lua - - newCref, status = oms_importSnapshot(cref, snapshot) - -#END# - -#PYTHON# -.. code-block:: python - - newCref, status = oms.importSnapshot(cref, snapshot) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/initialize.rst b/doc/UsersGuide/source/api/initialize.rst index a7c7e80ed..9d2e63e62 100644 --- a/doc/UsersGuide/source/api/initialize.rst +++ b/doc/UsersGuide/source/api/initialize.rst @@ -5,19 +5,6 @@ initialize Initializes a composite model. #END# -#LUA# -.. code-block:: lua - - status = oms_initialize(cref) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.initialize(cref) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/instantiate.rst b/doc/UsersGuide/source/api/instantiate.rst index 7e6fc10d5..bb19e8c07 100644 --- a/doc/UsersGuide/source/api/instantiate.rst +++ b/doc/UsersGuide/source/api/instantiate.rst @@ -5,20 +5,6 @@ instantiate Instantiates a given composite model. #END# -#LUA# -.. code-block:: lua - - status = oms_instantiate(cref) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.instantiate(cref) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/list.rst b/doc/UsersGuide/source/api/list.rst index dea8ad538..1c9ff3321 100644 --- a/doc/UsersGuide/source/api/list.rst +++ b/doc/UsersGuide/source/api/list.rst @@ -9,19 +9,6 @@ the C-API. The Lua and Python bindings take care of the memory and the caller doesn't need to call free. #END# -#LUA# -.. code-block:: lua - - contents, status = oms_list(cref) - -#END# - -#PYTHON# -.. code-block:: python - - contents, status = oms.list(cref) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/listUnconnectedConnectors.rst b/doc/UsersGuide/source/api/listUnconnectedConnectors.rst index e93459362..31e054ad3 100644 --- a/doc/UsersGuide/source/api/listUnconnectedConnectors.rst +++ b/doc/UsersGuide/source/api/listUnconnectedConnectors.rst @@ -9,20 +9,6 @@ the C-API. The Lua and Python bindings take care of the memory and the caller doesn't need to call free. #END# -#LUA# -.. code-block:: lua - - contents, status = oms_listUnconnectedConnectors(cref) - -#END# - -#PYTHON# -.. code-block:: python - - contents, status = oms.listUnconnectedConnectors(cref) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/listVariants.rst b/doc/UsersGuide/source/api/listVariants.rst index b1e5e30ef..cab063fcc 100644 --- a/doc/UsersGuide/source/api/listVariants.rst +++ b/doc/UsersGuide/source/api/listVariants.rst @@ -6,20 +6,6 @@ This API shows the number of variants available [(e.g). SystemStructure.ssd, Var #END# -#LUA# -.. code-block:: lua - - status = oms_listVariants(cref) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.listVariants(cref) - -#END# - #CAPI# .. code-block:: c @@ -27,28 +13,3 @@ This API shows the number of variants available [(e.g). SystemStructure.ssd, Var #END# - -#DESCRIPTION# -An example for finding the number of available variants in a ssp file - -.. code-block:: lua - - oms_newModel("model") - oms_addSystem("model.root", "system_wc") - oms_addSubModel("model.root.A", "A.fmu") - oms_duplicateVariant("model", "varA") - oms_duplicateVariant("varA", "varB") - - oms_listVariants("varB") - -The API will list the available variants like below - -.. code-block:: - - - - - - - -#END# diff --git a/doc/UsersGuide/source/api/loadSnapshot.rst b/doc/UsersGuide/source/api/loadSnapshot.rst index d963b148d..375a6e7b4 100644 --- a/doc/UsersGuide/source/api/loadSnapshot.rst +++ b/doc/UsersGuide/source/api/loadSnapshot.rst @@ -5,19 +5,6 @@ loadSnapshot Loads a snapshot to restore a previous model state. The model must be in virgin model state, which means it must not be instantiated. #END# -#LUA# -.. code-block:: lua - - newCref, status = oms_loadSnapshot(cref, snapshot) - -#END# - -#PYTHON# -.. code-block:: python - - newCref, status = oms.loadSnapshot(cref, snapshot) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/newModel.rst b/doc/UsersGuide/source/api/newModel.rst index 4f908a232..f4d26b979 100644 --- a/doc/UsersGuide/source/api/newModel.rst +++ b/doc/UsersGuide/source/api/newModel.rst @@ -5,19 +5,6 @@ newModel Creates a new and yet empty composite model. #END# -#LUA# -.. code-block:: lua - - status = oms_newModel(cref) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.newModel(cref) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/newResources.rst b/doc/UsersGuide/source/api/newResources.rst index ea715c99e..9b3740993 100644 --- a/doc/UsersGuide/source/api/newResources.rst +++ b/doc/UsersGuide/source/api/newResources.rst @@ -8,48 +8,6 @@ Adds a new empty resources to the SSP. The resource file is a ".ssv" file where The filename of the resource file is provided by the users using colon suffix at the end of cref. (e.g) ":root.ssv" #END# -#LUA# -.. code-block:: lua - - status = oms_newResources(cref) - - -- Example - oms_newModel("newResources") - - oms_addSystem("newResources.root", oms_system_wc) - oms_addConnector("newResources.root.Input1", oms_causality_input, oms_signal_type_real) - oms_addConnector("newResources.root.Input2", oms_causality_input, oms_signal_type_real) - - -- add Top level new resources, the filename is provided using the colon suffix ":root.ssv" - oms_newResources("newResources.root:root.ssv") - oms_setReal("newResources.root.Input1", 10) - -- export the ssp with new resources - oms_export("newResources", "newResources.ssp") - - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.newResources(cref) - - ## Example - from OMSimulator import OMSimulator - oms = OMSimulator() - oms.newModel("newResources") - - oms.addSystem("newResources.root", oms_system_wc) - oms.addConnector("newResources.root.Input1", oms.input, oms_signal_type_real) - oms.addConnector("newResources.root.Input2", oms.input, oms_signal_type_real) - - ## add Top level resources, the filename is provided using the colon suffix ":root.ssv" - oms.newResources("newResources.root:root.ssv") - oms.setReal("newResources.root.Input1", 10) - ## export the ssp with new resources - oms.export("newResources", "newResources.ssp") - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/referenceResources.rst b/doc/UsersGuide/source/api/referenceResources.rst index 468bd7205..0e5b79afc 100644 --- a/doc/UsersGuide/source/api/referenceResources.rst +++ b/doc/UsersGuide/source/api/referenceResources.rst @@ -19,41 +19,6 @@ and the ".ssm" file is optional and is provided by the user as the second argume #END# -#LUA# -.. code-block:: lua - - status = oms_referenceResources(cref, ssmFile) - - -- Example - oms_importFile("referenceResources1.ssp") - -- delete only the references in ".ssd" file - oms_deleteResources("referenceResources1.root:root.ssv") - -- usage-1 switch with new references, only ssv file - oms_referenceResources("referenceResources1.root:Config1.ssv") - -- usage-2 switch with new references, both ssv and ssm file - oms_referenceResources("referenceResources1.root:Config1.ssv", "Config1.ssm") - oms_export("referenceResources1.ssp") - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.referenceResources(cref, ssmFile) - - ## Example - from OMSimulator import OMSimulator - oms = OMSimulator() - oms.importFile("referenceResources1.ssp") - ## delete only the references in ".ssd" file - oms.deleteResources("referenceResources1.root:root.ssv") - ## usage-1 switch with new references, only ssv file - oms.referenceResources("referenceResources1.root:Config1.ssv") - ## usage-2 switch with new references, both ssv and ssm file - oms.referenceResources("referenceResources1.root:Config1.ssv", "Config1.ssm") - - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/removeSignalsFromResults.rst b/doc/UsersGuide/source/api/removeSignalsFromResults.rst index 9c96100ea..2b56d2b1e 100644 --- a/doc/UsersGuide/source/api/removeSignalsFromResults.rst +++ b/doc/UsersGuide/source/api/removeSignalsFromResults.rst @@ -5,19 +5,6 @@ removeSignalsFromResults Removes all variables that match the given regex to the result file. #END# -#LUA# -.. code-block:: lua - - status = oms_removeSignalsFromResults(cref, regex) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.removeSignalsFromResults(cref, regex) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/rename.rst b/doc/UsersGuide/source/api/rename.rst index c9c5c59d4..92b97c6a8 100644 --- a/doc/UsersGuide/source/api/rename.rst +++ b/doc/UsersGuide/source/api/rename.rst @@ -5,20 +5,6 @@ rename Renames a model, system, or component. #END# -#LUA# -.. code-block:: lua - - status = oms_rename(cref, newCref) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.rename(cref, newCref) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/replaceSubModel.rst b/doc/UsersGuide/source/api/replaceSubModel.rst index 709d0e344..7cafa6b6e 100644 --- a/doc/UsersGuide/source/api/replaceSubModel.rst +++ b/doc/UsersGuide/source/api/replaceSubModel.rst @@ -12,33 +12,9 @@ are updated and the start values in the ssv files will not be changed. #END# -#LUA# -.. code-block:: lua - - status = oms_replaceSubModel(cref, fmuPath) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.replaceSubModel(cref, fmuPath) - -#END# - #CAPI# .. code-block:: c oms_status_enu_t oms_replaceSubModel(const char* cref, const char* fmuPath); #END# - - -#DESCRIPTION# - It is possible to import an partially developed fmu (i.e contains only modeldescription.xml without any binaries) in OMSimulator, and later can be replaced with a fully develped fmu. An example to use the API, - oms_addSubModel("model.root.A", "../resources/replaceA.fmu") - oms_export("model", "test.ssp") - oms_import("test.ssp") - oms_replaceSubModel("model.root.A", "../resources/replaceA_extended.fmu") - -#END# diff --git a/doc/UsersGuide/source/api/reset.rst b/doc/UsersGuide/source/api/reset.rst index 79f28c7b1..e7c1d7097 100644 --- a/doc/UsersGuide/source/api/reset.rst +++ b/doc/UsersGuide/source/api/reset.rst @@ -7,19 +7,6 @@ Reset the composite model after a simulation run. The FMUs go into the same state as after instantiation. #END# -#LUA# -.. code-block:: lua - - status = oms_reset(cref) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.reset(cref) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/setBoolean.rst b/doc/UsersGuide/source/api/setBoolean.rst index adca704c2..bbe1b2fa4 100644 --- a/doc/UsersGuide/source/api/setBoolean.rst +++ b/doc/UsersGuide/source/api/setBoolean.rst @@ -5,20 +5,6 @@ setBoolean Sets the value of a given boolean signal. #END# -#LUA# -.. code-block:: lua - - status = oms_setBoolean(cref, value) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.setBoolean(cref, value) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/setCommandLineOption.rst b/doc/UsersGuide/source/api/setCommandLineOption.rst index 7e07c0f9a..025e92eb1 100644 --- a/doc/UsersGuide/source/api/setCommandLineOption.rst +++ b/doc/UsersGuide/source/api/setCommandLineOption.rst @@ -5,20 +5,6 @@ setCommandLineOption Sets special flags. #END# -#LUA# -.. code-block:: lua - - status = oms_setCommandLineOption(cmd) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.setCommandLineOption(cmd) - -#END# - #CAPI# .. code-block:: c @@ -32,12 +18,3 @@ Sets special flags. status := oms_setCommandLineOption(cmd); #END# - -#DESCRIPTION# - -Available flags: - -.. literalinclude :: omsimulator-help.inc - :language: bash - -#END# diff --git a/doc/UsersGuide/source/api/setFixedStepSize.rst b/doc/UsersGuide/source/api/setFixedStepSize.rst index 9be1e796e..ed9af7749 100644 --- a/doc/UsersGuide/source/api/setFixedStepSize.rst +++ b/doc/UsersGuide/source/api/setFixedStepSize.rst @@ -7,20 +7,6 @@ co-simulation systems and also for the integrator step size in model exchange systems. #END# -#LUA# -.. code-block:: lua - - status = oms_setFixedStepSize(cref, stepSize) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.setFixedStepSize(cref, stepSize) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/setInteger.rst b/doc/UsersGuide/source/api/setInteger.rst index 106c77e59..0263b99fd 100644 --- a/doc/UsersGuide/source/api/setInteger.rst +++ b/doc/UsersGuide/source/api/setInteger.rst @@ -5,19 +5,6 @@ setInteger Sets the value of a given integer signal. #END# -#LUA# -.. code-block:: lua - - status = oms_setInteger(cref, value) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.setInteger(cref, value) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/setLogFile.rst b/doc/UsersGuide/source/api/setLogFile.rst index 2159f38a8..7a06fa4c6 100644 --- a/doc/UsersGuide/source/api/setLogFile.rst +++ b/doc/UsersGuide/source/api/setLogFile.rst @@ -8,20 +8,6 @@ reset. filename="" to redirect to std streams and proper filename to redirect to file. #END# -#LUA# -.. code-block:: lua - - status = oms_setLogFile(filename) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.setLogFile(filename) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/setLoggingInterval.rst b/doc/UsersGuide/source/api/setLoggingInterval.rst index cc24427ea..1b4cf7d43 100644 --- a/doc/UsersGuide/source/api/setLoggingInterval.rst +++ b/doc/UsersGuide/source/api/setLoggingInterval.rst @@ -5,20 +5,6 @@ setLoggingInterval Set the logging interval of the simulation. #END# -#LUA# -.. code-block:: lua - - status = oms_setLoggingInterval(cref, loggingInterval) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.setLoggingInterval(cref, loggingInterval) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/setLoggingLevel.rst b/doc/UsersGuide/source/api/setLoggingLevel.rst index 6a8642c6d..8f396d7f6 100644 --- a/doc/UsersGuide/source/api/setLoggingLevel.rst +++ b/doc/UsersGuide/source/api/setLoggingLevel.rst @@ -7,19 +7,6 @@ Enables/Disables debug logging (logDebug and logTrace). 0 default, 1 default+debug, 2 default+debug+trace #END# -#LUA# -.. code-block:: lua - - oms_setLoggingLevel(logLevel) - -#END# - -#PYTHON# -.. code-block:: python - - oms.setLoggingLevel(logLevel) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/setMaxLogFileSize.rst b/doc/UsersGuide/source/api/setMaxLogFileSize.rst index 55211963a..5bb3fecc3 100644 --- a/doc/UsersGuide/source/api/setMaxLogFileSize.rst +++ b/doc/UsersGuide/source/api/setMaxLogFileSize.rst @@ -6,19 +6,6 @@ Sets maximum log file size in MB. If the file exceeds this limit, the logging will continue on stdout. #END# -#LUA# -.. code-block:: lua - - oms_setMaxLogFileSize(size) - -#END# - -#PYTHON# -.. code-block:: python - - oms.setMaxLogFileSize(size) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/setReal.rst b/doc/UsersGuide/source/api/setReal.rst index 7b726b9c2..bccba8762 100644 --- a/doc/UsersGuide/source/api/setReal.rst +++ b/doc/UsersGuide/source/api/setReal.rst @@ -5,20 +5,6 @@ setReal Sets the value of a given real signal. #END# -#LUA# -.. code-block:: lua - - status = oms_setReal(cref, value) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.setReal(cref, value) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/setRealInputDerivative.rst b/doc/UsersGuide/source/api/setRealInputDerivative.rst index c44ddcdbd..66bf20af1 100644 --- a/doc/UsersGuide/source/api/setRealInputDerivative.rst +++ b/doc/UsersGuide/source/api/setRealInputDerivative.rst @@ -7,19 +7,6 @@ Sets the first order derivative of a real input signal. This can only be used for CS-FMU real input signals. #END# -#LUA# -.. code-block:: lua - - status = oms_setRealInputDerivative(cref, value) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.setRealInputDerivative(cref, value) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/setResultFile.rst b/doc/UsersGuide/source/api/setResultFile.rst index 0d4862441..469a5370f 100644 --- a/doc/UsersGuide/source/api/setResultFile.rst +++ b/doc/UsersGuide/source/api/setResultFile.rst @@ -5,21 +5,6 @@ setResultFile Set the result file of the simulation. #END# -#LUA# -.. code-block:: lua - - status = oms_setResultFile(cref, filename) - status = oms_setResultFile(cref, filename, bufferSize) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.setResultFile(cref, filename) - status = oms.setResultFile(cref, filename, bufferSize) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/setSolver.rst b/doc/UsersGuide/source/api/setSolver.rst index 486301924..53d4111d0 100644 --- a/doc/UsersGuide/source/api/setSolver.rst +++ b/doc/UsersGuide/source/api/setSolver.rst @@ -5,39 +5,6 @@ setSolver Sets the solver method for the given system. #END# -#LUA# -.. code-block:: lua - - status = oms_setSolver(cref, solver) - -.. csv-table:: - :header: "solver", "Type", "Description" - :widths: 20, 10, 35 - - "oms_solver_sc_explicit_euler", "sc-system", "Explicit euler with fixed step size" - "oms_solver_sc_cvode", "sc-system", "CVODE with adaptive stepsize" - "oms_solver_wc_ma", "wc-system", "default master algorithm with fixed step size" - "oms_solver_wc_mav", "wc-system", "master algorithm with adaptive stepsize" - "oms_solver_wc_mav2", "wc-system", "master algorithm with adaptive stepsize (double-step)" - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.setSolver(cref, solver) - -.. csv-table:: - :header: "solver", "Type", "Description" - :widths: 20, 10, 35 - - "oms.solver_sc_explicit_euler", "sc-system", "Explicit euler with fixed step size" - "oms.solver_sc_cvode", "sc-system", "CVODE with adaptive stepsize" - "oms.solver_wc_ma", "wc-system", "default master algorithm with fixed step size" - "oms.solver_wc_mav", "wc-system", "master algorithm with adaptive stepsize" - "oms.solver_wc_mav2", "wc-system", "master algorithm with adaptive stepsize (double-step)" - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/setStartTime.rst b/doc/UsersGuide/source/api/setStartTime.rst index 7c70e2e9f..df9be8e57 100644 --- a/doc/UsersGuide/source/api/setStartTime.rst +++ b/doc/UsersGuide/source/api/setStartTime.rst @@ -5,19 +5,6 @@ setStartTime Set the start time of the simulation. #END# -#LUA# -.. code-block:: lua - - status = oms_setStartTime(cref, startTime) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.setStartTime(cref, startTime) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/setStopTime.rst b/doc/UsersGuide/source/api/setStopTime.rst index d4a5d5aca..4cc9a290e 100644 --- a/doc/UsersGuide/source/api/setStopTime.rst +++ b/doc/UsersGuide/source/api/setStopTime.rst @@ -5,20 +5,6 @@ setStopTime Set the stop time of the simulation. #END# -#LUA# -.. code-block:: lua - - status = oms_setStopTime(cref, stopTime) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.setStopTime(cref, stopTime) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/setString.rst b/doc/UsersGuide/source/api/setString.rst index 790f30c17..08ea69f84 100644 --- a/doc/UsersGuide/source/api/setString.rst +++ b/doc/UsersGuide/source/api/setString.rst @@ -5,20 +5,6 @@ setString Sets the value of a given string signal. #END# -#LUA# -.. code-block:: lua - - status = oms_setString(cref, value) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.setString(cref, value) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/setTempDirectory.rst b/doc/UsersGuide/source/api/setTempDirectory.rst index 31c06bea1..6c752a685 100644 --- a/doc/UsersGuide/source/api/setTempDirectory.rst +++ b/doc/UsersGuide/source/api/setTempDirectory.rst @@ -5,19 +5,6 @@ setTempDirectory Set new temp directory. #END# -#LUA# -.. code-block:: lua - - status = oms_setTempDirectory(newTempDir) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.setTempDirectory(newTempDir) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/setTolerance.rst b/doc/UsersGuide/source/api/setTolerance.rst index e9478b47b..886dd031b 100644 --- a/doc/UsersGuide/source/api/setTolerance.rst +++ b/doc/UsersGuide/source/api/setTolerance.rst @@ -5,20 +5,6 @@ setTolerance Sets the tolerance for a given model or system. #END# -#LUA# -.. code-block:: lua - - status = oms_setTolerance(const char* cref, double relativeTolerance) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.setTolerance(const char* cref, double relativeTolerance) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/setUnit.rst b/doc/UsersGuide/source/api/setUnit.rst index 9bbdf1cd4..f5d1c014f 100644 --- a/doc/UsersGuide/source/api/setUnit.rst +++ b/doc/UsersGuide/source/api/setUnit.rst @@ -5,19 +5,6 @@ setUnit Sets the unit of a given signal. #END# -#LUA# -.. code-block:: lua - - status = oms_setUnit(cref, value) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.setUnit(cref, value) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/setVariableStepSize.rst b/doc/UsersGuide/source/api/setVariableStepSize.rst index 4c67dcfd1..957fdb694 100644 --- a/doc/UsersGuide/source/api/setVariableStepSize.rst +++ b/doc/UsersGuide/source/api/setVariableStepSize.rst @@ -5,19 +5,6 @@ setVariableStepSize Sets the step size parameters for methods with stepsize control. #END# -#LUA# -.. code-block:: lua - - status = oms_getVariableStepSize(cref, initialStepSize, minimumStepSize, maximumStepSize) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.getVariableStepSize(cref, initialStepSize, minimumStepSize, maximumStepSize) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/setWorkingDirectory.rst b/doc/UsersGuide/source/api/setWorkingDirectory.rst index d31cc82a0..0c5b24d1e 100644 --- a/doc/UsersGuide/source/api/setWorkingDirectory.rst +++ b/doc/UsersGuide/source/api/setWorkingDirectory.rst @@ -5,19 +5,6 @@ setWorkingDirectory Set a new working directory. #END# -#LUA# -.. code-block:: lua - - status = oms_setWorkingDirectory(newWorkingDir) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.setWorkingDirectory(newWorkingDir) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/simulate.rst b/doc/UsersGuide/source/api/simulate.rst index c198c4562..b17229711 100644 --- a/doc/UsersGuide/source/api/simulate.rst +++ b/doc/UsersGuide/source/api/simulate.rst @@ -5,20 +5,6 @@ simulate Simulates a composite model. #END# -#LUA# -.. code-block:: lua - - status = oms_simulate(cref) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.simulate(cref) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/simulate_realtime.rst b/doc/UsersGuide/source/api/simulate_realtime.rst index d899c2ed7..0d7275f81 100644 --- a/doc/UsersGuide/source/api/simulate_realtime.rst +++ b/doc/UsersGuide/source/api/simulate_realtime.rst @@ -5,13 +5,6 @@ simulate_realtime Experimental feature for (soft) real-time simulation. #END# -#LUA# -.. code-block:: lua - - status = experimental_simulate_realtime(ident) - -#END# - #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/stepUntil.rst b/doc/UsersGuide/source/api/stepUntil.rst index 8323c2356..2be887dc8 100644 --- a/doc/UsersGuide/source/api/stepUntil.rst +++ b/doc/UsersGuide/source/api/stepUntil.rst @@ -5,19 +5,6 @@ stepUntil Simulates a composite model until a given time value. #END# -#LUA# -.. code-block:: lua - - status = oms_stepUntil(cref, stopTime) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.stepUntil(cref, stopTime) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/api/terminate.rst b/doc/UsersGuide/source/api/terminate.rst index e08faa4e9..91eec9077 100644 --- a/doc/UsersGuide/source/api/terminate.rst +++ b/doc/UsersGuide/source/api/terminate.rst @@ -5,19 +5,6 @@ terminate Terminates a given composite model. #END# -#LUA# -.. code-block:: lua - - status = oms_terminate(cref) - -#END# - -#PYTHON# -.. code-block:: python - - status = oms.terminate(cref) - -#END# #CAPI# .. code-block:: c diff --git a/doc/UsersGuide/source/conf.py b/doc/UsersGuide/source/conf.py index a358c739e..6c71d3a81 100644 --- a/doc/UsersGuide/source/conf.py +++ b/doc/UsersGuide/source/conf.py @@ -287,8 +287,6 @@ #texinfo_no_detailmenu = False OMSimulatorLib = "" -OMSimulatorLua = "" -OMSimulatorPython = "" OMCScripting = "" def CmdSupportsTarget(filename: str, target: str): @@ -305,18 +303,6 @@ def CmdSupportsTarget(filename: str, target: str): OMSimulatorLib = OMSimulatorLib + ".. include:: api/" + filename + "\n :start-after: #CAPI#\n :end-before: #END#\n\n" OMSimulatorLib = OMSimulatorLib + ".. include:: api/" + filename + "\n :start-after: #DESCRIPTION#\n :end-before: #END#\n\n" - if CmdSupportsTarget(filename, '#LUA#'): - OMSimulatorLua = OMSimulatorLua + ".. " + filename + "\n\n" - OMSimulatorLua = OMSimulatorLua + ".. include:: api/" + filename + "\n :start-after: #CAPTION#\n :end-before: #END#\n\n" - OMSimulatorLua = OMSimulatorLua + ".. include:: api/" + filename + "\n :start-after: #LUA#\n :end-before: #END#\n\n" - OMSimulatorLua = OMSimulatorLua + ".. include:: api/" + filename + "\n :start-after: #DESCRIPTION#\n :end-before: #END#\n\n" - - if CmdSupportsTarget(filename, '#PYTHON#'): - OMSimulatorPython = OMSimulatorPython + ".. " + filename + "\n\n" - OMSimulatorPython = OMSimulatorPython + ".. include:: api/" + filename + "\n :start-after: #CAPTION#\n :end-before: #END#\n\n" - OMSimulatorPython = OMSimulatorPython + ".. include:: api/" + filename + "\n :start-after: #PYTHON#\n :end-before: #END#\n\n" - OMSimulatorPython = OMSimulatorPython + ".. include:: api/" + filename + "\n :start-after: #DESCRIPTION#\n :end-before: #END#\n\n" - if CmdSupportsTarget(filename, '#OMC#'): OMCScripting = OMCScripting + ".. " + filename + "\n\n" OMCScripting = OMCScripting + ".. include:: api/" + filename + "\n :start-after: #CAPTION#\n :end-before: #END#\n\n" @@ -324,6 +310,4 @@ def CmdSupportsTarget(filename: str, target: str): OMCScripting = OMCScripting + ".. include:: api/" + filename + "\n :start-after: #DESCRIPTION#\n :end-before: #END#\n\n" open("OMSimulatorLib.inc", "w").write("%s" % OMSimulatorLib) -open("OMSimulatorLua.inc", "w").write("%s" % OMSimulatorLua) -open("OMSimulatorPython.inc", "w").write("%s" % OMSimulatorPython) open("OMCScripting.inc", "w").write("%s" % OMCScripting) diff --git a/doc/UsersGuide/source/index.rst b/doc/UsersGuide/source/index.rst index 98b92acec..80a5a0d2e 100644 --- a/doc/UsersGuide/source/index.rst +++ b/doc/UsersGuide/source/index.rst @@ -14,13 +14,9 @@ OMSimulator's documentation introduction OMSimulator OMSimulatorLib - OMSimulatorLua - OMSimulatorPython OMSimulatorPython3 OpenModelicaScripting OMEdit - SSP - .. only :: html diff --git a/doc/UsersGuide/source/introduction.rst b/doc/UsersGuide/source/introduction.rst index 755c6ea97..d4ffeede6 100644 --- a/doc/UsersGuide/source/introduction.rst +++ b/doc/UsersGuide/source/introduction.rst @@ -13,4 +13,4 @@ composite models can be exported according to the SSP (System Structure and Parameterization) standard. Efficient FMI based simulation is provided for both model exchange and co-simulation. An external API is available for use from other tools and scripting -languages such as :ref:`Python ` and :ref:`Lua `. +languages such as :ref:`Python `. diff --git a/src/OMSimulatorPython/cli.py b/src/OMSimulatorPython/cli.py index 31fb0836d..fb1584958 100644 --- a/src/OMSimulatorPython/cli.py +++ b/src/OMSimulatorPython/cli.py @@ -36,6 +36,7 @@ Allows running a model file directly, e.g.: OMSimulator test.ssp OMSimulator model.fmu + OMSimulator test.py running a Python driver script without having to write a driver script. All simulation settings (start/stop time, result file, tolerance, ...) are taken from the