Skip to content

Commit

Permalink
Update tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
perost authored and OpenModelica-Hudson committed Sep 17, 2018
1 parent 66e7ec8 commit 629c139
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion openmodelica/cruntime/optimization/basic/CC.mos
Expand Up @@ -18,7 +18,7 @@ end CheckConstraintViolation;
getErrorString();

echo(false);
res := optimize(CheckConstraintViolation,numberOfIntervalls=200, tolerance = 1e-12, simflags="-lv LOG_IPOPT -ipopt_max_iter 2");
res := optimize(CheckConstraintViolation,numberOfIntervals=200, tolerance = 1e-12, simflags="-lv LOG_IPOPT -ipopt_max_iter 2");
messages:=res.messages;

echo(true);
Expand Down
4 changes: 2 additions & 2 deletions openmodelica/cruntime/sensitivities/testVanDerPol.mos
Expand Up @@ -14,7 +14,7 @@ end VanDerPol;
getErrorString();

setCommandLineOptions("+calculateSensitivities");
simulate(VanDerPol, stopTime=20, numberOfintervals=2000, simflags="-s ida -idaSensitivity");
simulate(VanDerPol, stopTime=20, numberOfIntervals=2000, simflags="-s ida -idaSensitivity");
getErrorString();


Expand All @@ -24,7 +24,7 @@ getErrorString();
// true
// record SimulationResult
// resultFile = "VanDerPol_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 20.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'VanDerPol', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-s ida -idaSensitivity'",
// simulationOptions = "startTime = 0.0, stopTime = 20.0, numberOfIntervals = 2000, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'VanDerPol', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-s ida -idaSensitivity'",
// messages = "LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
// LOG_SUCCESS | info | The simulation finished successfully.
// "
Expand Down
Expand Up @@ -13,7 +13,7 @@ loadFile("PlanarMechanicsForTesting.mo"); getErrorString();
setMatchingAlgorithm("PFPlus");
setIndexReductionMethod("dynamicStateSelection");
// adrpo: stopTime=3 is got from the experiment annotation in the model
simulate(PlanarMechanicsForTesting.Examples.PistonEngine_DynamicStateSelection,stopTime=0.000001,steps=2); getErrorString();
simulate(PlanarMechanicsForTesting.Examples.PistonEngine_DynamicStateSelection,stopTime=0.000001,numberOfIntervals=2); getErrorString();

