-
Notifications
You must be signed in to change notification settings - Fork 298
/
runReduceDrumBoiler.mos
83 lines (76 loc) · 5.48 KB
/
runReduceDrumBoiler.mos
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// name: ReduceDrumBoiler
// cflags: --flowThreshold=1e-15
// status: correct
loadModel(Modelica,{"3.2"});
getErrorString();
setCommandLineOptions("+d=reduceDynOpt");
getErrorString();
loadFile("DrumBoiler.mo");
getErrorString();
optimize(drumBoiler.optDrumBoiler, stopTime=3600, numberOfIntervals=50, tolerance=1e-4,simflags="-lv=LOG_IPOPT_ERROR -optimizerNP 1 -s optimization");
getErrorString();
res := OpenModelica.Scripting.compareSimulationResults("drumBoiler.optDrumBoiler_res.mat","ReferenceFiles/drumBoiler.optDrumBoiler_ref.mat","drumBoiler.optDrumBoiler_res.csv",0.01,0.0001,{"controller.x", "evaporator.V_l", "evaporator.p", "q_F", "Y_Valve", "dq_F"});
getErrorString();
// Result:
// true
// ""
// 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'",
// messages = "assert | warning | The following assertion has been violated at time 0.000000
// | | | | der_evaporator_p >= 0.0 and der_evaporator_p <= 32000.0
// assert | warning | Variable violating min/max constraint: 0.0 <= der_evaporator_p <= 32000.0, has value: -9.57311
// LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
//
// Optimizer Variables
// ========================================================
// State[0]:controller.x(start = 0, nominal = 10, min = -Inf, max = +Inf, init = 0)
// State[1]:evaporator.V_l(start = 67, nominal = 68, min = -Inf, max = +Inf, init = 67)
// State[2]:evaporator.p(start = 100000, nominal = 1e+06, min = 611.657, max = 1e+08, init = 100000)
// State[3]:q_F(start = 0, nominal = 400, min = 0, max = 500, init = 0)
// Input[4]:Y_Valve(start = 0.5, nominal = 1, min = 0, max = 1)
// Input[5]:dq_F(start = 0.1, nominal = 0.416667, min = -0.416667, max = 0.416667)
// --------------------------------------------------------
// number of nonlinear constraints: 1
// ========================================================
//
// ******************************************************************************
// This program contains Ipopt, a library for large-scale nonlinear optimization.
// Ipopt is released as open source code under the Eclipse Public License (EPL).
// For more information visit http://projects.coin-or.org/Ipopt
// ******************************************************************************
//
// LOG_IPOPT_ERROR | info | max violation is 2.49596 for the constraint $con$conSigma_con(time = 936)
// LOG_IPOPT_ERROR | info | max violation is 159.505 for the constraint $con$conSigma_con(time = 1368)
// LOG_IPOPT_ERROR | info | max violation is 157.079 for the constraint $con$conSigma_con(time = 1368)
// LOG_IPOPT_ERROR | info | max violation is 138.617 for the constraint $con$conSigma_con(time = 1368)
// LOG_IPOPT_ERROR | info | max violation is 58.0565 for the constraint $con$conSigma_con(time = 1368)
// LOG_IPOPT_ERROR | info | max error is 0.545275 for the approximation of the state evaporator.p(time = 1368)
// LOG_IPOPT_ERROR | info | max violation is 36.0501 for the constraint $con$conSigma_con(time = 1080)
// LOG_IPOPT_ERROR | info | max error is 0.0412625 for the approximation of the state evaporator.p(time = 1224)
// LOG_IPOPT_ERROR | info | max error is 0.0203336 for the approximation of the state evaporator.p(time = 3600)
// LOG_IPOPT_ERROR | info | max error is 0.00282562 for the approximation of the state evaporator.p(time = 3600)
// LOG_IPOPT_ERROR | info | max error is 0.00171499 for the approximation of the state evaporator.p(time = 3600)
// LOG_IPOPT_ERROR | info | max error is 0.00131765 for the approximation of the state evaporator.p(time = 3600)
// LOG_IPOPT_ERROR | info | max error is 5.01892e-05 for the approximation of the state evaporator.p(time = 1224)
// LOG_IPOPT_ERROR | info | max error is 3.24251e-06 for the approximation of the state evaporator.p(time = 1224)
// LOG_IPOPT_ERROR | info | max violation is 1.47354e-06 for the constraint $con$conSigma_con(time = 216)
// 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 = 504)
// 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 redundant start and/or conflicting 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.
// "
// {"Files Equal!"}
// "Warning: 'compareSimulationResults' is deprecated. It is recommended to use 'diffSimulationResults' instead.
// "
// endResult