Skip to content

Commit

Permalink
Add number of linear/non-linear/mixed systems to debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
lochel authored and OpenModelica-Hudson committed Apr 5, 2017
1 parent 7450f9a commit e3b3d75
Show file tree
Hide file tree
Showing 23 changed files with 58 additions and 12 deletions.
6 changes: 4 additions & 2 deletions openmodelica/cruntime/optimization/basic/TFC6.mos
Expand Up @@ -13,7 +13,7 @@ model testFinalCon6
Real y3(start = -1);
input Real u;
input Real u2;

Real final_con1(min = -15, max = -10) annotation(isFinalConstraint = true);
Real final_con2(min = 10, max = 15) annotation(isFinalConstraint = true);
Real final_con3(min = 0, max = 0) annotation(isFinalConstraint = true);
Expand Down Expand Up @@ -54,7 +54,9 @@ getErrorString();
// record SimulationResult
// resultFile = "testFinalCon6_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 5.0, numberOfIntervals = 50, tolerance = 1e-08, method = 'optimization', fileNamePrefix = 'testFinalCon6', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv LOG_IPOPT_ERROR,LOG_LS -optimizerNP 3'",
// messages = "LOG_LS | info | Start solving Linear System 9 (size 1) at time 0 with Lapack Solver
// messages = "LOG_LS | info | initialize linear system solvers
// | | | | | 1 linear systems
// LOG_LS | info | Start solving Linear System 9 (size 1) at time 0 with Lapack Solver
// LOG_LS | info | ### 0.000014 time to set Matrix A and vector b.
// LOG_LS | info | Solve System: 0.000047
//
Expand Down
2 changes: 2 additions & 0 deletions simulation/modelica/algorithms_functions/bug2888.mos
Expand Up @@ -49,7 +49,9 @@ simulate(bug_2888,simflags="-lv LOG_NLS"); getErrorString();
// resultFile = "bug_2888_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'bug_2888', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv LOG_NLS'",
// messages = "LOG_NLS | info | initialize mixed system solvers
// | | | | | 0 mixed systems
// LOG_NLS | info | initialize non-linear system solvers
// | | | | | 0 non-linear systems
// LOG_NLS | info | update static data of non-linear system solvers
// LOG_NLS | info | free mixed system solvers
// LOG_NLS | info | free non-linear system solvers
Expand Down
8 changes: 5 additions & 3 deletions simulation/modelica/linear_system/linSymSol.mos
Expand Up @@ -42,13 +42,13 @@ end foo;
");
getErrorString();

simulate(foo,simflags="-s euler");
simulate(foo,simflags="-s euler");
getErrorString();
val(res,0);
val(res,1);

setCommandLineOptions("+maxSizeSolveLinearSystem=10 --preOptModules-=comSubExp");
simulate(foo, simflags="-lv LOG_LS -s euler");
simulate(foo, simflags="-lv LOG_LS -s euler");
getErrorString();
val(res,0);
val(res,1);
Expand All @@ -68,7 +68,9 @@ val(res,1);
// record SimulationResult
// resultFile = "foo_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'foo', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv LOG_LS -s euler'",
// messages = "LOG_LS | info | Start solving Linear System 2 (size 4) at time 0 with Lapack Solver
// messages = "LOG_LS | info | initialize linear system solvers
// | | | | | 3 linear systems
// LOG_LS | info | Start solving Linear System 2 (size 4) at time 0 with Lapack Solver
// LOG_LS | info | ### 0.000027 time to set Matrix A and vector b.
// LOG_LS | info | Solve System: 0.000061
// LOG_LS | info | Start solving Linear System 14 (size 1) at time 0 with Lapack Solver
Expand Down
10 changes: 6 additions & 4 deletions simulation/modelica/linear_system/linSymSolConstA.mos
Expand Up @@ -14,7 +14,7 @@ val(max_res,1);

