Skip to content

Commit

Permalink
[fixTest] ticket4793
Browse files Browse the repository at this point in the history
  • Loading branch information
kabdelhak authored and OpenModelica-Hudson committed Mar 15, 2019
1 parent 5a99532 commit 8a7ebb7
Show file tree
Hide file tree
Showing 20 changed files with 1,247 additions and 711 deletions.
1,767 changes: 1,171 additions & 596 deletions openmodelica/cppruntime/fmu/modelExchange/2.0/testDrumBoiler.mos

Large diffs are not rendered by default.

Expand Up @@ -114,9 +114,6 @@ 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
Expand Up @@ -73,8 +73,8 @@ 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 = 360)
// LOG_IPOPT_ERROR | info | max violation is 1.5e-06 for the constraint $con$conSigma_con(time = 288)
// LOG_IPOPT_ERROR | info | max violation is 1.5e-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 = 360)
// LOG_SUCCESS | info | The simulation finished successfully.
// "
// end SimulationResult;
Expand Down
1 change: 1 addition & 0 deletions openmodelica/fmi/ModelExchange/2.0/testBug3763.mos
Expand Up @@ -14,5 +14,6 @@ translateModelFMU(DrumBoiler);getErrorString();
// true
// "DrumBoiler.fmu"
// "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").
// "
// endResult
5 changes: 2 additions & 3 deletions openmodelica/linearization/testDrumBoiler.mos
Expand Up @@ -33,7 +33,6 @@ list(linear_testDrumBoilerLin);
// "
// 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").
// "
// true
// "model linear_testDrumBoilerLin
Expand All @@ -42,9 +41,9 @@ list(linear_testDrumBoilerLin);
// parameter Integer q = 4 \"number of outputs\";
// parameter Real x0[n] = {0, 67, 100000};
// parameter Real u0[p] = {0, 0};
// parameter Real A[n, n] = [-0, -0.008333333333333333, -0; 0.01043953430921842, -0.01043953430921842, 0; 0.1178989396709045, -0.1178989396709045, 0];
// parameter Real A[n, n] = [-0, -0.008333333333333333, -0; 0.01043953430921842, -0.01043953430921842, 0; 0.1178989396709848, -0.1178989396709848, 4.135580766728708e-15];
// parameter Real B[n, p] = [0, 0; -0.001308242749261165, 0.0001170710024614632; -19.14622757506175, 8.475892309753029];
// parameter Real C[q, n] = [0, 0, 0.0001439468903880629; 0, 1, 0; 0, 0, 1e-05; 0, 0, 0];
// parameter Real C[q, n] = [0, 0, 0.0001439468903880623; 0, 1, 0; 0, 0, 1e-05; 0, 0, 0];
// parameter Real D[q, p] = [0, 0; 0, 0; 0, 0; 1, 0];
// Real x[n](start = x0);
// input Real u[p](start = u0);
Expand Down

Large diffs are not rendered by default.

