55 f <<
dot(x) == -x + 0.5*x*x + u + 0.5*z ;
56 f <<
dot(l) == x*x + 3.0*u*u ;
57 f << 0 == z +
exp(z) - 1.0 + x ;
62 OCP ocp( 0.0, 5.0, 10 );
104 diffStates.printToFile(
"diffStates.txt" );
105 diffStates.printToFile(
"diffStates.m",
"DIFFSTATES",
PS_MATLAB );
109 sampledProcessOutput.printToFile(
"sampledOut.txt" );
110 sampledProcessOutput.printToFile(
"sampledOut.m",
"OUT",
PS_MATLAB );
114 feedbackControl.printToFile(
"controls.txt" );
115 feedbackControl.printToFile(
"controls.m",
"CONTROL",
PS_MATLAB );
119 algStates.printToFile(
"algStates.txt" );
120 algStates.printToFile(
"algStates.m",
"ALGSTATES",
PS_MATLAB );
124 window.
addSubplot( diffStates(0),
"DIFFERENTIAL STATE: x" );
125 window.
addSubplot( diffStates(1),
"DIFFERENTIAL STATE: l" );
126 window.
addSubplot( algStates(0),
"ALGEBRAIC STATE: z" );
127 window.
addSubplot( feedbackControl(0),
"CONTRUL: u" );
Calculates the control inputs of the Process based on the Process outputs.
Allows to setup and evaluate output functions based on SymbolicExpressions.
virtual returnValue plot(PlotFrequency _frequency=PLOT_IN_ANY_CASE)
returnValue getProcessDifferentialStates(VariablesGrid &_diffStates)
Stores a DifferentialEquation together with an OutputFcn.
#define USING_NAMESPACE_ACADO
Provides a time grid consisting of vector-valued optimization variables at each grid point...
returnValue getFeedbackControl(Curve &_feedbackControl) const
returnValue getProcessAlgebraicStates(VariablesGrid &_algStates)
User-interface to formulate and solve model predictive control problems.
returnValue subjectTo(const DifferentialEquation &differentialEquation_)
returnValue minimizeMayerTerm(const Expression &arg)
returnValue addSubplot(PlotWindowSubplot &_subplot)
returnValue getSampledProcessOutput(VariablesGrid &_sampledProcessOutput)
returnValue init(const DVector &x0_, const DVector &p_=emptyConstVector)
Data class for defining optimal control problems.
Allows to define a static reference trajectory that the ControlLaw aims to track. ...
Expression dot(const Expression &arg)
Allows to run closed-loop simulations of dynamic systems.
Simulates the process to be controlled based on a dynamic model.
IntermediateState exp(const Expression &arg)
Provides an interface to Gnuplot for plotting algorithmic outputs.
Allows to setup and evaluate differential equations (ODEs and DAEs) based on SymbolicExpressions.