You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cosim-cli.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
layout: default
3
-
title: "cosim"
3
+
title: "Command line interface"
4
4
permalink: /cosim
5
5
has_toc: false
6
6
nav_order: 2
@@ -13,8 +13,8 @@ nav_order: 2
13
13
</b>
14
14
</div>
15
15
16
-
# cosim
17
-
`cosim` is a command-line interface (CLI) to libcosim for the cases where a graphical user interface is not available or needed. It facilitates for running co-simulations of systems configured with SSP or [OSP system structure configuration](./libcosim/configuration).
16
+
# Command line interface
17
+
`cosim` is a commandline interface (CLI) to libcosim for the cases where a graphical user interface is not available or needed. It facilitates for running co-simulations of systems configured with SSP or [OSP system structure configuration](./libcosim/configuration).
18
18
It has three primary use cases:
19
19
20
20
- Running simulations from other programs or scripts
Copy file name to clipboardExpand all lines: cosim-demo-app/House.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ This demo case simulates the temperature deviations of a house which consists of
14
14
## Model Description
15
15
A simplified model represents the heat exchange dynamics of a house as shown in Figure 1.
16
16
17
-

17
+
[](/assets/img/HouseFig1.png)
18
18
19
19
**Table 1:***List of FMUs of the house configuration and their input/output variables for connection.*
20
20
@@ -42,6 +42,6 @@ A simplified model represents the heat exchange dynamics of a house as shown in
42
42
43
43
Figure 2 shows the simulation results of the temperature of each room over time.
44
44
45
-
[](/assets/img/HouseFig3.png)
45
+
[](/assets/img/HouseFig3.png)
46
46
47
47
More information on how to use the _cosim demo app_ is available in the [user guide](./user-guide), where the [DP-Ship](./DPShip) demo test case was used as an example.
This example describes a low-level test case for the performance of libcosim in terms of accuracy and efficiency [1].
15
15
Figure 1 shows a simplified model of a quarter truck with two masses mWheel and mChassis representing the mass of wheel and chassis respectively. Both masses have a single vertical degree of freedom coupled by a linear spring-damper system representing the suspension force and tire force. The ground profile is given as external input.
16
16
17
-

