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);
81 Grid timeHorizon( tStart,tEnd );
97 intAlg.
integrate( timeHorizon, xStart,xa,p,u );
103 intAlg.
getX( differentialStates );
105 cout <<
"x = " << endl << differentialStates << endl;
USING_NAMESPACE_ACADO IntermediateState sin(const Expression &arg)
#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 getX(DVector &xEnd) const
returnValue integrate(VariablesGrid *x, VariablesGrid *xa, VariablesGrid *p, VariablesGrid *u, VariablesGrid *w)
returnValue set(OptionsName name, int value)
User-interface to integrate a DynamicSystem, possibly over multiple stages.
Expression dot(const Expression &arg)
virtual returnValue addStage(const DynamicSystem &dynamicSystem_, const Grid &stageIntervals, const IntegratorType &integratorType_=INT_UNKNOWN)
USING_NAMESPACE_ACADO int main()
Allows to setup and evaluate differential equations (ODEs and DAEs) based on SymbolicExpressions.