From 99201896b98aa06c2995466c92cec07b1dfa4806 Mon Sep 17 00:00:00 2001 From: Simon Thrane Date: Wed, 13 Dec 2023 09:29:25 +0100 Subject: [PATCH] Updated test file --- .../generate_from_scenario/expectedResult.txt | 212 +++++++++--------- 1 file changed, 102 insertions(+), 110 deletions(-) diff --git a/external_tester/scenario_controller_resources/generate_from_scenario/expectedResult.txt b/external_tester/scenario_controller_resources/generate_from_scenario/expectedResult.txt index 7b4c6fdd2..58be9bff1 100644 --- a/external_tester/scenario_controller_resources/generate_from_scenario/expectedResult.txt +++ b/external_tester/scenario_controller_resources/generate_from_scenario/expectedResult.txt @@ -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} + ] + } + } + ] } \ No newline at end of file