Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vruge authored and OpenModelica-Hudson committed Apr 7, 2018
1 parent b29ad13 commit 6b0b108
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 51 deletions.
38 changes: 19 additions & 19 deletions openmodelica/cruntime/optimization/basic/testAlgLoop5.mos
@@ -1,7 +1,7 @@
// name: testAlgLoop5
// status: correct

setCommandLineOptions("+gDynOpt --tearingStrictness=casual +loop2con=all --postOptModules-=wrapFunctionCalls"); //wrapFunctionCalls is deactivated, Ticket: 3710
setCommandLineOptions("+gDynOpt --tearingStrictness=casual +loop2con=all");
//setCommandLineOptions("+gDynOpt");
getErrorString();

Expand Down Expand Up @@ -93,23 +93,23 @@ getErrorString();
// LOG_IPOPT_ERROR | info | max violation is 0.265803 for the final constraint $finalCon$fcon(time = 50)
// LOG_IPOPT_ERROR | info | max violation is 0.257776 for the final constraint $finalCon$fcon(time = 50)
// LOG_IPOPT_ERROR | info | max violation is 0.219093 for the final constraint $finalCon$fcon(time = 50)
// LOG_IPOPT_ERROR | info | max violation is 0.0393324 for the final constraint $finalCon$fcon(time = 50)
// LOG_IPOPT_ERROR | info | max violation is 0.00971726 for the constraint $EqCon$t2(time = 48.8)
// LOG_IPOPT_ERROR | info | max violation is 0.0393325 for the final constraint $finalCon$fcon(time = 50)
// LOG_IPOPT_ERROR | info | max violation is 0.00971725 for the constraint $EqCon$t2(time = 48.8)
// LOG_IPOPT_ERROR | info | max violation is 0.00522208 for the constraint $EqCon$t2(time = 48.8)
// LOG_IPOPT_ERROR | info | max violation is 0.0008537 for the constraint $EqCon$t2(time = 0.8)
// LOG_IPOPT_ERROR | info | max violation is 0.000581587 for the constraint $EqCon$t2(time = 48.8)
// LOG_IPOPT_ERROR | info | max violation is 0.00030624 for the constraint $EqCon$t2(time = 48.8)
// LOG_IPOPT_ERROR | info | max violation is 0.000611677 for the constraint $EqCon$t2(time = 48.8)
// LOG_IPOPT_ERROR | info | max violation is 0.00027864 for the constraint $EqCon$t2(time = 48.8)
// LOG_IPOPT_ERROR | info | max violation is 0.00121425 for the constraint $EqCon$t2(time = 48.8)
// LOG_IPOPT_ERROR | info | max violation is 0.00112002 for the constraint $EqCon$t2(time = 48.4)
// LOG_IPOPT_ERROR | info | max violation is 0.000855813 for the constraint $EqCon$t2(time = 48.2)
// LOG_IPOPT_ERROR | info | max violation is 2.22306e-05 for the constraint $EqCon$t2(time = 48.4)
// LOG_IPOPT_ERROR | info | max violation is 2.18283e-05 for the constraint $EqCon$t2(time = 48.8)
// LOG_IPOPT_ERROR | info | max violation is 1.04517e-05 for the constraint $EqCon$t2(time = 48.8)
// LOG_IPOPT_ERROR | info | max violation is 1.29938e-06 for the constraint $EqCon$t2(time = 4.4)
// LOG_IPOPT_ERROR | info | max violation is 2.02641e-07 for the constraint $EqCon$t2(time = 4.4)
// LOG_IPOPT_ERROR | info | max violation is 3.68416e-08 for the constraint $EqCon$t2(time = 4.4)
// LOG_IPOPT_ERROR | info | max violation is 0.000853699 for the constraint $EqCon$t2(time = 0.8)
// LOG_IPOPT_ERROR | info | max violation is 0.000581593 for the constraint $EqCon$t2(time = 48.8)
// LOG_IPOPT_ERROR | info | max violation is 0.000306243 for the constraint $EqCon$t2(time = 48.8)
// LOG_IPOPT_ERROR | info | max violation is 0.000611698 for the constraint $EqCon$t2(time = 48.8)
// LOG_IPOPT_ERROR | info | max violation is 0.00027865 for the constraint $EqCon$t2(time = 48.8)
// LOG_IPOPT_ERROR | info | max violation is 0.00121418 for the constraint $EqCon$t2(time = 48.8)
// LOG_IPOPT_ERROR | info | max violation is 0.00112003 for the constraint $EqCon$t2(time = 48.4)
// LOG_IPOPT_ERROR | info | max violation is 0.000855849 for the constraint $EqCon$t2(time = 48.2)
// LOG_IPOPT_ERROR | info | max violation is 2.22346e-05 for the constraint $EqCon$t2(time = 48.4)
// LOG_IPOPT_ERROR | info | max violation is 2.1828e-05 for the constraint $EqCon$t2(time = 48.8)
// LOG_IPOPT_ERROR | info | max violation is 1.04516e-05 for the constraint $EqCon$t2(time = 48.8)
// LOG_IPOPT_ERROR | info | max violation is 1.29939e-06 for the constraint $EqCon$t2(time = 4.4)
// LOG_IPOPT_ERROR | info | max violation is 2.02642e-07 for the constraint $EqCon$t2(time = 4.4)
// LOG_IPOPT_ERROR | info | max violation is 3.68417e-08 for the constraint $EqCon$t2(time = 4.4)
// LOG_IPOPT_ERROR | info | max violation is 1.99957e-08 for the constraint $con$conDer(time = 47.4)
// LOG_IPOPT_ERROR | info | max violation is 1.99957e-08 for the constraint $con$conDer(time = 47.4)
// LOG_IPOPT_ERROR | info | max violation is 1.99957e-08 for the constraint $con$conDer(time = 47.4)
Expand All @@ -120,8 +120,8 @@ getErrorString();
// t2:VARIABLE(min = -2.0 max = 0.5 start = 1.0 ) type: Real
// t1:VARIABLE(min = -0.4 start = 1.0 ) type: Real
// Notification: Following iteration variables are selected by the user for strong component 2 (DAE kind: simulation):
// t1:VARIABLE(min = -0.4 start = 1.0 ) type: Real
// t2:VARIABLE(min = -2.0 max = 0.5 start = 1.0 ) type: Real
// t2:VARIABLE(min = -2.0 max = 0.5 start = 1.0 ) type: Real
// t1:VARIABLE(min = -0.4 start = 1.0 ) type: Real
// "
// {"Files Equal!"}
// "Warning: 'compareSimulationResults' is deprecated. It is recommended to use 'diffSimulationResults' instead.
Expand Down
18 changes: 9 additions & 9 deletions openmodelica/cruntime/optimization/basic/testAlgLoop6.mos
@@ -1,7 +1,7 @@
// name: testAlgLoop6
// status: correct