Expand Up @@ -10,17 +10,10 @@ simulate(ThermoPower.Test.DistributedParameterComponents.TestFlow1D2phChen); get
// true
// ""
// record SimulationResult
// resultFile = "",
// resultFile = "ThermoPower.Test.DistributedParameterComponents.TestFlow1D2phChen_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1000.0, numberOfIntervals = 500, tolerance = 1e-08, method = 'dassl', fileNamePrefix = 'ThermoPower.Test.DistributedParameterComponents.TestFlow1D2phChen', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = "Simulation execution failed for model: ThermoPower.Test.DistributedParameterComponents.TestFlow1D2phChen
// LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
// DASKR-- AT T (=R1) AND STEPSIZE H (=R2) THE
// In above, R1 = 1.1643990255923E+02 R2 = 2.7968940501209E-14
// DASKR-- NONLINEAR SOLVER FAILED TO CONVERGE
// DASKR-- REPEATEDLY OR WITH ABS(H)=HMIN
// stdout | warning | The corrector could not converge.
// stdout | warning | can't continue. time = 116.439903
// stdout | info | model terminate | Integrator failed. | Simulation terminated at time 116.44
// messages = "LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
// 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.
Expand Down
Expand Up @@ -27,14 +27,8 @@ 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 = "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
// messages = "assert | error | Model error. 0^(-2) is not defined
// stdout | warning | Non-Linear Solver try to handle a problem with a called assert.
// 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 @@ -40,13 +40,6 @@ runScript(modelTesting);getErrorString();
// Messages: assert | warning | The following assertion has been violated at time 0.000000
// | | | | pump.delta_head_init >= 0.0
// assert | warning | Variable violating min constraint: 0.0 <= pump.delta_head_init, has value: -2.45172
// assert | error | IF97 medium function visc_dTp for viscosity called with too low density
// | | | | d = -698.246 <= 0.00485458 (triple point density)
// stdout | warning | Non-Linear Solver try to handle a problem with a called assert.
// 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
// LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
// LOG_SUCCESS | info | The simulation finished successfully.
//
Expand Down
Expand Up @@ -33,20 +33,20 @@ runScript(modelTesting);getErrorString();
// Simulation options: startTime = 0.0, stopTime = 1.01, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6', options = '', outputFormat = 'mat', variableFilter = 'time|load.phi|load.w|filter.x.1.|filter.x.2.', cflags = '', simflags = ' -abortSlowSimulation -alarm=360 -emit_protected'
// Result file: Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6_res.mat
// Messages: LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
// LOG_SUCCESS | info | The simulation finished successfully.
// LOG_SUCCESS | info | The simulation finished successfully.
//
// Files Equal!
// Notification: Model statistics after passing the front-end and creating the data structures used by the back-end:
// * Number of equations: 11116
// * Number of variables: 11116
// Notification: Model statistics after passing the back-end for initialization:
// * Number of independent subsystems: 1929
// * Number of independent subsystems: 1885
// * Number of states: 0 ()
// * Number of discrete variables: 390 ('-d=discreteinfo' for list of discrete vars)
// * Number of discrete states: 0 ('-d=discreteinfo' for list of discrete states)
// * Top-level inputs: 0
// Notification: Strong component statistics for initialization (3136):
// * Single equations (assignments): 3123
// Notification: Strong component statistics for initialization (3205):
// * Single equations (assignments): 3192
// * Array equations: 0
// * Algorithm blocks: 0
// * Record equations: 0
Expand All @@ -56,16 +56,16 @@ runScript(modelTesting);getErrorString();
// * Torn equation systems: 13
// * Mixed (continuous/discrete) equation systems: 0
// Notification: Torn system details for strict tearing set:
// * Linear torn systems: 7 {(27,17.6%) 751,(2,100.0%) 11,(2,100.0%) 11,(2,100.0%) 11,(2,100.0%) 11,(2,100.0%) 11,(2,100.0%) 11}
// * Linear torn systems: 7 {(27,17.6%) 757,(2,100.0%) 11,(3,88.9%) 10,(3,88.9%) 10,(3,88.9%) 10,(2,100.0%) 11,(2,100.0%) 11}
// * Non-linear torn systems: 6 {2 12,2 12,2 12,2 12,2 12,2 12}
// Notification: Model statistics after passing the back-end for simulation:
// * Number of independent subsystems: 91
// * Number of independent subsystems: 217
// * Number of states: 4 (load.phi,load.w,filter.x[1],filter.x[2])
// * Number of discrete variables: 0 ('-d=discreteinfo' for list of discrete vars)
// * Number of discrete states: 0 ('-d=discreteinfo' for list of discrete states)
// * Top-level inputs: 0
// Notification: Strong component statistics for simulation (1315):
// * Single equations (assignments): 1302
// Notification: Strong component statistics for simulation (1454):
// * Single equations (assignments): 1441
// * Array equations: 0
// * Algorithm blocks: 0
// * Record equations: 0
Expand Down
Expand Up @@ -30,7 +30,7 @@ runScript(modelTesting);getErrorString();
// OpenModelicaModelTesting.Kind.VerifiedSimulation
// Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6_analytic
// {"load.phi","load.w","filter.x[1]","filter.x[2]"}
// Simulation options: startTime = 0.0, stopTime = 1.01, numberOfIntervals = 500, tolerance = 1e-006, method = 'dassl', fileNamePrefix = 'Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6_analytic', options = '', outputFormat = 'mat', variableFilter = 'time|load.phi|load.w|filter.x.1.|filter.x.2.', cflags = '', simflags = ' -abortSlowSimulation -alarm=360 -emit_protected'
// Simulation options: startTime = 0.0, stopTime = 1.01, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6_analytic', options = '', outputFormat = 'mat', variableFilter = 'time|load.phi|load.w|filter.x.1.|filter.x.2.', cflags = '', simflags = ' -abortSlowSimulation -alarm=360 -emit_protected'
// Result file: Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6_analytic_res.mat
// Messages: LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
// LOG_SUCCESS | info | The simulation finished successfully.
Expand All @@ -40,13 +40,13 @@ runScript(modelTesting);getErrorString();
// * Number of equations: 9016
// * Number of variables: 9016
// Notification: Model statistics after passing the back-end for initialization:
// * Number of independent subsystems: 1514
// * Number of independent subsystems: 1478
// * Number of states: 0 ()
// * Number of discrete variables: 333 ('-d=discreteinfo' for list of discrete vars)
// * Number of discrete states: 0 ('-d=discreteinfo' for list of discrete states)
// * Top-level inputs: 0
// Notification: Strong component statistics for initialization (2771):
// * Single equations (assignments): 2764
// Notification: Strong component statistics for initialization (2820):
// * Single equations (assignments): 2813
// * Array equations: 6
// * Algorithm blocks: 0
// * Record equations: 0
Expand All @@ -64,8 +64,8 @@ runScript(modelTesting);getErrorString();
// * Number of discrete variables: 0 ('-d=discreteinfo' for list of discrete vars)
// * Number of discrete states: 0 ('-d=discreteinfo' for list of discrete states)
// * Top-level inputs: 0
// Notification: Strong component statistics for simulation (1322):
// * Single equations (assignments): 1321
// Notification: Strong component statistics for simulation (1341):
// * Single equations (assignments): 1340
// * Array equations: 0
// * Algorithm blocks: 0
// * Record equations: 0
Expand All @@ -75,7 +75,7 @@ runScript(modelTesting);getErrorString();
// * Torn equation systems: 1
// * Mixed (continuous/discrete) equation systems: 0
// Notification: Torn system details for strict tearing set:
// * Linear torn systems: 1 {(1,100.0%) 419}
// * Linear torn systems: 1 {(1,100.0%) 455}
// * Non-linear torn systems: 0
//
// "true
Expand Down
Expand Up @@ -27,7 +27,6 @@ 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
17 changes: 9 additions & 8 deletions simulation/modelica/commonSubExp/wrapFunctionCalls10.mos
Expand Up @@ -90,18 +90,19 @@ system("rm -f ./ReferenceFiles/CSE.wrapFunctionCalls10_res.mat");
//
// ########### Updated globalKnownVars (simulation) (6)
// ========================================
// 1: z1:VARIABLE(fixed = true ) = CSE.wrapFunctionCalls10.f1(CSE.wrapFunctionCalls10.f2(p1, p2), p3) type: Real
// 2: p1:PARAM() = 5 type: Integer
// 3: p2:PARAM() = 10 type: Integer
// 4: p3:PARAM() = 1.0 type: Real
// 5: $cse1.d2 in $cse1:DISCRETE(fixed = true protected = true ) = CSE.wrapFunctionCalls10.f2(p1, p2) type: Integer unreplaceable
// 6: $cse1.d1 in $cse1:DISCRETE(fixed = true protected = true ) = CSE.wrapFunctionCalls10.f2(p1, p2) type: Integer unreplaceable
// 1: p1:PARAM() = 5 type: Integer
// 2: p2:PARAM() = 10 type: Integer
// 3: p3:PARAM() = 1.0 type: Real
// 4: $cse1.d2 in $cse1:DISCRETE(fixed = true protected = true ) = CSE.wrapFunctionCalls10.f2(p1, p2) type: Integer unreplaceable
// 5: $cse1.d1 in $cse1:DISCRETE(fixed = true protected = true ) = CSE.wrapFunctionCalls10.f2(p1, p2) type: Integer unreplaceable
// 6: z1:VARIABLE(fixed = true ) = CSE.wrapFunctionCalls10.f1($cse1, p3) type: Real
//
//
// ########### CSE Replacements (2/43)
// ########### CSE Replacements (3/44)
// ========================================
// 1: z2 - CSE.wrapFunctionCalls10.f1($cse1, time) - {}
// 1: z1 - CSE.wrapFunctionCalls10.f1($cse1, p3) - {}
// 2: $cse1 - CSE.wrapFunctionCalls10.f2(p1, p2) - {}
// 3: z2 - CSE.wrapFunctionCalls10.f1($cse1, time) - {}
// record SimulationResult
// resultFile = "CSE.wrapFunctionCalls10_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'CSE.wrapFunctionCalls10', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
Expand Down
56 changes: 18 additions & 38 deletions simulation/modelica/commonSubExp/wrapFunctionCalls13.mos
Expand Up @@ -110,64 +110,44 @@ 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 (4)
// Variables (5)
// ========================================
// 1: z:VARIABLE() type: Real
// 2: x:DISCRETE() type: Integer
// 3: $cse3:VARIABLE(protected = true ) type: Real unreplaceable
// 4: $cse1:VARIABLE(protected = true ) type: Real unreplaceable
// 4: $cse2:VARIABLE(protected = true ) type: Real unreplaceable
// 5: $cse1:VARIABLE(protected = true ) type: Real unreplaceable
//
//
// Equations (4, 4)
// Equations (5, 5)
// ========================================
// 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|]
// 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|]
//
//
// Matching
// ========================================
// 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
// 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
// var 4 is solved in eqn 1
// var 5 is solved in eqn 2
//
//
// StrongComponents
// ========================================
// {1:4}
// {2:3}
// {3:1}
// {4:2}
// {2:5}
// {3:3}
// {4:1}
// {5:2}
//
//
//
Expand Down

0 comments on commit 8a7ebb7

Please sign in to comment.