Skip to content

Commit

Permalink
[fixTest] ticket 4793
Browse files Browse the repository at this point in the history
 - OMC PR #3077

Belonging to [master]:
  - #167
  - OpenModelica/OMCompiler#3077
  • Loading branch information
kabdelhak authored and OpenModelica-Hudson committed May 7, 2019
1 parent 6c4f794 commit ffb8d4e
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 36 deletions.
2 changes: 1 addition & 1 deletion OMCompiler
Expand Up @@ -114,6 +114,9 @@ runScript(modelTesting);getErrorString();
// Simulation options: startTime = 0.0, stopTime = 10.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Modelica.Fluid.Examples.BranchingDynamicPipes', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''
// Result file: Modelica.Fluid.Examples.BranchingDynamicPipes_res.mat
// Messages: Wrong start value for variable _boundary1_P_medium_P_p_steam_sat_ detected. Got 2339.19 Expected: 100000
// Wrong start value for variable _pipe1_P_flowModel_P_mus_(1) detected. Got 1.82329e-05 Expected: 0.001
// Wrong start value for variable _pipe1_P_flowModel_P_rhos_(1) detected. Got 1.77178 Expected: 1
// Wrong start value for variable _pipe1_P_statesFM1_P_T_ detected. Got 293.15 Expected: 300
//
// Files Equal!
// "true
Expand Down

Large diffs are not rendered by default.