setCommandLineOptions("+gDynOpt --tearingStrictness=casual +loop2con=all --postOptModules-=wrapFunctionCalls"); //wrapFunctionCalls is deactivated, Ticket: 3710
setCommandLineOptions("+gDynOpt --tearingStrictness=casual +loop2con=all");
//setCommandLineOptions("+gDynOpt");
getErrorString();

Expand Down Expand Up @@ -393,27 +393,27 @@ getErrorString();
// LOG_IPOPT_ERROR | info | max violation is 0.0286712 for the constraint $EqCon$x2(time = 0.214286)
// LOG_IPOPT_ERROR | info | max violation is 0.00619124 for the constraint $EqCon$x2(time = 0.214286)
// LOG_IPOPT_ERROR | info | max violation is 0.0462015 for the constraint $EqCon$x2(time = 0.214286)
// LOG_IPOPT_ERROR | info | max violation is 0.00191801 for the constraint $EqCon$x2(time = 0.214286)
// LOG_IPOPT_ERROR | info | max violation is 0.00191802 for the constraint $EqCon$x2(time = 0.214286)
// LOG_IPOPT_ERROR | info | max violation is 0.00731684 for the constraint $EqCon$x2(time = 3.07143)
// LOG_IPOPT_ERROR | info | max violation is 0.00190648 for the constraint $EqCon$x2(time = 3.07143)
// LOG_IPOPT_ERROR | info | max violation is 0.0204588 for the constraint $EqCon$x2(time = 0.142857)
// LOG_IPOPT_ERROR | info | max violation is 0.00324755 for the constraint $EqCon$x2(time = 0.142857)
// LOG_IPOPT_ERROR | info | max violation is 0.0204587 for the constraint $EqCon$x2(time = 0.142857)
// LOG_IPOPT_ERROR | info | max violation is 0.00324754 for the constraint $EqCon$x2(time = 0.142857)
// LOG_IPOPT_ERROR | info | max violation is 0.060957 for the constraint $EqCon$x2(time = 0.142857)
// LOG_IPOPT_ERROR | info | max violation is 0.0581662 for the constraint $EqCon$x2(time = 0.142857)
// LOG_IPOPT_ERROR | info | max violation is 9.21575e-05 for the constraint $EqCon$x2(time = 0.0714286)
// LOG_IPOPT_ERROR | info | max violation is 9.21574e-05 for the constraint $EqCon$x2(time = 0.0714286)
// LOG_IPOPT_ERROR | info | max violation is 0.0153965 for the constraint $EqCon$x2(time = 0.0714286)
// LOG_IPOPT_ERROR | info | max violation is 0.00433548 for the constraint $EqCon$x2(time = 0.0714286)
// LOG_IPOPT_ERROR | info | max violation is 0.199116 for the constraint $EqCon$x2(time = 0.0714286)
// LOG_IPOPT_ERROR | info | max violation is 0.0583938 for the constraint $EqCon$x2(time = 0.0714286)
// LOG_IPOPT_ERROR | info | max violation is 0.0950214 for the constraint $EqCon$x2(time = 0.0714286)
// LOG_IPOPT_ERROR | info | max violation is 0.0950215 for the constraint $EqCon$x2(time = 0.0714286)
// LOG_IPOPT_ERROR | info | max violation is 1.29268e-05 for the constraint $EqCon$x2(time = 0.0714286)
// LOG_IPOPT_ERROR | info | max violation is 0.000431219 for the constraint $EqCon$x2(time = 3.14286)
// LOG_IPOPT_ERROR | info | max violation is 0.000509342 for the constraint $EqCon$x2(time = 3.14286)
// LOG_IPOPT_ERROR | info | max violation is 1.208e-06 for the constraint $EqCon$x2(time = 3.14286)
// LOG_IPOPT_ERROR | info | max violation is 1.93971e-08 for the constraint $EqCon$x2(time = 3.14286)
// LOG_IPOPT_ERROR | info | max violation is 5.31349e-11 for the constraint $EqCon$x2(time = 3.14286)
// LOG_IPOPT_ERROR | info | max violation is 1.06026e-12 for the constraint $EqCon$x2(time = 1.71429)
// LOG_IPOPT_ERROR | info | max violation is 2.22045e-16 for the constraint $EqCon$x2(time = 0.642857)
// LOG_IPOPT_ERROR | info | max violation is 5.31347e-11 for the constraint $EqCon$x2(time = 3.14286)
// LOG_IPOPT_ERROR | info | max violation is 1.06015e-12 for the constraint $EqCon$x2(time = 1.71429)
// LOG_IPOPT_ERROR | info | max violation is 2.22045e-16 for the constraint $EqCon$x2(time = 0.5)
// LOG_SUCCESS | info | The simulation finished successfully.
// "
// end SimulationResult;
Expand Down
13 changes: 6 additions & 7 deletions openmodelica/cruntime/optimization/benchmark/runDrumBoiler.mos
Expand Up @@ -5,8 +5,6 @@
loadModel(Modelica,{"3.2"});
getErrorString();