17
+
[](/assets/img/QuarterTruckFig1.png)
18
18
19
19
## Model Description
20
20
@@ -46,7 +46,7 @@ The local default parameters used in the model are listed in Table 2.
46
46
The following scenario is performed as example: The system starts from equilibrium state where `zWheel = zChassis = 0`. The ground profile is defined as a step function excited by a jump of 0.1m in vertical direction at 1s.
47
47
Figure 2 below shows the simulation results using the *cosim demo app*. In the plot the vertical displacements of the wheel and the chassis are displayed.
48
48
49
-
[](/assets/img/QuarterTruckFig6.png)
49
+
[](/assets/img/QuarterTruckFig6.png)
50
50
51
51
More information on how to use the _cosim demo app_ is available in the [user guide](./user-guide), where the [DP-Ship](./DPShip) demo test case was used as an example.
Copy file name to clipboardExpand all lines: cosim-demo-app/cosim-demo-app.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
layout: default
3
-
title: "cosim demo app"
3
+
title: "Demo application"
4
4
has_children: true
5
5
permalink: /cosim-demo-app/cosim-demo-app
6
6
has_toc: false
@@ -14,9 +14,9 @@ nav_order: 3
14
14
</b>
15
15
</div>
16
16
17
-
# cosim demo app
17
+
# Demo application
18
18
19
-
Load a configuration, control the simulation or explore in a easy way some of the features included in libcosim. The demo application was developed to showcase how the library can be used in an application and to provide a graphical user interface to manage co-simulations.
19
+
Load a configuration, control the simulation or explore in a easy way some of the features included in `libcosim`. The `cosim demo app` was developed to showcase how the library can be used in an application and to provide a graphical user interface to manage co-simulations.
20
20
21
21
There are options for real time execution or simulation in free mode (as fast as the hardware allows). During simulation, the user can observe simulation variables, manipulate these and visualise the results in charts.
22
22
A scenario management feature allows change of the simulation variables automatically based on a scenario file. It is also possible to log to file the simulation variable values of all models.
Copy file name to clipboardExpand all lines: cosim-demo-app/user-guide.md
+23-21
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ layout: default
3
3
title: "User guide"
4
4
permalink: /cosim-demo-app/user-guide
5
5
has_toc: false
6
-
parent: "cosim demo app"
6
+
parent: "Demo application"
7
7
---
8
8
9
9
# User guide
@@ -29,17 +29,17 @@ Features covered in this user guide:
29
29
30
30
1.[Download](https://github.com/open-simulation-platform/cosim-demo-app/releases) the _cosim demo app_.
31
31
2. Extract the files and you will have a root folder looking like the figure below
32
-
3.[Download](https://github.com/open-simulation-platform/cse-demos/releases) the _dp-ship_ demo case.
32
+
3.[Download](https://github.com/open-simulation-platform/demo-cases/releases) the _dp-ship_ demo case.
33
33
4. Extract the demo configuration
34
34
5. Run the startup script: run-windows.cmd
35
35
6. The application should open in your web browser at url http://localhost:8000.
36
-

36
+
[](/assets/img/UserguideFig1.png)
37
37
38
38
**Linux:**
39
39
40
40
1.[Download](https://github.com/open-simulation-platform/cosim-demo-app/releases) the _cosim demo app_.
41
41
2. Extract archive: tar -xzvf cosim-demo-app-vX.Y.Z.tar.gz
42
-
3.[Download](https://github.com/open-simulation-platform/cse-demos/releases) the _dp-ship_ demo case.
42
+
3.[Download](https://github.com/open-simulation-platform/demo-cases/releases) the _dp-ship_ demo case.
43
43
4. Extract the demo configuration
44
44
5. Run startup script: run-linux
45
45
6. The application should open in your web browser at url http://localhost:8000.
@@ -54,12 +54,12 @@ Features covered in this user guide:
54
54
4. Previously used configurations are available below.
55
55
5. Click "Load simulation" to load the configuration.
56
56
57
-

57
+
[](/assets/img/UserguideFig2.png)
58
58
59
59
A typical configuration folder will contain simulation models (FMUs) and configuration files.
60
-
Connections between models and initialization values are configured through the files "OspSystemStructure.xml" or "SystemStructure.ssd".
61
-
If your configuration directory contains both ("OspSystemStructure.xml" and a "SystemStructure.ssd"), the .xml file will be prioritized.
62
-
If you would like to load your simulation with the connections as defined on the "SystemStructure.ssd" file, include it in the path (Example: C:\cosim-demos\dp-ship\SystemStructure.ssd)
60
+
Connections between models and initialization values are configured through the files `OspSystemStructure.xml` or `SystemStructure.ssd`.
61
+
If your configuration directory contains both (`OspSystemStructure.xml` and a `SystemStructure.ssd`), the .xml file will be prioritized.
62
+
If you would like to load your simulation with the connections as defined on the `SystemStructure.ssd` file, include it in the path (Example: C:\cosim-demos\dp-ship\SystemStructure.ssd)
63
63
64
64
[back to top](./user-guide#user-guide)
65
65
@@ -68,7 +68,7 @@ If you would like to load your simulation with the connections as defined on the
68
68
1. After loading the configuration, the simulation models are shown on the left hand side.
69
69
2. Browse the model variables by clicking the names. Their variables are organized in tabs based on causality.
70
70
71
-

71
+
[](/assets/img/UserguideFig3.png)
72
72
73
73
[back to top](./user-guide#user-guide)
74
74
@@ -80,21 +80,23 @@ as the hardware allows).
80
80
3. At the navigation bar, the RTF (Real Time Factor) indicates the current simulation speed related to real time. For instance, a RTF = 2 means that simulation runs at twice the speed of real time.
81
81
4. Real time factor target value can be altered to set a specific RTF.
82
82
5. At the navigation bar, click on "Play/Pause" to start or pause the simulation.
83
-
6. To close the current simulation and to load another configuration, click the "Tear down" button. Note that the current simulation needs to be paused in order to enable this button.
83
+
6. At the navigation bar, click on "Reset" to stop a simulation and initialize it again.
84
+
7. To close the current simulation and to load another configuration, click the "Tear down" button. Note that the current simulation needs to be paused in order to enable this button.
84
85
85
-

86
+
[](/assets/img/UserguideFig4.png)
86
87
87
88
[back to top](./user-guide#user-guide)
88
89
89
90
## Plot variables
90
91
*Note: Each item below is highlighted in the figures below with its corresponding number.*
91
-
1. Click "Create new time series" or "Create new XY plot" to obtain a time series plot or an XY plot that variables can be added to.
92
-
2. Any variable can be added to a plot by clicking "Add to plot" in the variable overview.
93
-
3. Select where to plot the variable from the list of available plots.
94
-
4. Click the plot name to see the chart.
92
+
1. Click "+ XY plot" or "+ Time series" to create a new XY plot or a new time series plot, respectively. The plots are initially empty. Navigate to a simulation model and add variables to a plot.
93
+
2. Click "Save plot config" to save to file the current plot configuration. Next time the configuration is loaded the saved plots will be automatically loaded.
94
+
3. Any variable can be added to a plot by clicking "Add to plot" in the variable overview.
95
+
4. Select where to plot the variable from the list of available plots.
96
+
5. Click the plot name to see the chart.
95
97
96
-

97
-

98
+
[](/assets/img/UserguideFig5.png)
Two types of plot are supported by the _cosim demo app_: **trend** and **scatter**. The type trend (above defined as "time series") shows the curve of a variable over time, while the type scatter (above defined as "XY plot") shows the relation between two variables, of one versus the other.
@@ -145,7 +147,7 @@ It is possible to override any variable value.
145
147
2. Type in the value and click the check icon to confirm the new value.
146
148
3. Click the eraser symbol to remove the override.
-[kopl - linux (experimental)](https://mooropt2.marintek.sintef.no/nexus/content/repositories/thirdparty/no/sintef/ocean/kopl/kopl/1.0.0/kopl-1.0.0-linux.gtk.x86_64.zip)
0 commit comments