-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6515b87
Showing
335 changed files
with
86,718 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 7f883bc62c11fa849211025de35d5f32 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
```{include} ../../CHANGELOG.md | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# LICENSE | ||
```{include} ../../LICENSE | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
```{include} ../../README.md | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
```{include} ../../STYLEGUIDE.md | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
API Documentation | ||
================= | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
|
||
ospx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.. sphinx_argparse_cli:: | ||
:module: ospx.cli.importSystemStructure | ||
:func: _argparser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.. sphinx_argparse_cli:: | ||
:module: ospx.cli.ospCaseBuilder | ||
:func: _argparser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
CLI Documentation | ||
================= | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
cli.ospCaseBuilder | ||
cli.importSystemStructure | ||
cli.watchCosim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.. sphinx_argparse_cli:: | ||
:module: ospx.watch.cli.watchCosim | ||
:func: _argparser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,300 @@ | ||
# caseDict | ||
|
||
## Description | ||
|
||
A caseDict is a file in dictIO dict file format used with ospCaseBuilder | ||
|
||
A caseDict acts as input for ospCaseBuilder to | ||
* generate an osp-compatible simulation case, consisting of one or multiple fmu's | ||
* trigger subsequent actions, such as writing a statisticsDict and a default watchDict | ||
|
||
A caseDict file contains | ||
* generic information about the simulation case and the physical location of the fmu's to be sourced | ||
* information about the components and the names to be used within the simulation | ||
* for each component, a dictionary of settings (e.g. start values and connector names) | ||
* a connection routing between connectors defined in component sub-dictionary | ||
|
||
## Elements | ||
|
||
| element / key | type | Description | | ||
| :------------------------------------------------ | :-------- | :---------- | | ||
| #include | string | include directive. The specified dict file (e.g. a paramDict) will be read and merged into the caseDict | | ||
| _environment | dict | environment variables needed by ospCaseBuilder at runtime | | ||
|  libSource | string | relative or absolute path to the directory where the FMUs are located, i.e. the base folder of an FMU library. It acts as entry point for the FMU search. | | ||
| systemStructure | dict | complete system structure | | ||
|  components | dict | defines all component models used in the simulation | | ||
|   \<COMPONENT> | dict | unique name identifying a component in the simulation | | ||
|    connectors | dict | itemization of connectors as defined in the FMU's modelDescription.xml | | ||
|     \<CONNECTOR> | dict | speaking name of a connector, i.e. what it does and where it is mounted | | ||
|      variable | string | name of a referenced variable as defined in the FMU file (mutually exclusive with variableGroup)| | ||
|      variableGroup | string | name of a referenced VariableGroup as defined in <fmu_name>_OSPModelDescription.xml (mutually exclusive with variable)| | ||
|      type | string | type of the connector. Choices: {input, output} | | ||
|    initialize | dict | optional initialization, updating the FMU's default settings | | ||
|     \<VARIABLE> | dict | the variable / parameter to be set. Needs to match the name as defined in the FMU file. | | ||
|      causality | string | causality of the variable. Choices: {input, output, parameter} | | ||
|      variability | string | variability of the variable. Choices: {fixed, calculated, tunable} | | ||
|      start | float | initial value the variable shall be set to. | | ||
|    fmu | string | relative path to the location of the source FMU (relative to libSource) | | ||
|    stepSize | string | optional step size for this component. Only necessary in case the step size shall deviate from the default step size defined in the FMU's ModelDescription.xml | | ||
|  connections | dict | itemization of connections | | ||
|   \<CONNECTION> | dict | speaking name of the connection | | ||
|    source | dict | source endpoint of \<CONNECTION> | | ||
|     component | string | name of source \<COMPONENT> | | ||
|     connector | string | name of \<CONNECTOR> at source \<COMPONENT> (mutually exclusive with variable) | | ||
|     variable | string | name of \<VARIABLE> at source \<COMPONENT> (mutually exclusive with connector) | | ||
|    target | dict | target endpoint of \<CONNECTION> | | ||
|     component | string | name of target \<COMPONENT> | | ||
|     connector | string | name of \<CONNECTOR> at target \<COMPONENT> (mutually exclusive with variable) | | ||
|     variable | string | name of \<VARIABLE> at target \<COMPONENT> (mutually exclusive with connector) | | ||
| run | dict | settings for simulation run | | ||
|  simulation | dict | additional information about the simulaton. Used for window decoration. | | ||
|   name | string | name of the simulation | | ||
|   startTime | float | start time | | ||
|   stopTime | float | start time | | ||
|   baseStepSize | float | master algorithm step size | | ||
|   algorithm | string | Co-simulation master algorithm (currently 'fixedStep' is supported by OSP) | | ||
|
||
## Example | ||
|
||
Below example shows a typical caseDict file. | ||
|
||
~~~guess | ||
/*---------------------------------*- C++ -*----------------------------------*\ | ||
filetype dictionary; coding utf-8; version 0.1; local --; purpose --; | ||
\*----------------------------------------------------------------------------*/ | ||
#include 'paramDict' | ||
|
||
_environment | ||
{ | ||
libSource path/to/a/model/library/on/your/machine; | ||
} | ||
systemStructure | ||
{ | ||
connections | ||
{ | ||
minuend_to_difference | ||
{ | ||
source | ||
{ | ||
component minuend; | ||
connector minuend_output; | ||
} | ||
target | ||
{ | ||
component difference; | ||
connector difference_input_minuend; | ||
} | ||
} | ||
subtrahend_to_difference | ||
{ | ||
source | ||
{ | ||
component subtrahend; | ||
connector subtrahend_output; | ||
} | ||
target | ||
{ | ||
component difference; | ||
connector difference_input_subtrahend; | ||
} | ||
} | ||
dividend_to_quotient | ||
{ | ||
source | ||
{ | ||
component dividend; | ||
connector dividend_output; | ||
} | ||
target | ||
{ | ||
component quotient; | ||
connector quotient_input_dividend; | ||
} | ||
} | ||
difference_to_divisor | ||
{ | ||
source | ||
{ | ||
component difference; | ||
connector difference_output; | ||
} | ||
target | ||
{ | ||
component quotient; | ||
connector quotient_input_divisor; | ||
} | ||
} | ||
} | ||
components | ||
{ | ||
difference | ||
{ | ||
connectors | ||
{ | ||
difference_input_minuend | ||
{ | ||
variable difference.IN1; | ||
type input; | ||
} | ||
difference_input_subtrahend | ||
{ | ||
variable difference.IN2; | ||
type input; | ||
} | ||
difference_output | ||
{ | ||
variable difference.OUT; | ||
type output; | ||
} | ||
} | ||
fmu subfolder/in/your/library/difference.fmu; | ||
} | ||
quotient | ||
{ | ||
connectors | ||
{ | ||
quotient_input_dividend | ||
{ | ||
variable quotient.IN1; | ||
type input; | ||
} | ||
quotient_input_divisor | ||
{ | ||
variable quotient.IN2; | ||
type input; | ||
} | ||
quotient_output | ||
{ | ||
variable quotient.OUT; | ||
type output; | ||
} | ||
|
||
} | ||
fmu subfolder/in/your/library/quotient.fmu; | ||
} | ||
minuend | ||
{ | ||
connectors | ||
{ | ||
minuend_output | ||
{ | ||
variable constVal.OUT; | ||
type output; | ||
} | ||
} | ||
initialize | ||
{ | ||
constVal.IN | ||
{ | ||
causality parameter; | ||
variability fixed; | ||
start $minuend; | ||
} | ||
} | ||
fmu subfolder/in/your/library/constantVal.fmu; | ||
} | ||
subtrahend | ||
{ | ||
connectors | ||
{ | ||
subtrahend_output | ||
{ | ||
variable constVal.OUT; | ||
type output; | ||
} | ||
} | ||
initialize | ||
{ | ||
constVal.IN | ||
{ | ||
causality parameter; | ||
variability fixed; | ||
start $subtrahend; | ||
} | ||
} | ||
fmu subfolder/in/your/library/constantVal.fmu; | ||
} | ||
dividend | ||
{ | ||
connectors | ||
{ | ||
dividend_output | ||
{ | ||
variable constVal.OUT; | ||
type output; | ||
} | ||
} | ||
initialize | ||
{ | ||
constVal.IN | ||
{ | ||
causality parameter; | ||
variability fixed; | ||
start $dividend; | ||
} | ||
} | ||
fmu subfolder/in/your/library/constantVal.fmu; | ||
} | ||
} | ||
} | ||
run | ||
{ | ||
simulation | ||
{ | ||
name demoCase; | ||
startTime 0; | ||
stopTime 10; | ||
baseStepSize 0.01; | ||
algorithm fixedStep; | ||
} | ||
} | ||
|
||
~~~ | ||
If you aim for just a first inspection of a simulation case, all you need to do is drop all referenced FMUs | ||
into the case's build directory and call ospCaseBuilder with the --inspect option: | ||
``` | ||
ospCaseBuilder caseDict --inspect --verbose | ||
``` | ||
Inspection works already with a fairly rudimentary caseDict, such as: | ||
~~~guess | ||
/*---------------------------------*- C++ -*----------------------------------*\ | ||
filetype dictionary; coding utf-8; version 0.1; local --; purpose --; | ||
\*----------------------------------------------------------------------------*/ | ||
_environment | ||
{ | ||
libSource path/to/a/model/library/on/your/machine; | ||
} | ||
systemStructure | ||
{ | ||
components | ||
{ | ||
difference | ||
{ | ||
fmu subfolder/in/your/library/difference.fmu; | ||
} | ||
quotient | ||
{ | ||
fmu subfolder/in/your/library/quotient.fmu; | ||
} | ||
minuend | ||
{ | ||
fmu subfolder/in/your/library/constantVal.fmu; | ||
} | ||
subtrahend | ||
{ | ||
fmu subfolder/in/your/library/constantVal.fmu; | ||
} | ||
dividend | ||
{ | ||
fmu subfolder/in/your/library/constantVal.fmu; | ||
} | ||
} | ||
} | ||
run | ||
{ | ||
simulation | ||
{ | ||
name demoCase; | ||
} | ||
} | ||
~~~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
File Format | ||
================= | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
fileFormat.caseDict | ||
fileFormat.watchDict |
Oops, something went wrong.