setCommandLineOptions("+demoMode --postOptModules-=wrapFunctionCalls");
getErrorString();
loadFile("DrumBoiler.mo");
getErrorString();

Expand All @@ -31,8 +29,6 @@ getErrorString();
// ""
// true
// ""
// true
// ""
// record SimulationResult
// resultFile = "drumBoiler.optDrumBoiler_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 3600.0, numberOfIntervals = 50, tolerance = 0.0001, method = 'dassl', fileNamePrefix = 'drumBoiler.optDrumBoiler', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv=LOG_IPOPT_ERROR -optimizerNP 1 -s optimization'",
Expand Down Expand Up @@ -74,12 +70,15 @@ getErrorString();
// LOG_IPOPT_ERROR | info | max violation is 1.48405e-06 for the constraint $con$conSigma_con(time = 216)
// LOG_IPOPT_ERROR | info | max violation is 1.49979e-06 for the constraint $con$conSigma_con(time = 216)
// LOG_IPOPT_ERROR | info | max violation is 1.49983e-06 for the constraint $con$conSigma_con(time = 216)
// LOG_IPOPT_ERROR | info | max violation is 1.5e-06 for the constraint $con$conSigma_con(time = 576)
// LOG_IPOPT_ERROR | info | max violation is 1.5e-06 for the constraint $con$conSigma_con(time = 360)
// LOG_IPOPT_ERROR | info | max violation is 1.5e-06 for the constraint $con$conSigma_con(time = 216)
// LOG_SUCCESS | info | The simulation finished successfully.
// "
// end SimulationResult;
// ""
// "Warning: The model contains alias variables with conflicting start and/or nominal values. It is recommended to resolve the conflicts, because otherwise the system could be hard to solve. To print the conflicting alias sets and the chosen candidates please use -d=aliasConflicts.
// Warning: There are iteration variables with default zero start attribute. For more information set -d=initialization. In OMEdit Tools->Options->Simulation->OMCFlags, in OMNotebook call setCommandLineOptions("-d=initialization").
// "
// {"Files Equal!"}
// ""
// "Warning: 'compareSimulationResults' is deprecated. It is recommended to use 'diffSimulationResults' instead.
// "
// endResult
Expand Up @@ -10,7 +10,7 @@ getErrorString();

res :=simulate(drumBoiler.optDrumBoiler, stopTime=3600, fileNamePrefix = "init");

setCommandLineOptions("+gDynOpt +d=reduceDynOpt +loop2con=noLin +demoMode --postOptModules-=wrapFunctionCalls");
setCommandLineOptions("+d=reduceDynOpt +loop2con=noLin");
getErrorString();

res :=optimize(drumBoiler.optDrumBoiler, stopTime=3600, numberOfIntervals=50, tolerance=1e-4, simflags="-lv=LOG_IPOPT_ERROR -optimizerNP 1 -s optimization -iif init_res.mat -ipopt_init FILE -ipopt_max_iter=100");
Expand Down Expand Up @@ -46,7 +46,7 @@ getErrorString();
// "
// record SimulationResult
// resultFile = "drumBoiler.optDrumBoiler_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 3600.0, numberOfIntervals = 50, tolerance = 0.0001, method = 'optimization', fileNamePrefix = 'drumBoiler.optDrumBoiler', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv=LOG_IPOPT_ERROR -optimizerNP 1 -s optimization -iif init_res.mat -ipopt_init FILE -ipopt_max_iter=100'",
// simulationOptions = "startTime = 0.0, stopTime = 3600.0, numberOfIntervals = 50, tolerance = 0.0001, method = 'dassl', fileNamePrefix = 'drumBoiler.optDrumBoiler', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv=LOG_IPOPT_ERROR -optimizerNP 1 -s optimization -iif init_res.mat -ipopt_init FILE -ipopt_max_iter=100'",
// messages = "LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
//
// Optimizer Variables
Expand Down Expand Up @@ -92,18 +92,22 @@ getErrorString();
// LOG_IPOPT_ERROR | info | max violation is 61.2224 for the constraint $EqCon$der_evaporator_p(time = 1296)
// LOG_IPOPT_ERROR | info | max violation is 15.3174 for the constraint $EqCon$der_evaporator_p(time = 1296)
// LOG_IPOPT_ERROR | info | max violation is 3.83252 for the constraint $EqCon$der_evaporator_p(time = 1296)
// LOG_IPOPT_ERROR | info | max violation is 0.958954 for the constraint $EqCon$der_evaporator_p(time = 1296)
// LOG_IPOPT_ERROR | info | max violation is 0.240156 for the constraint $EqCon$der_evaporator_p(time = 1296)
// LOG_IPOPT_ERROR | info | max violation is 0.0600257 for the constraint $EqCon$der_evaporator_p(time = 1296)
// LOG_IPOPT_ERROR | info | max violation is 0.0149923 for the constraint $EqCon$der_evaporator_p(time = 1296)
// LOG_IPOPT_ERROR | info | max violation is 0.00373544 for the constraint $EqCon$der_evaporator_p(time = 1296)
// LOG_IPOPT_ERROR | info | max violation is 0.000920187 for the constraint $EqCon$der_evaporator_p(time = 1296)
// LOG_IPOPT_ERROR | info | max violation is 0.000217739 for the constraint $EqCon$der_evaporator_p(time = 1296)
// LOG_IPOPT_ERROR | info | max violation is 4.55827e-05 for the constraint $EqCon$der_evaporator_p(time = 1296)
// LOG_IPOPT_ERROR | info | max violation is 0.958948 for the constraint $EqCon$der_evaporator_p(time = 1296)
// LOG_IPOPT_ERROR | info | max violation is 0.240159 for the constraint $EqCon$der_evaporator_p(time = 1296)
// LOG_IPOPT_ERROR | info | max violation is 0.0600249 for the constraint $EqCon$der_evaporator_p(time = 1296)
// LOG_IPOPT_ERROR | info | max violation is 0.0149953 for the constraint $EqCon$der_evaporator_p(time = 1296)
// LOG_IPOPT_ERROR | info | max violation is 0.00373369 for the constraint $EqCon$der_evaporator_p(time = 1296)
// LOG_IPOPT_ERROR | info | max violation is 0.000920456 for the constraint $EqCon$der_evaporator_p(time = 1296)
// LOG_IPOPT_ERROR | info | max violation is 0.000217702 for the constraint $EqCon$der_evaporator_p(time = 1296)
// LOG_IPOPT_ERROR | info | max violation is 4.55761e-05 for the constraint $EqCon$der_evaporator_p(time = 1296)
// LOG_SUCCESS | info | The simulation finished successfully.
// "
// end SimulationResult;
// ""
// "Warning: Deprecated debug flag -d=reduceDynOpt detected. Use --postOptModules+=reduceDynamicOptimization instead.
// Warning: The model contains alias variables with conflicting start and/or nominal values. It is recommended to resolve the conflicts, because otherwise the system could be hard to solve. To print the conflicting alias sets and the chosen candidates please use -d=aliasConflicts.
// Warning: There are iteration variables with default zero start attribute. For more information set -d=initialization. In OMEdit Tools->Options->Simulation->OMCFlags, in OMNotebook call setCommandLineOptions("-d=initialization").
// "
// {"Files Equal!"}
// ""
// "Warning: 'compareSimulationResults' is deprecated. It is recommended to use 'diffSimulationResults' instead.
// "
// endResult
Expand Up @@ -5,7 +5,8 @@
loadModel(Modelica,{"3.2"});
getErrorString();

