Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
into-cps-github-io
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Into-cps
github-into-cps
into-cps-github-io
Commits
404be1c1
Commit
404be1c1
authored
8 years ago
by
Casper Thule Hansen
Browse files
Options
Downloads
Patches
Plain Diff
Updated example for COE
parent
1d7ac8d8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
simulation/example.md
+16
-7
16 additions, 7 deletions
simulation/example.md
with
16 additions
and
7 deletions
simulation/example.md
+
16
−
7
View file @
404be1c1
...
...
@@ -38,10 +38,10 @@ Create a file named `config.json` with the following content:
```
json
{
"fmus"
:
[
"fmus"
:
{
"{fmu1}"
:
"../fmus/tankcontroller.fmu"
,
"{fmu2}"
:
"../fmus/tank.fmu"
]
,
}
,
"connections"
:{
"{fmu1}.controller.valve"
:
[
"{fmu2}.tank.valve"
],
...
...
@@ -71,17 +71,27 @@ cd coe
java
-jar
coe.jar
```
2.
(New terminal, or use &)
Initialize
the simulation
2.
(New terminal, or use &)
Create a session to use for
the simulation
```
bash
curl
-s
-H
"Content-Type: application/json"
--data
@config.json
http://localhost:8082/
initialize
sessionIdJson
=
$(
curl
-s
http://localhost:8082/
createSession
)
```
3.
Find the session id in the response
4.
Start the simulation
```
bash
sessionId
=
1234
sessionId
=
`
echo
$sessionIdJson
|
cut
-d
":"
-f
2- |
cut
-d
"}"
-f
1
`
```
4.
Initialize the simulation
```
bash
curl
-s
-H
"Content-Type: application/json"
--data
@config.json http://localhost:8082/initialize/
$sessionId
```
5.
Start the simulation
```
bash
endTime
=
4
curl
-s
-H
"Content-Type: application/json"
--data
'{"startTime":0.0, "endTime":'
$endTime
'}'
http://localhost:8082/simulate/
$sessionId
```
...
...
@@ -103,4 +113,3 @@ curl -s http://localhost:8082/result/$sessionId
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment