Skip to content

Commit

Permalink
update OMSimulator (#11976)
Browse files Browse the repository at this point in the history
  • Loading branch information
arun3688 committed Feb 10, 2024
1 parent a343016 commit 4a7b1ae
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 21 deletions.
Expand Up @@ -14,12 +14,12 @@ readFile("Pendulum_systemCall.log");
// "Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum.fmu"
// ""
// 0
// "info: maximum step size for 'model.root': 0.001000
// "info: maximum step size for 'model.root': 0.010000
// info: Result file: model_res.mat (bufferSize=10)
// info: Parameter model.root.fmu.world.label1 will not be stored in the result file, because the signal type is not supported
// info: Parameter model.root.fmu.world.label2 will not be stored in the result file, because the signal type is not supported
// info: Final Statistics for 'model.root':
// NumSteps = 1004 NumRhsEvals = 1009 NumLinSolvSetups = 55
// NumNonlinSolvIters = 1008 NumNonlinSolvConvFails = 0 NumErrTestFails = 1
// NumSteps = 523 NumRhsEvals = 533 NumLinSolvSetups = 36
// NumNonlinSolvIters = 532 NumNonlinSolvConvFails = 0 NumErrTestFails = 1
// "
// endResult
6 changes: 3 additions & 3 deletions testsuite/omsimulator/cmakeFMU.mos
Expand Up @@ -18,10 +18,10 @@ readFile("DualMassOscillator_System1_systemCall.log");
// "DualMassOscillator.System1.fmu"
// ""
// 0
// "info: maximum step size for 'model.root': 0.001000
// "info: maximum step size for 'model.root': 0.002000
// info: Result file: model_res.mat (bufferSize=10)
// info: Final Statistics for 'model.root':
// NumSteps = 1001 NumRhsEvals = 1002 NumLinSolvSetups = 51
// NumNonlinSolvIters = 1001 NumNonlinSolvConvFails = 0 NumErrTestFails = 0
// NumSteps = 501 NumRhsEvals = 502 NumLinSolvSetups = 26
// NumNonlinSolvIters = 501 NumNonlinSolvConvFails = 0 NumErrTestFails = 0
// "
// endResult
Expand Up @@ -161,8 +161,8 @@ val(v, 1.0, "BouncingBallFMI20_res.mat"); getErrorString();
// ""
// 0.0
// ""
// 0.2323155070000016
// 0.23877146800000526
// ""
// -2.255319000000001
// -2.238641999999977
// ""
// endResult
Expand Up @@ -26,7 +26,7 @@ system("unzip -cqq stiffProblem.fmu resources/stiffProblem_flags.json > stiffPro
readFile("stiffProblem_flags_dynamic.json"); getErrorString();

// Simulate with OMSimulator
system(getInstallationDirectoryPath() + "/bin/OMSimulator stiffProblem.fmu --mode=cs --tolerance=1e-6 --stopTime=250.0 --resultFile=\"stiffProblem_Dynamic_res.mat\" --suppressPath=true --tempDir=\"stiffProblem-dynamic-tmp\"", "stiffProblem_cs_systemCall.log"); getErrorString();
system(getInstallationDirectoryPath() + "/bin/OMSimulator stiffProblem.fmu --mode=cs --tolerance=1e-6 --stopTime=250.0 --stepSize=0.01 --resultFile=\"stiffProblem_Dynamic_res.mat\" --suppressPath=true --tempDir=\"stiffProblem-dynamic-tmp\"", "stiffProblem_cs_systemCall.log"); getErrorString();
readFile("stiffProblem_cs_systemCall.log"); getErrorString();

// Check results
Expand Down
6 changes: 3 additions & 3 deletions testsuite/openmodelica/omsi/omsic/problem2.mos
Expand Up @@ -61,11 +61,11 @@ compareSimulationResults("problem2_OMS_res.mat",
// ""
// 0
// ""
// "info: maximum step size for 'model.root': 0.001000
// "info: maximum step size for 'model.root': 0.002000
// info: Result file: problem2_OMS_res.mat (bufferSize=1)
// info: Final Statistics for 'model.root':
// NumSteps = 1004 NumRhsEvals = 1009 NumLinSolvSetups = 54
// NumNonlinSolvIters = 1008 NumNonlinSolvConvFails = 0 NumErrTestFails = 1
// NumSteps = 505 NumRhsEvals = 510 NumLinSolvSetups = 30
// NumNonlinSolvIters = 509 NumNonlinSolvConvFails = 0 NumErrTestFails = 1
// "
// {"Files Equal!"}
// endResult
6 changes: 3 additions & 3 deletions testsuite/openmodelica/omsi/omsic/simpleLoop.mos
Expand Up @@ -59,11 +59,11 @@ compareSimulationResults("simpleLoop_OMS_res.mat",
// ""
// 0
// ""
// "info: maximum step size for 'model.root': 0.001000
// "info: maximum step size for 'model.root': 0.002000
// info: Result file: simpleLoop_OMS_res.mat (bufferSize=1)
// info: Final Statistics for 'model.root':
// NumSteps = 1017 NumRhsEvals = 1054 NumLinSolvSetups = 71
// NumNonlinSolvIters = 1053 NumNonlinSolvConvFails = 0 NumErrTestFails = 10
// NumSteps = 527 NumRhsEvals = 586 NumLinSolvSetups = 57
// NumNonlinSolvIters = 585 NumNonlinSolvConvFails = 0 NumErrTestFails = 16
// "
// {"Files Equal!"}
// endResult
10 changes: 5 additions & 5 deletions testsuite/openmodelica/omsi/omsic/simulateSimpleOMSU.mos
Expand Up @@ -34,12 +34,12 @@ val(der(x), {0.0,1.0}, "helloWorldOMSU_res.mat");
// "
// 0
// ""
// "info: maximum step size for 'model.root': 0.001000
// "info: maximum step size for 'model.root': 0.002000
// info: Result file: helloWorldOMSU_res.mat (bufferSize=1)
// info: Final Statistics for 'model.root':
// NumSteps = 1001 NumRhsEvals = 1002 NumLinSolvSetups = 51
// NumNonlinSolvIters = 1001 NumNonlinSolvConvFails = 0 NumErrTestFails = 0
// NumSteps = 505 NumRhsEvals = 510 NumLinSolvSetups = 30
// NumNonlinSolvIters = 509 NumNonlinSolvConvFails = 0 NumErrTestFails = 1
// "
// {1.0,7.403868772384289}
// {2.0,14.80773754476858}
// {1.0,7.389140833856468}
// {2.0,14.778281667712935}
// endResult

0 comments on commit 4a7b1ae

Please sign in to comment.