res := OpenModelica.Scripting.compareSimulationResults("PlanarMechanicsForTesting.Examples.PistonEngine_DynamicStateSelection_res.mat",
getEnvironmentVar("REFERENCEFILES")+"/PlanarMechanics//PistonEngine.mat","PlanarMechanicsForTesting.Examples.PistonEngine_DynamicStateSelection_diff.csv",0.01,0.001,
Expand All @@ -28,7 +28,7 @@ res := OpenModelica.Scripting.compareSimulationResults("PlanarMechanicsForTestin
// true
// record SimulationResult
// resultFile = "PlanarMechanicsForTesting.Examples.PistonEngine_DynamicStateSelection_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1e-06, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'PlanarMechanicsForTesting.Examples.PistonEngine_DynamicStateSelection', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// simulationOptions = "startTime = 0.0, stopTime = 1e-06, numberOfIntervals = 2, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'PlanarMechanicsForTesting.Examples.PistonEngine_DynamicStateSelection', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = "LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
// LOG_SUCCESS | info | The simulation finished successfully.
// "
Expand Down
4 changes: 2 additions & 2 deletions simulation/modelica/arrays/PolynomialEvaluatorA.mos
Expand Up @@ -6,7 +6,7 @@
// Drmodelica: 8.2 Polynomial Evaluator (p. 242)
//
loadFile("PolynomialEvaluatorA.mo");
simulate(PolyEvaluate1,startTime=0.0, stopTime=10.0, numberOfIntervalls = 100, tolerance=1e-5); // 2 intervals == 3 values
simulate(PolyEvaluate1,startTime=0.0, stopTime=10.0, numberOfIntervals = 100, tolerance=1e-5); // 2 intervals == 3 values
echo(false); // turns of output
p1:=val(p,3.0);
p2:=val(p,5.0);
Expand All @@ -27,7 +27,7 @@ p3/1000.0;
// true
// record SimulationResult
// resultFile = "PolyEvaluate1_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 10.0, numberOfIntervals = 500, tolerance = 1e-05, method = 'dassl', fileNamePrefix = 'PolyEvaluate1', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// simulationOptions = "startTime = 0.0, stopTime = 10.0, numberOfIntervals = 100, tolerance = 1e-05, method = 'dassl', fileNamePrefix = 'PolyEvaluate1', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = "LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
// LOG_SUCCESS | info | The simulation finished successfully.
// "
Expand Down
4 changes: 2 additions & 2 deletions simulation/modelica/arrays/PolynomialEvaluatorB.mos
Expand Up @@ -6,7 +6,7 @@
// Drmodelica: 8.2 Polynomial Evaluator (p. 242)
//
loadFile("PolynomialEvaluatorB.mo");
simulate(PolyEvaluate2,startTime=0.0, stopTime=10.0, numberOfIntervalls = 100, tolerance=1e-5); // 2 intervals == 3 values
simulate(PolyEvaluate2,startTime=0.0, stopTime=10.0, numberOfIntervals = 100, tolerance=1e-5); // 2 intervals == 3 values
echo(false); // turns of output
p1:=val(p,3.0);
p2:=val(p,5.0);
Expand All @@ -27,7 +27,7 @@ p3/1000.0;
// true
// record SimulationResult
// resultFile = "PolyEvaluate2_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 10.0, numberOfIntervals = 500, tolerance = 1e-05, method = 'dassl', fileNamePrefix = 'PolyEvaluate2', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// simulationOptions = "startTime = 0.0, stopTime = 10.0, numberOfIntervals = 100, tolerance = 1e-05, method = 'dassl', fileNamePrefix = 'PolyEvaluate2', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = "LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
// LOG_SUCCESS | info | The simulation finished successfully.
// "
Expand Down
2 changes: 1 addition & 1 deletion simulation/modelica/functions_eval/Inverter2.mos
Expand Up @@ -6,7 +6,7 @@

loadModel(Modelica,{"3.2.1"}); getErrorString();
loadFile("Inverter2.mo"); getErrorString();
simulate(Inverter2, stopTime=1e-11,numberOfIntervalls=2000);getErrorString();
simulate(Inverter2, stopTime=1e-11,numberOfIntervals=2000);getErrorString();
res := OpenModelica.Scripting.compareSimulationResults("Inverter2_res.mat",
"ReferenceFiles/Inverter2.mat",
"Inverter2_diff.csv", 0.01, 0.0001,
Expand Down
2 changes: 1 addition & 1 deletion simulation/modelica/nonlinear_system/problem8_newton.mos
Expand Up @@ -3,7 +3,7 @@
// teardown_command: rm -f nonlinear_system.problem8* _nonlinear_system.problem8* output.log

loadFile("nlsTestPackage.mo"); getErrorString();
simulate(nonlinear_system.problem8, stopTime=100, solver="dassl", simflags="-nls=newton", tolerance=0.5e-7); getErrorString();
simulate(nonlinear_system.problem8, stopTime=100, method="dassl", simflags="-nls=newton", tolerance=0.5e-7); getErrorString();

val(a,{0.0,1.0,10.0,100.0});

Expand Down
4 changes: 2 additions & 2 deletions simulation/modelica/others/sample1.mos
Expand Up @@ -21,7 +21,7 @@ package sampleTests
end sampleTests;
"); getErrorString();

simulate(sampleTests.sample1, startTime=0.0, stopTime=10.0, step=0.2); getErrorString();
simulate(sampleTests.sample1, startTime=0.0, stopTime=10.0, numberOfIntervals=5); getErrorString();
val(storage, 0.1);
val(storage, 1.1);
val(storage, 3.1);
Expand All @@ -34,7 +34,7 @@ val(storage, 9.1);
// ""
// record SimulationResult
// resultFile = "sampleTests.sample1_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 10.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'sampleTests.sample1', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// simulationOptions = "startTime = 0.0, stopTime = 10.0, numberOfIntervals = 5, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'sampleTests.sample1', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = "LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
// LOG_SUCCESS | info | The simulation finished successfully.
// "
Expand Down

0 comments on commit 629c139

Please sign in to comment.