setCommandLineOptions("+gDynOpt +d=reduceDynOpt +demoMode --postOptModules-=wrapFunctionCalls");
setCommandLineOptions("+d=reduceDynOpt");
getErrorString();


loadFile("DrumBoiler.mo");
Expand All @@ -21,11 +22,12 @@ getErrorString();
// true
// ""
// true
// ""
// true
// ""
// record SimulationResult
// resultFile = "drumBoiler.optDrumBoiler_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 3600.0, numberOfIntervals = 50, tolerance = 0.0001, method = 'optimization', fileNamePrefix = 'drumBoiler.optDrumBoiler', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv=LOG_IPOPT_ERROR -optimizerNP 1 -s optimization'",
// simulationOptions = "startTime = 0.0, stopTime = 3600.0, numberOfIntervals = 50, tolerance = 0.0001, method = 'dassl', fileNamePrefix = 'drumBoiler.optDrumBoiler', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv=LOG_IPOPT_ERROR -optimizerNP 1 -s optimization'",
// messages = "LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
//
// Optimizer Variables
Expand Down Expand Up @@ -69,7 +71,11 @@ getErrorString();
// LOG_SUCCESS | info | The simulation finished successfully.
// "
// end SimulationResult;
// ""
// "Warning: Deprecated debug flag -d=reduceDynOpt detected. Use --postOptModules+=reduceDynamicOptimization instead.
// Warning: The model contains alias variables with conflicting start and/or nominal values. It is recommended to resolve the conflicts, because otherwise the system could be hard to solve. To print the conflicting alias sets and the chosen candidates please use -d=aliasConflicts.
// Warning: There are iteration variables with default zero start attribute. For more information set -d=initialization. In OMEdit Tools->Options->Simulation->OMCFlags, in OMNotebook call setCommandLineOptions("-d=initialization").
// "
// {"Files Equal!"}
// ""
// "Warning: 'compareSimulationResults' is deprecated. It is recommended to use 'diffSimulationResults' instead.
// "
// endResult

0 comments on commit 6b0b108

Please sign in to comment.