setCommandLineOptions("+maxSizeSolveLinearSystem=0");getErrorString();
setDebugFlags("disableStartCalc");getErrorString();
simulate(linear_system.problem4, simflags="-s euler", stopTime=10,numberOfIntervals = 5000);
simulate(linear_system.problem4, simflags="-s euler", stopTime=10,numberOfIntervals = 5000);
getErrorString();
val(max_res,0);
val(max_res,1);
Expand All @@ -29,14 +29,16 @@ val(max_res,1);
// record SimulationResult
// resultFile = "linear_system.problem4_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 10.0, numberOfIntervals = 5000, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'linear_system.problem4', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv LOG_LS -s euler'",
// messages = "LOG_LS | info | Start solving Linear System 42 (size 19) at time 0 with Lapack Solver
// messages = "LOG_LS | info | initialize linear system solvers
// | | | | | 1 linear systems
// LOG_LS | info | Start solving Linear System 42 (size 19) at time 0 with Lapack Solver
// LOG_LS | info | ### 0.000052 time to set Matrix A and vector b.
// LOG_LS | info | Solve System: 0.000080
// "
// end SimulationResult;
// ""
// 1.0
// 1.000000000000419
// 1.000000000000518
// true
// ""
// true
Expand All @@ -48,5 +50,5 @@ val(max_res,1);
// end SimulationResult;
// ""
// 1.0
// 1.000000000000229
// 1.00000000000027
// endResult
2 changes: 2 additions & 0 deletions simulation/modelica/nonlinear_system/bug_2841.mos
Expand Up @@ -29,7 +29,9 @@ simulate(nonlinearSolverTests.bug_2841, stopTime=0.0, simflags="-lv=LOG_INIT,LOG
// resultFile = "nonlinearSolverTests.bug_2841_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 0.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'nonlinearSolverTests.bug_2841', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv=LOG_INIT,LOG_NLS_V'",
// messages = "LOG_NLS | info | initialize mixed system solvers
// | | | | | 0 mixed systems
// LOG_NLS | info | initialize non-linear system solvers
// | | | | | 2 non-linear systems
// LOG_INIT | info | ### START INITIALIZATION ###
// LOG_INIT | info | updating min-values
// LOG_INIT | info | updating max-values
Expand Down
2 changes: 2 additions & 0 deletions simulation/modelica/others/TestExpressionSolve.mos
Expand Up @@ -476,7 +476,9 @@ val(v, {0, 0.1, 0.2, 0.5, 0.8, 0.9, 1.0});
// resultFile = "noNls_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'noNls', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv LOG_NLS -s euler'",
// messages = "LOG_NLS | info | initialize mixed system solvers
// | | | | | 0 mixed systems
// LOG_NLS | info | initialize non-linear system solvers
// | | | | | 0 non-linear systems
// LOG_NLS | info | update static data of non-linear system solvers
// LOG_NLS | info | free mixed system solvers
// LOG_NLS | info | free non-linear system solvers
Expand Down
2 changes: 2 additions & 0 deletions simulation/modelica/others/TestSolve.mos
Expand Up @@ -26,7 +26,9 @@ val(z,0.5);
// resultFile = "ModelTestSolve_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'ModelTestSolve', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv LOG_NLS_V'",
// messages = "LOG_NLS | info | initialize mixed system solvers
// | | | | | 0 mixed systems
// LOG_NLS | info | initialize non-linear system solvers
// | | | | | 0 non-linear systems
// LOG_NLS | info | update static data of non-linear system solvers
// LOG_NLS | info | free mixed system solvers
// LOG_NLS | info | free non-linear system solvers
Expand Down
2 changes: 2 additions & 0 deletions simulation/modelica/others/TestSolve10.mos
Expand Up @@ -31,7 +31,9 @@ val(w,0.5);
// resultFile = "ModelTestSolve10_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'ModelTestSolve10', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv LOG_NLS_V'",
// messages = "LOG_NLS | info | initialize mixed system solvers
// | | | | | 0 mixed systems
// LOG_NLS | info | initialize non-linear system solvers
// | | | | | 0 non-linear systems
// LOG_NLS | info | update static data of non-linear system solvers
// LOG_NLS | info | free mixed system solvers
// LOG_NLS | info | free non-linear system solvers
Expand Down
2 changes: 2 additions & 0 deletions simulation/modelica/others/TestSolve11.mos
Expand Up @@ -31,7 +31,9 @@ val(w,0.5);
// resultFile = "ModelTestSolve11_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'ModelTestSolve11', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv LOG_NLS_V'",
// messages = "LOG_NLS | info | initialize mixed system solvers
// | | | | | 0 mixed systems
// LOG_NLS | info | initialize non-linear system solvers
// | | | | | 0 non-linear systems
// LOG_NLS | info | update static data of non-linear system solvers
// LOG_NLS | info | free mixed system solvers
// LOG_NLS | info | free non-linear system solvers
Expand Down
2 changes: 2 additions & 0 deletions simulation/modelica/others/TestSolve12.mos
Expand Up @@ -34,7 +34,9 @@ val(v,0.5);
// resultFile = "ModelTestSolve12_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'ModelTestSolve12', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv LOG_NLS_V'",
// messages = "LOG_NLS | info | initialize mixed system solvers
// | | | | | 0 mixed systems
// LOG_NLS | info | initialize non-linear system solvers
// | | | | | 0 non-linear systems
// LOG_NLS | info | update static data of non-linear system solvers
// LOG_NLS | info | free mixed system solvers
// LOG_NLS | info | free non-linear system solvers
Expand Down
2 changes: 2 additions & 0 deletions simulation/modelica/others/TestSolve13.mos
Expand Up @@ -34,7 +34,9 @@ val(v,0.5);
// resultFile = "ModelTestSolve13_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'ModelTestSolve13', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv LOG_NLS_V'",
// messages = "LOG_NLS | info | initialize mixed system solvers
// | | | | | 0 mixed systems
// LOG_NLS | info | initialize non-linear system solvers
// | | | | | 0 non-linear systems
// LOG_NLS | info | update static data of non-linear system solvers
// LOG_NLS | info | free mixed system solvers
// LOG_NLS | info | free non-linear system solvers
Expand Down
2 changes: 2 additions & 0 deletions simulation/modelica/others/TestSolve14.mos
Expand Up @@ -34,7 +34,9 @@ val(v,0.5);
// resultFile = "ModelTestSolve14_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'ModelTestSolve14', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv LOG_NLS_V'",
// messages = "LOG_NLS | info | initialize mixed system solvers
// | | | | | 0 mixed systems
// LOG_NLS | info | initialize non-linear system solvers
// | | | | | 0 non-linear systems
// LOG_NLS | info | update static data of non-linear system solvers
// LOG_NLS | info | free mixed system solvers
// LOG_NLS | info | free non-linear system solvers
Expand Down
2 changes: 2 additions & 0 deletions simulation/modelica/others/TestSolve15.mos
Expand Up @@ -34,7 +34,9 @@ val(v,0.5);
// resultFile = "ModelTestSolve15_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'ModelTestSolve15', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv LOG_NLS_V'",
// messages = "LOG_NLS | info | initialize mixed system solvers
// | | | | | 0 mixed systems
// LOG_NLS | info | initialize non-linear system solvers
// | | | | | 0 non-linear systems
// LOG_NLS | info | update static data of non-linear system solvers
// LOG_NLS | info | free mixed system solvers
// LOG_NLS | info | free non-linear system solvers
Expand Down
2 changes: 2 additions & 0 deletions simulation/modelica/others/TestSolve16.mos
Expand Up @@ -39,7 +39,9 @@ val(v,0.5);
// resultFile = "ModelTestSolve16_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'ModelTestSolve16', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv LOG_NLS_V'",
// messages = "LOG_NLS | info | initialize mixed system solvers
// | | | | | 0 mixed systems
// LOG_NLS | info | initialize non-linear system solvers
// | | | | | 0 non-linear systems
// LOG_NLS | info | update static data of non-linear system solvers
// LOG_NLS | info | free mixed system solvers
// LOG_NLS | info | free non-linear system solvers
Expand Down
2 changes: 2 additions & 0 deletions simulation/modelica/others/TestSolve17.mos
Expand Up @@ -34,7 +34,9 @@ val(res,0.0);
// resultFile = "ModelTestSolve17_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 0.1, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'ModelTestSolve17', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv LOG_NLS_V -s euler'",
// messages = "LOG_NLS | info | initialize mixed system solvers
// | | | | | 0 mixed systems
// LOG_NLS | info | initialize non-linear system solvers
// | | | | | 0 non-linear systems
// LOG_NLS | info | update static data of non-linear system solvers
// LOG_NLS | info | free mixed system solvers
// LOG_NLS | info | free non-linear system solvers
Expand Down
4 changes: 3 additions & 1 deletion simulation/modelica/others/TestSolve2.mos
Expand Up @@ -57,7 +57,9 @@ val(x[12],1.0);
// resultFile = "ModelTestSolve2_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'ModelTestSolve2', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv LOG_NLS_V'",
// messages = "LOG_NLS | info | initialize mixed system solvers
// | | | | | 0 mixed systems
// LOG_NLS | info | initialize non-linear system solvers
// | | | | | 0 non-linear systems
// LOG_NLS | info | update static data of non-linear system solvers
// LOG_NLS | info | free mixed system solvers
// LOG_NLS | info | free non-linear system solvers
Expand All @@ -76,7 +78,7 @@ val(x[12],1.0);
// 10.0
// 0.0
// -4.727387818712341
// 0.2134742295027176
// 0.2134742295027175
// 0.419855241434907
// 0.748801190865333
// 0.769077109674782
Expand Down
2 changes: 2 additions & 0 deletions simulation/modelica/others/TestSolve3.mos
Expand Up @@ -37,7 +37,9 @@ val(v,0.5);
// resultFile = "ModelTestSolve3_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'ModelTestSolve3', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv LOG_NLS_V'",
// messages = "LOG_NLS | info | initialize mixed system solvers
// | | | | | 0 mixed systems
// LOG_NLS | info | initialize non-linear system solvers
// | | | | | 0 non-linear systems
// LOG_NLS | info | update static data of non-linear system solvers
// LOG_NLS | info | free mixed system solvers
// LOG_NLS | info | free non-linear system solvers
Expand Down
4 changes: 3 additions & 1 deletion simulation/modelica/others/TestSolve4.mos
Expand Up @@ -42,7 +42,9 @@ val(Err,1);
// resultFile = "ModelTestSolve4_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'ModelTestSolve4', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv LOG_NLS_V'",
// messages = "LOG_NLS | info | initialize mixed system solvers
// | | | | | 0 mixed systems
// LOG_NLS | info | initialize non-linear system solvers
// | | | | | 0 non-linear systems
// LOG_NLS | info | update static data of non-linear system solvers
// LOG_NLS | info | free mixed system solvers
// LOG_NLS | info | free non-linear system solvers
Expand All @@ -55,5 +57,5 @@ val(Err,1);
// 0.8140001025611594
// 1.108572441796849
// 0.2554128118829954
// 6.797090936218891e-16
// 0.0
// endResult
4 changes: 3 additions & 1 deletion simulation/modelica/others/TestSolve5.mos
Expand Up @@ -43,7 +43,9 @@ val(Err,1);
// resultFile = "ModelTestSolve5_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'ModelTestSolve5', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv LOG_NLS_V'",
// messages = "LOG_NLS | info | initialize mixed system solvers
// | | | | | 0 mixed systems
// LOG_NLS | info | initialize non-linear system solvers
// | | | | | 0 non-linear systems
// LOG_NLS | info | update static data of non-linear system solvers
// LOG_NLS | info | free mixed system solvers
// LOG_NLS | info | free non-linear system solvers
Expand All @@ -56,5 +58,5 @@ val(Err,1);
// 1.318116071652818
// 0.2526802551420786
// 0.2449786631268641
// 2.621263568911969e-17
// 0.0
// endResult
2 changes: 2 additions & 0 deletions simulation/modelica/others/TestSolve6.mos
Expand Up @@ -31,7 +31,9 @@ val(w,0.5);
// resultFile = "ModelTestSolve6_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'ModelTestSolve6', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv LOG_NLS_V'",
// messages = "LOG_NLS | info | initialize mixed system solvers
// | | | | | 0 mixed systems
// LOG_NLS | info | initialize non-linear system solvers
// | | | | | 0 non-linear systems
// LOG_NLS | info | update static data of non-linear system solvers
// LOG_NLS | info | free mixed system solvers
// LOG_NLS | info | free non-linear system solvers
Expand Down
2 changes: 2 additions & 0 deletions simulation/modelica/others/TestSolve7.mos
Expand Up @@ -31,7 +31,9 @@ val(w,0.5);
// resultFile = "ModelTestSolve7_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'ModelTestSolve7', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv LOG_NLS_V'",
// messages = "LOG_NLS | info | initialize mixed system solvers
// | | | | | 0 mixed systems
// LOG_NLS | info | initialize non-linear system solvers
// | | | | | 0 non-linear systems
// LOG_NLS | info | update static data of non-linear system solvers
// LOG_NLS | info | free mixed system solvers
// LOG_NLS | info | free non-linear system solvers
Expand Down
2 changes: 2 additions & 0 deletions simulation/modelica/others/TestSolve8.mos
Expand Up @@ -31,7 +31,9 @@ val(w,0.5);
// resultFile = "ModelTestSolve8_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'ModelTestSolve8', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv LOG_NLS_V'",
// messages = "LOG_NLS | info | initialize mixed system solvers
// | | | | | 0 mixed systems
// LOG_NLS | info | initialize non-linear system solvers
// | | | | | 0 non-linear systems
// LOG_NLS | info | update static data of non-linear system solvers
// LOG_NLS | info | free mixed system solvers
// LOG_NLS | info | free non-linear system solvers
Expand Down

0 comments on commit e3b3d75

Please sign in to comment.