66 f <<
dot(vB) == ( -kS*xB + kS*xW + F ) / mB;
67 f <<
dot(vW) == ( kS*xB - (kT+kS)*xW + kT*R - F ) / mW;
93 const double tStart = 0.0;
94 const double tEnd = 1.0;
96 OCP ocp( tStart, tEnd, 20 );
114 window.
addSubplot( xW,
"Wheel Position [m]" );
115 window.
addSubplot( vB,
"Body Velocity [m/s]" );
116 window.
addSubplot( vW,
"Wheel Velocity [m/s]" );
118 window.
addSubplot( R,
"Road Excitation [m]" );
Calculates the control inputs of the Process based on the Process outputs.
Allows to setup and evaluate a general function based on SymbolicExpressions.
#define USING_NAMESPACE_ACADO
User-interface to formulate and solve model predictive control problems.
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)
virtual returnValue step(double currentTime, const DVector &_y, const VariablesGrid &_yRef=emptyConstVariablesGrid)
virtual returnValue init(double startTime=0.0, const DVector &_x0=emptyConstVector, const DVector &_p=emptyConstVector, const VariablesGrid &_yRef=emptyConstVariablesGrid)
Derived & setZero(Index size)
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)
void setAll(const T &_value)
Provides an interface to Gnuplot for plotting algorithmic outputs.
Allows to setup and evaluate differential equations (ODEs and DAEs) based on SymbolicExpressions.