-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #413 from INTO-CPS-Association/scenario-verifier-test
Scenario verifier test
- Loading branch information
Showing
48 changed files
with
366 additions
and
645 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
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
2 changes: 1 addition & 1 deletion
2
...al_tester/scenario_controller_resources/generate_from_multi_model/expectedMasterModel.txt
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 |
---|---|---|
@@ -1 +1 @@ | ||
name = generatedFromMultiModel\nscenario = {\nfmus = {\nFMU_roller = { \n can-reject-step = true,\n inputs = {\nvalve = {reactivity=delayed}},\n outputs = {\nlevel = {dependencies-init=[valve], dependencies=[valve]}}\n }\nController_cont = { \n can-reject-step = true,\n inputs = {\nlevel = {reactivity=delayed}},\n outputs = {\n}\n }}\nconnections = [\n"FMU_roller.level" -> "Controller_cont.level"]\n}\ninitialization = [\n\n{set: "FMU_roller.valve"}\n\n{get: "FMU_roller.level"}\n\n{set: "Controller_cont.level"}\n\n\n]\ncosim-step = {conf1 = [{save-state: Controller_cont}\n\n{save-state: FMU_roller}\n\n{loop: { \n until-step-accept: [Controller_cont,FMU_roller] \n iterate: [{step: Controller_cont }\n\n{step: FMU_roller }\n] \n if-retry-needed: [{restore-state: Controller_cont}\n\n{restore-state: FMU_roller}\n]} \n }\n\n{set: "FMU_roller.valve"}\n\n{get: "FMU_roller.level"}\n\n{set: "Controller_cont.level"}\n]\n} | ||
name = generatedFromMultiModel\nscenario = {\n \n fmus = {\n FMU_roller = \n {\n can-reject-step = true,\n inputs = {\n \n },\n outputs = {\n level = {dependencies-init=[], dependencies=[]}\n }\n }\nController_cont = \n {\n can-reject-step = true,\n inputs = {\n level = {reactivity=delayed}\n },\n outputs = {\n \n }\n }\n }\n connections = [ \"FMU_roller.level\" -> \"Controller_cont.level\"]\n\n}\ninitialization = [ {get: \"FMU_roller.level\"}\n {set: \"Controller_cont.level\"}]\ncosim-step = { conf1 =\n [ {save-state: Controller_cont}\n {save-state: FMU_roller}\n {\n loop: {\n until-step-accept: [Controller_cont,FMU_roller]\n iterate: [ {step: Controller_cont }\n {step: FMU_roller }]\n if-retry-needed: [ {restore-state: Controller_cont}, {restore-state: FMU_roller}]\n }\n }\n \n {get: \"FMU_roller.level\"}\n {set: \"Controller_cont.level\"}]\n }\n |
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 |
---|---|---|
|
@@ -12,7 +12,6 @@ | |
"sigver": { | ||
"reactivity": { | ||
"{Controller}.cont.level": "Delayed" | ||
}, | ||
"verification": false | ||
} | ||
} | ||
} |
212 changes: 102 additions & 110 deletions
212
external_tester/scenario_controller_resources/generate_from_scenario/expectedResult.txt
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 |
---|---|---|
@@ -1,114 +1,106 @@ | ||
name = Example master that has a loop within a loop | ||
scenario = { | ||
fmus = { | ||
msd3 = { | ||
can-reject-step = true, | ||
inputs = { | ||
z = {reactivity=delayed}}, | ||
outputs = { | ||
G = {dependencies-init=[z], dependencies=[z]}} | ||
} | ||
msd2 = { | ||
can-reject-step = true, | ||
inputs = { | ||
v1 = {reactivity=reactive} | ||
x1 = {reactivity=delayed} | ||
G = {reactivity=reactive}}, | ||
outputs = { | ||
fk = {dependencies-init=[x1,v1], dependencies=[x1,v1]} | ||
z = {dependencies-init=[], dependencies=[]}} | ||
} | ||
msd1 = { | ||
can-reject-step = true, | ||
inputs = { | ||
fk = {reactivity=reactive}}, | ||
outputs = { | ||
x1 = {dependencies-init=[], dependencies=[]} | ||
v1 = {dependencies-init=[], dependencies=[]}} | ||
}} | ||
connections = [ | ||
"msd1.x1" -> "msd2.x1" | ||
"msd1.v1" -> "msd2.v1" | ||
"msd2.fk" -> "msd1.fk" | ||
"msd2.z" -> "msd3.z" | ||
"msd3.G" -> "msd2.G"] | ||
fmus = { | ||
msd3 = | ||
{ | ||
can-reject-step = true, | ||
inputs = { | ||
z = {reactivity=delayed} | ||
}, | ||
outputs = { | ||
G = {dependencies-init=[z], dependencies=[z]} | ||
} | ||
} | ||
msd2 = | ||
{ | ||
can-reject-step = true, | ||
inputs = { | ||
v1 = {reactivity=reactive} | ||
x1 = {reactivity=delayed} | ||
G = {reactivity=reactive} | ||
}, | ||
outputs = { | ||
fk = {dependencies-init=[x1,v1], dependencies=[x1,v1]} | ||
z = {dependencies-init=[], dependencies=[]} | ||
} | ||
} | ||
msd1 = | ||
{ | ||
can-reject-step = true, | ||
inputs = { | ||
fk = {reactivity=reactive} | ||
}, | ||
outputs = { | ||
x1 = {dependencies-init=[], dependencies=[]} | ||
v1 = {dependencies-init=[], dependencies=[]} | ||
} | ||
} | ||
} | ||
connections = [ | ||
"msd1.x1" -> "msd2.x1", | ||
"msd1.v1" -> "msd2.v1", | ||
"msd2.fk" -> "msd1.fk", | ||
"msd2.z" -> "msd3.z", | ||
"msd3.G" -> "msd2.G" | ||
] | ||
} | ||
initialization = [ | ||
|
||
|
||
{get: "msd1.x1"} | ||
|
||
{set: "msd2.x1"} | ||
|
||
{get: "msd2.z"} | ||
|
||
{set: "msd3.z"} | ||
|
||
{get: "msd1.v1"} | ||
|
||
{set: "msd2.v1"} | ||
|
||
{get: "msd2.fk"} | ||
|
||
{set: "msd1.fk"} | ||
|
||
{get: "msd3.G"} | ||
|
||
{set: "msd2.G"} | ||
|
||
|
||
|
||
] | ||
cosim-step = {conf1 = [{save-state: msd2} | ||
|
||
{save-state: msd1} | ||
|
||
{save-state: msd3} | ||
|
||
{loop: { | ||
until-step-accept: [msd2,msd1,msd3] | ||
iterate: [{loop: { | ||
until-converged: ["msd3.G","msd2.fk","msd2.z","msd1.x1","msd1.v1"] | ||
iterate: [{set: "msd2.G"} | ||
|
||
{step: msd3 } | ||
|
||
{set: "msd3.z"} | ||
|
||
{get-tentative: "msd3.G"} | ||
|
||
{set: "msd1.fk"} | ||
|
||
{step: msd1 } | ||
|
||
{get-tentative: "msd1.v1"} | ||
|
||
{get-tentative: "msd1.x1"} | ||
|
||
{set: "msd2.v1"} | ||
|
||
{step: msd2 } | ||
|
||
{set: "msd2.x1"} | ||
|
||
{get-tentative: "msd2.fk"} | ||
|
||
{get-tentative: "msd2.z"} | ||
] | ||
if-retry-needed: [{restore-state: msd3} | ||
|
||
{restore-state: msd2} | ||
|
||
{restore-state: msd1} | ||
]} | ||
} | ||
] | ||
if-retry-needed: [{restore-state: msd2} | ||
|
||
{restore-state: msd1} | ||
|
||
{restore-state: msd3} | ||
]} | ||
} | ||
] | ||
initialization = [ | ||
{get: "msd2.z"} | ||
{set: "msd3.z"} | ||
{get: "msd3.G"} | ||
{set: "msd2.G"} | ||
{get: "msd1.v1"} | ||
{set: "msd2.v1"} | ||
{get: "msd1.x1"} | ||
{set: "msd2.x1"} | ||
{get: "msd2.fk"} | ||
{set: "msd1.fk"} | ||
] | ||
cosim-step = | ||
{ | ||
conf1 = | ||
[ | ||
{save-state: msd2} | ||
{save-state: msd1} | ||
{save-state: msd3} | ||
{ | ||
loop: { | ||
until-step-accept: [msd2,msd1,msd3] | ||
iterate: [ | ||
{ | ||
loop: { | ||
until-converged: ["msd3.G","msd2.fk","msd2.z","msd1.x1","msd1.v1"] | ||
iterate: [ | ||
{step: msd3 } | ||
{set: "msd2.G"} | ||
{set: "msd1.fk"} | ||
{step: msd1 } | ||
{get-tentative: "msd1.v1"} | ||
{set: "msd2.v1"} | ||
{step: msd2 } | ||
{get-tentative: "msd1.x1"} | ||
{set-tentative: "msd2.x1"} | ||
{get-tentative: "msd2.fk"} | ||
{get-tentative: "msd2.z"} | ||
{set-tentative: "msd3.z"} | ||
{get-tentative: "msd3.G"} | ||
] | ||
if-retry-needed: | ||
[ | ||
{restore-state: msd3}, | ||
{restore-state: msd2}, | ||
{restore-state: msd1} | ||
] | ||
} | ||
} | ||
] | ||
if-retry-needed: | ||
[ | ||
{restore-state: msd2}, | ||
{restore-state: msd1}, | ||
{restore-state: msd3} | ||
] | ||
} | ||
} | ||
] | ||
} |
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
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
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
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
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
Oops, something went wrong.