diff --git a/external_tester/scenario_controller_resources/generate_from_multi_model/expectedMasterModel.txt b/external_tester/scenario_controller_resources/generate_from_multi_model/expectedMasterModel.txt index 7567b8ee..69ad529e 100644 --- a/external_tester/scenario_controller_resources/generate_from_multi_model/expectedMasterModel.txt +++ b/external_tester/scenario_controller_resources/generate_from_multi_model/expectedMasterModel.txt @@ -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} \ No newline at end of file +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 \ No newline at end of file diff --git a/external_tester/testutils.py b/external_tester/testutils.py index d0dcf6cf..6d53d247 100644 --- a/external_tester/testutils.py +++ b/external_tester/testutils.py @@ -71,20 +71,19 @@ def compareCSV(expected, actual): print(f"ERROR: {expected} doest not exist!") return False -def comparText(file1, file): +def comparText(file1, file2): expectedFile = open(file1, 'r') - actualFile = open(file, 'r') - + actualFile = open(file2, 'r') + remove = str.maketrans('', '', string.whitespace) expectedLines = expectedFile.readlines() actualLines = actualFile.readlines() - print("Expected lines:" + str(expectedLines)) - print("Actual lines:" + str(actualLines)) + expectedLines = "".join(expectedLines).translate(remove) + actualLines = "".join(actualLines).translate(remove) expectedFile.close() actualFile.close() - remove = string.whitespace - return expectedLines.translate(None, remove) == actualLines.translate(None, remove) + return expectedLines == actualLines def compare(strPrefix, expected, actual): if os.path.exists(expected): diff --git a/plugins/sigver/src/main/kotlin/org/intocps/maestro/plugin/MasterModelMapper.kt b/plugins/sigver/src/main/kotlin/org/intocps/maestro/plugin/MasterModelMapper.kt index 29c2f7f4..31d813db 100644 --- a/plugins/sigver/src/main/kotlin/org/intocps/maestro/plugin/MasterModelMapper.kt +++ b/plugins/sigver/src/main/kotlin/org/intocps/maestro/plugin/MasterModelMapper.kt @@ -156,9 +156,6 @@ class MasterModelMapper { maxPossibleStepSize ) - print("Hello from multiModelToMasterModel!") - print("Scenario model: ${scenarioModel.toConf(0)}") - // Generate the master model from the scenario return GenerationAPI.synthesizeAlgorithm("generatedFromMultiModel", scenarioModel) }