Skip to content

Commit

Permalink
Resolve conflict with result files (#1034)
Browse files Browse the repository at this point in the history
  • Loading branch information
lochel authored Jun 12, 2021
1 parent b64090d commit 5e43ab6
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions testsuite/OMSimulator/import_hierarchical_ssv_sources1.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
oms_setCommandLineOption("--suppressPath=true")
oms_setTempDirectory("./import_hierarchical_ssv_sources_01_lua/")

oms_importFile("../resources/import_hierarchical_ssv_sources.ssp");
model = oms_importFile("../resources/import_hierarchical_ssv_sources.ssp");
oms_setResultFile(model, "")

src = oms_exportSnapshot("import_hierarchical_ssv_sources")
src = oms_exportSnapshot(model)
print(src)

oms_instantiate("import_hierarchical_ssv_sources")
oms_instantiate(model)

print("info: Instantiation")
print("info: import_hierarchical_ssv_sources.root.System1.Input_1 : " .. oms_getReal("import_hierarchical_ssv_sources.root.System1.Input_1"))
Expand All @@ -24,7 +25,7 @@ print("info: import_hierarchical_ssv_sources.root.System2.parameter_1 : " .
print("info: import_hierarchical_ssv_sources.root.System3.Input_1 : " .. oms_getReal("import_hierarchical_ssv_sources.root.System3.Input_1"))
print("info: import_hierarchical_ssv_sources.root.System3.parameter_1 : " .. oms_getReal("import_hierarchical_ssv_sources.root.System3.parameter_1"))

oms_initialize("import_hierarchical_ssv_sources")
oms_initialize(model)
print("info: Initialization")
print("info: import_hierarchical_ssv_sources.root.System1.Input_1 : " .. oms_getReal("import_hierarchical_ssv_sources.root.System1.Input_1"))
print("info: import_hierarchical_ssv_sources.root.System1.parameter_1 : " .. oms_getReal("import_hierarchical_ssv_sources.root.System1.parameter_1"))
Expand All @@ -34,7 +35,7 @@ print("info: import_hierarchical_ssv_sources.root.System2.parameter_1 : " .
print("info: import_hierarchical_ssv_sources.root.System3.Input_1 : " .. oms_getReal("import_hierarchical_ssv_sources.root.System3.Input_1"))
print("info: import_hierarchical_ssv_sources.root.System3.parameter_1 : " .. oms_getReal("import_hierarchical_ssv_sources.root.System3.parameter_1"))

oms_simulate("import_hierarchical_ssv_sources")
oms_simulate(model)
print("info: Simulate")
print("info: import_hierarchical_ssv_sources.root.System1.Input_1 : " .. oms_getReal("import_hierarchical_ssv_sources.root.System1.Input_1"))
print("info: import_hierarchical_ssv_sources.root.System1.parameter_1 : " .. oms_getReal("import_hierarchical_ssv_sources.root.System1.parameter_1"))
Expand All @@ -44,8 +45,8 @@ print("info: import_hierarchical_ssv_sources.root.System2.parameter_1 : " .
print("info: import_hierarchical_ssv_sources.root.System3.Input_1 : " .. oms_getReal("import_hierarchical_ssv_sources.root.System3.Input_1"))
print("info: import_hierarchical_ssv_sources.root.System3.parameter_1 : " .. oms_getReal("import_hierarchical_ssv_sources.root.System3.parameter_1"))

oms_terminate("import_hierarchical_ssv_sources")
oms_delete("import_hierarchical_ssv_sources")
oms_terminate(model)
oms_delete(model)


-- Result:
Expand Down Expand Up @@ -219,9 +220,9 @@ oms_delete("import_hierarchical_ssv_sources")
-- type="org.openmodelica">
-- <oms:Annotations>
-- <oms:SimulationInformation
-- resultFile="import_hierarchical_ssv_sources_res.mat"
-- resultFile=""
-- loggingInterval="0.000000"
-- bufferSize="10"
-- bufferSize="1"
-- signalFilter="resources/signalFilter.xml" />
-- </oms:Annotations>
-- </ssc:Annotation>
Expand Down Expand Up @@ -348,7 +349,7 @@ oms_delete("import_hierarchical_ssv_sources")
-- info: import_hierarchical_ssv_sources.root.System2.parameter_1 : -40.0
-- info: import_hierarchical_ssv_sources.root.System3.Input_1 : -70.0
-- info: import_hierarchical_ssv_sources.root.System3.parameter_1 : -70.0
-- info: Result file: import_hierarchical_ssv_sources_res.mat (bufferSize=10)
-- info: No result file will be created
-- info: Initialization
-- info: import_hierarchical_ssv_sources.root.System1.Input_1 : -10.0
-- info: import_hierarchical_ssv_sources.root.System1.parameter_1 : -20.0
Expand Down

0 comments on commit 5e43ab6

Please sign in to comment.