46 const double h = 0.01;
50 const double t_end = 1.0;
55 f <<
next(x) == x - h*x + h*u*u;
68 double x_start[1] = { 1.0 };
69 double u_start[1] = { 1.0 };
76 integrator.
integrate( t_start, t_end, x_start, 0, 0, u_start );
93 integrator.
getX( differentialStates );
98 differentialStates.
print(
"x" );
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...
Allows to setup and evaluate discretized differential equations based on SymbolicExpressions.
returnValue setForwardSeed(const int &order, const DVector &xSeed, const DVector &pSeed=emptyVector, const DVector &uSeed=emptyVector, const DVector &wSeed=emptyVector)
virtual returnValue print(std::ostream &stream=std::cout, const std::string &name=DEFAULT_LABEL, const std::string &startString=DEFAULT_START_STRING, const std::string &endString=DEFAULT_END_STRING, uint width=DEFAULT_WIDTH, uint precision=DEFAULT_PRECISION, const std::string &colSeparator=DEFAULT_COL_SEPARATOR, const std::string &rowSeparator=DEFAULT_ROW_SEPARATOR) const
virtual returnValue freezeAll()
Expression next(const Expression &arg)
static DVector emptyVector
returnValue integrateSensitivities()
returnValue getForwardSensitivities(DVector &Dx, int order) const
returnValue integrate(double t0, double tend, double *x0, double *xa=0, double *p=0, double *u=0, double *w=0)
Implements a scheme for evaluating discretized ODEs.