40 const double k10 = 1.287e12;
41 const double k20 = 1.287e12;
42 const double k30 = 9.043e09;
43 const double E1 = -9758.3;
44 const double E2 = -9758.3;
45 const double E3 = -8560.0;
46 const double H1 = 4.2;
47 const double H2 = -11.0;
48 const double H3 = -41.85;
49 const double rho = 0.9342;
50 const double Cp = 3.01;
51 const double kw = 4032.0;
52 const double AR = 0.215;
53 const double VR = 10.0;
54 const double mK = 5.0;
55 const double CPK = 2.0;
57 const double cA0 = 5.1;
60 const double FFs = 14.19;
63 const double cAs = 2.1402105301746182e00;
64 const double cBs = 1.0903043613077321e00;
65 const double thetas = 1.1419108442079495e02;
66 const double thetaKs = 1.1290659291045561e02;
72 const double P11 = 3278.78;
73 const double P21 = 1677.31;
74 const double P31 = 681.02;
75 const double P41 = 271.50;
77 const double P12 = 1677.31;
78 const double P22 = 919.78;
79 const double P32 = 344.19;
80 const double P42 = 137.27;
82 const double P13 = 681.02;
83 const double P23 = 344.19;
84 const double P33 = 172.45;
85 const double P43 = 65.53;
87 const double P14 = 271.50;
88 const double P24 = 137.27;
89 const double P34 = 65.53;
90 const double P44 = 29.28;
162 for( run1 = 0; run1 < 10; run1++ )
163 times[run1] = run1*80.0;
166 Grid grid( 11, times );
199 cstr75states.
read(
"cstr75_states.txt" );
200 cstr75controls.
read(
"cstr75_controls.txt" );
205 window1.
addData( 0,cstr75states(0) );
209 window2.
addData( 0,cstr75states(1) );
213 window3.
addData( 0,cstr75states(2) );
217 window4.
addData( 0,cstr75states(3) );
221 window5.
addData( 0,cstr75controls(0) );
225 window6.
addData( 0,cstr75controls(1) );
236 window.
addData( 0,cstr75states(0) );
237 window.
addData( 1,cstr75states(1) );
238 window.
addData( 2,cstr75states(2) );
239 window.
addData( 3,cstr75states(3) );
240 window.
addData( 4,cstr75controls(0) );
241 window.
addData( 5,cstr75controls(1) );
260 uStart( 0,0 ) = 14.19;
261 uStart( 0,1 ) = -1113.5;
262 uStart( 1,0 ) = 14.19;
263 uStart( 1,1 ) = -1113.5;
267 algorithm << window1;
268 algorithm << window2;
269 algorithm << window3;
270 algorithm << window4;
271 algorithm << window5;
272 algorithm << window6;
Allows to setup and evaluate a general function based on SymbolicExpressions.
returnValue initializeControls(const char *fileName)
User-interface to formulate and solve optimal control problems and static NLPs.
#define USING_NAMESPACE_ACADO
Provides a time grid consisting of vector-valued optimization variables at each grid point...
Allows to conveniently handle (one-dimensional) grids consisting of time points.
returnValue subjectTo(const DifferentialEquation &differentialEquation_)
returnValue addSubplot(PlotWindowSubplot &_subplot)
returnValue set(OptionsName name, int value)
returnValue minimizeLSQ(const DMatrix &S, const Function &h, const DVector &r)
Data class for defining optimal control problems.
virtual returnValue addData(uint idx, const VariablesGrid &_newData)
Expression dot(const Expression &arg)
returnValue read(std::istream &stream)
const double TIMEUNITS_PER_HOUR
IntermediateState exp(const Expression &arg)
Provides an interface to Gnuplot for plotting algorithmic outputs.
virtual returnValue solve()
Allows to setup and evaluate differential equations (ODEs and DAEs) based on SymbolicExpressions.