49 const double t_end = 10.0;
50 const double h = 0.01;
57 f <<
next(s) == s + h*
v;
58 f <<
next(v) == v + h*(u-0.02*v*
v)/m;
59 f <<
next(m) == m - h*0.01*u*u;
67 OCP ocp( t_start, t_end, 50 );
91 window.
addSubplot( 0.5 * m * v*v,
"Kinetic Energy" );
Allows to setup and evaluate a general function based on SymbolicExpressions.
User-interface to formulate and solve optimal control problems and static NLPs.
#define USING_NAMESPACE_ACADO
returnValue subjectTo(const DifferentialEquation &differentialEquation_)
returnValue addSubplot(PlotWindowSubplot &_subplot)
Allows to setup and evaluate discretized differential equations based on SymbolicExpressions.
returnValue set(OptionsName name, int value)
returnValue minimizeLSQ(const DMatrix &S, const Function &h, const DVector &r)
Data class for defining optimal control problems.
Expression next(const Expression &arg)
Provides an interface to Gnuplot for plotting algorithmic outputs.
virtual returnValue solve()