Expand Up @@ -27,8 +27,14 @@ getEnvironmentVar("REFERENCEFILES")+"/ThermoSysPro/ThermoSysPro.Examples.SimpleE
// record SimulationResult
// resultFile = "ThermoSysPro.Examples.SimpleExamples.TestVolumes2_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 10.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'ThermoSysPro.Examples.SimpleExamples.TestVolumes2', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = "assert | error | Model error. 0^(-2) is not defined
// stdout | warning | Non-Linear Solver try to handle a problem with a called assert.
// messages = "stdout | warning | While solving non-linear system an assertion failed during initialization.
// | | | | | The non-linear solver tries to solve the problem that could take some time.
// | | | | | It could help to provide better start-values for the iteration variables.
// | | | | | For more information simulate with -lv LOG_NLS_V
// stdout | warning | While solving non-linear system an assertion failed during initialization.
// | | | | | The non-linear solver tries to solve the problem that could take some time.
// | | | | | It could help to provide better start-values for the iteration variables.
// | | | | | For more information simulate with -lv LOG_NLS_V
// stdout | warning | While solving non-linear system an assertion failed during initialization.
// | | | | | The non-linear solver tries to solve the problem that could take some time.
// | | | | | It could help to provide better start-values for the iteration variables.
Expand Down
Expand Up @@ -27,6 +27,7 @@ runScript(modelTesting);getErrorString();
// Simulation options: startTime = 0.0, stopTime = 0.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Modelica.Media.Examples.SolveOneNonlinearEquation.Inverse_sine', options = '', outputFormat = 'mat', variableFilter = 'time|x_zero', cflags = '', simflags = ' -abortSlowSimulation -alarm=360 -emit_protected'
// Result file: Modelica.Media.Examples.SolveOneNonlinearEquation.Inverse_sine_res.mat
// Messages: stdout | info | x_zero = 0.523599, y_zero = 0.5, A*sin(w*x_zero) = 0.5
// stdout | info | x_zero = 0.523599, y_zero = 0.5, A*sin(w*x_zero) = 0.5
// LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
// stdout | info | x_zero = 0.523599, y_zero = 0.5, A*sin(w*x_zero) = 0.5
// LOG_SUCCESS | info | The simulation finished successfully.
Expand Down
56 changes: 38 additions & 18 deletions testsuite/simulation/modelica/commonSubExp/wrapFunctionCalls13.mos
Expand Up @@ -110,44 +110,64 @@ system("rm -f ./ReferenceFiles/CSE.wrapFunctionCalls13_res.mat");
// ########################################
//
//
// unspecified partition
// ========================================
//
// Variables (1)
// ========================================
// 1: $cse2:VARIABLE(protected = true ) type: Real unreplaceable
//
//
// Equations (1, 1)
// ========================================
// 1/1 (1): $cse2 = CSE.wrapFunctionCalls13.f1(dat.d1, p1, 2 * p1) [binding |0|0|0|0|]
//
//
// Matching
// ========================================
// 1 variables and equations
// var 1 is solved in eqn 1
//
//
// StrongComponents
// ========================================
// {1:1}
//
//
// unknown partition
// ========================================
//
// Variables (5)
// Variables (4)
// ========================================
// 1: z:VARIABLE() type: Real
// 2: x:DISCRETE() type: Integer
// 3: $cse3:VARIABLE(protected = true ) type: Real unreplaceable
// 4: $cse2:VARIABLE(protected = true ) type: Real unreplaceable
// 5: $cse1:VARIABLE(protected = true ) type: Real unreplaceable
// 4: $cse1:VARIABLE(protected = true ) type: Real unreplaceable
//
//
// Equations (5, 5)
// Equations (4, 4)
// ========================================
// 1/1 (1): $cse2 = CSE.wrapFunctionCalls13.f1(dat.d1, p1, 2 * p1) [unknown |0|0|0|0|]
// 2/2 (1): $cse1 = $cse2 [dynamic |0|0|0|0|]
// 3/3 (1): $cse3 = sin($cse1) [unknown |0|0|0|0|]
// 4/4 (1): z = $cse3 - 1.0 [dynamic |0|0|0|0|]
// 5/5 (1): x = $cse1 - CSE.wrapFunctionCalls13.f1(0.0, p1, 2 * p1) [unknown |0|0|0|0|]
// 1/1 (1): $cse1 = $cse2 [dynamic |0|0|0|0|]
// 2/2 (1): $cse3 = sin($cse1) [unknown |0|0|0|0|]
// 3/3 (1): z = $cse3 - 1.0 [dynamic |0|0|0|0|]
// 4/4 (1): x = $cse1 - CSE.wrapFunctionCalls13.f1(0.0, p1, 2 * p1) [unknown |0|0|0|0|]
//
//
// Matching
// ========================================
// 5 variables and equations
// var 1 is solved in eqn 4
// var 2 is solved in eqn 5
// var 3 is solved in eqn 3
// 4 variables and equations
// var 1 is solved in eqn 3
// var 2 is solved in eqn 4
// var 3 is solved in eqn 2
// var 4 is solved in eqn 1
// var 5 is solved in eqn 2
//
//
// StrongComponents
// ========================================
// {1:4}
// {2:5}
// {3:3}
// {4:1}
// {5:2}
// {2:3}
// {3:1}
// {4:2}
//
//
//
Expand Down
14 changes: 8 additions & 6 deletions testsuite/simulation/modelica/functions_eval/functionTest8.mos
Expand Up @@ -61,8 +61,7 @@ val(H, 0.0);
// true
// ""
//
// Start function evaluation of:
// h := functionTest8.hl(Tc_model, T_model)
// Start constant evaluation of expression: functionTest8.hl(Tc_model, T_model)
//
// IF-statement:
// if T < Tc then
Expand Down Expand Up @@ -177,10 +176,11 @@ val(H, 0.0);
// end if;
//
//
// the function output is not constant in any case
//
// Start function evaluation of:
// H := functionTest8.hv(Tc_model, T_model)
// evaluated to: functionTest8.hl(Tc_model, T_model)
//
//
// Start constant evaluation of expression: functionTest8.hv(Tc_model, T_model)
//
// assignment:
// temp := 298.15;
Expand Down Expand Up @@ -259,7 +259,9 @@ val(H, 0.0);
// end if;
//
//
// the function output is not constant in any case
//
// evaluated to: functionTest8.hv(Tc_model, T_model)
//
// record SimulationResult
// resultFile = "functionTest8_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'functionTest8', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
Expand Down
12 changes: 4 additions & 8 deletions testsuite/simulation/modelica/functions_eval/functionTest9.mos
Expand Up @@ -45,8 +45,7 @@ val(H, 0.0);
// true
// ""
//
// Start function evaluation of:
// H := functionTest9.hv(Tc_model, T_model)
// Start constant evaluation of expression: functionTest9.hv(Tc_model, T_model)
//
// assignment:
// temp := 298.15;
Expand Down Expand Up @@ -126,12 +125,9 @@ val(H, 0.0);
// Ent2 := 1.0;
//
//
// the function output is completely constant
// Finish evaluation:
// of:
// functionTest9.hv(Tc_model, T_model)
// to:
// H := 1.0
//
// evaluated to: 1.0
//
// record SimulationResult
// resultFile = "functionTest9_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'functionTest9', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
Expand Down

0 comments on commit ffb8d4e

Please sign in to comment.