51 const double m = 1.0 ;
52 const double g = 9.81 ;
53 const double alpha = 2.0 ;
60 f <<
dot(phi ) == dphi;
61 f <<
dot(dphi) == -(m*g/l)*z - alpha*dphi + F/(m*l);
75 double x_start[2] = { 1.0, 0.0 };
76 double u [1] = { 0.0 };
77 double p [1] = { 1.0 };
87 integrator.
integrate( t_start, t_end, x_start, 0, p, u );
94 integrator.
getX( differentialStates );
96 differentialStates.
print(
"x" );
USING_NAMESPACE_ACADO IntermediateState sin(const Expression &arg)
returnValue print(std::ostream &stream=std::cout, const char *const name=DEFAULT_LABEL, const char *const startString=DEFAULT_START_STRING, const char *const endString=DEFAULT_END_STRING, uint width=DEFAULT_WIDTH, uint precision=DEFAULT_PRECISION, const char *const colSeparator=DEFAULT_COL_SEPARATOR, const char *const rowSeparator=DEFAULT_ROW_SEPARATOR) const
returnValue getX(DVector &xEnd) const
returnValue set(OptionsName name, int value)
#define USING_NAMESPACE_ACADO
Provides a time grid consisting of vector-valued optimization variables at each grid point...
Expression dot(const Expression &arg)
Implements the Runge-Kutta-45 scheme for integrating ODEs.
returnValue integrate(double t0, double tend, double *x0, double *xa=0, double *p=0, double *u=0, double *w=0)
Allows to setup and evaluate differential equations (ODEs and DAEs) based on SymbolicExpressions.