Skip to content

Commit 0ee109b

Browse files
vrugeOpenModelica-Hudson
authored andcommitted
fixed 3437:
- compare only optimization variables - added bounds for der(evaporator.V_v) - changed simulation falgs (init push, mu-strategy) updated expected output -using regex
1 parent d4d3078 commit 0ee109b

File tree

5 files changed

+49
-949
lines changed

5 files changed

+49
-949
lines changed

openmodelica/cruntime/optimization/benchmark/DrumBoiler.mo

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,10 @@ package drumBoiler
144144
drumBoiler.optimizationFormulation.ObjectFunction.Minimize cost_qm_S(u = (qm_S - 180) ^ 2, gain = 1e-4);
145145
drumBoiler.optimizationFormulation.Constraints.Band conSigma(MaxValue = 150, MinValue = -150, u = (-1.0e3 * der(evaporator.T_D)) + 1.0e-05 * evaporator.p);
146146
input Real dq_F(min = -25 / 60, max = 25 / 60, start = 0.1);
147+
Real der_V_v(min = -0.02, max =0.025) = der(evaporator.V_v);
148+
//Real der_evaporator_p(min=0, max=3.2e4) = der(evaporator.p);
147149
equation
150+
148151
der(q_F) = dq_F;
149152
annotation(experiment(StopTime = 3600, Tolerance = 1e-5));
150153
end optDrumBoiler;

openmodelica/cruntime/optimization/benchmark/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ TEST = ../../../../rtest -v
22

33

44
TESTFILES = \
5+
runDrumBoiler.mos \
6+
runExReduceDrumBoiler.mos \
57
runReduceDrumBoiler.mos
68

79

810
# test that currently fail. Move up when fixed.
911
# Run make testfailing
1012
FAILINGTESTFILES = \
11-
runDrumBoiler.mos \
12-
runExReduceDrumBoiler.mos \
13+
1314

1415

1516
# Dependency files that are not .mo .mos or Makefile

openmodelica/cruntime/optimization/benchmark/runDrumBoiler.mos

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,17 @@ getErrorString();
1313
optimize(drumBoiler.optDrumBoiler, stopTime=3600, numberOfIntervals=50, tolerance=1e-4,simflags="-lv=LOG_IPOPT_ERROR -optimizerNP 1 -s optimization");
1414
getErrorString();
1515

16-
res := OpenModelica.Scripting.compareSimulationResults("drumBoiler.optDrumBoiler_res.mat","ReferenceFiles/drumBoiler.optDrumBoiler_ref.mat","drumBoiler.optDrumBoiler_res.csv",0.01,0.0001);
16+
res := OpenModelica.Scripting.compareSimulationResults("drumBoiler.optDrumBoiler_res.mat","ReferenceFiles/drumBoiler.optDrumBoiler_ref.mat","drumBoiler.optDrumBoiler_res.csv",0.01,0.0001,
17+
{
18+
"dq_F",
19+
"Y_Valve",
20+
"q_F",
21+
"controller.x",
22+
"cost_q_S.u",
23+
"cost_qm_S.u",
24+
"conSigma.u",
25+
"dq_F"
26+
});
1727
getErrorString();
1828

1929
// Result:
@@ -31,20 +41,20 @@ getErrorString();
3141
// ========================================================
3242
// State[0]:controller.x(start = 0, nominal = 10, min = -Inf, max = +Inf, init = 0)
3343
// State[1]:evaporator.V_l(start = 67, nominal = 68, min = -Inf, max = +Inf, init = 67)
34-
// State[2]:evaporator.p(start = 100000, nominal = 1e+06, min = 611.657, max = 1e+08, init = 100000)
44+
// State[2]:evaporator.p(start = 100000, nominal = 1e+006, min = 611.657, max = 1e+008, init = 100000)
3545
// State[3]:q_F(start = 0, nominal = 400, min = 0, max = 500, init = 0)
3646
// Input[4]:Y_Valve(start = 0.5, nominal = 1, min = 0, max = 1)
3747
// Input[5]:dq_F(start = 0.1, nominal = 0.416667, min = -0.416667, max = 0.416667)
3848
// --------------------------------------------------------
3949
// number of nonlinear constraints: 1
4050
// ========================================================
41-
//
51+
//
4252
// ******************************************************************************
4353
// This program contains Ipopt, a library for large-scale nonlinear optimization.
4454
// Ipopt is released as open source code under the Eclipse Public License (EPL).
4555
// For more information visit http://projects.coin-or.org/Ipopt
4656
// ******************************************************************************
47-
//
57+
//
4858
// LOG_IPOPT_ERROR | info | max violation is 2.49596 for the constraint $OMC$constarintTerm1(time = 936)
4959
// LOG_IPOPT_ERROR | info | max violation is 214.785 for the constraint $OMC$constarintTerm1(time = 1368)
5060
// LOG_IPOPT_ERROR | info | max violation is 214.653 for the constraint $OMC$constarintTerm1(time = 1368)
@@ -72,5 +82,5 @@ getErrorString();
7282
// end SimulationResult;
7383
// ""
7484
// {"Files Equal!"}
75-
// "
85+
// ""
7686
// endResult

0 commit comments

Comments
 (0)