78 h = (
double*)calloc(1,
sizeof(
double));
191 returnvalue =
init( rhs_ );
215 Grid t_( t0_, tend_, 2 );
236 return integrate( t_, tmpX, tmpXA, tmpP, tmpU, tmpW );
249 Grid t_( t0_, tend_, 2 );
270 const int N = components.
getDim();
274 for( run1 = 0; run1 < (int) components.
getDim(); run1++ )
275 tmpX(run1) = x0((
int) components(run1));
282 returnvalue =
evaluate( tmpX, xa, p, u, w, t_ );
293 for( run1 = 0; run1 <
N; run1++ )
294 xE((
int) components(run1)) = tmp(run1);
296 for( run1 = N; run1 < N +
ma; run1++ )
297 xE(run1) = tmp(run1);
325 if( xSeed.
getDim() != 0 ){
328 for( run1 = 0; run1 < (int) components.
getDim(); run1++ )
329 tmpX(run1) = xSeed((
int) components(run1));
348 tmp.
init( components.getDim() );
349 for( run1 = 0; run1 < components.getDim(); run1++ )
350 tmp(run1) = seed((
int) components(run1));
394 for( run1 = 0; run1 < components.
getDim(); run1++ )
395 dX((
int) components(run1)) = tmp(run1,0);
443 for( run2 = 0; run2 < (int) components.
getDim(); run2++ )
444 DX((
int) components(run2)) = tmpX(run2);
446 for( run2 = 0; run2 < (int)
dPb.
getDim(); run2++ )
447 DP(run2) +=
dPb(run2);
449 for( run2 = 0; run2 < (int)
dUb.
getDim(); run2++ )
450 DU(run2) +=
dUb(run2);
452 for( run2 = 0; run2 < (int)
dWb.
getDim(); run2++ )
453 DW(run2) +=
dWb(run2);
virtual BooleanType canHandleImplicitSwitches() const
DVector getDifferentialStateComponents() const
returnValue addItem(LogName _name, const char *const _label=DEFAULT_LABEL)
virtual returnValue getProtectedX(DVector *xEnd) const =0
const double defaultRelaxationParameter
double getLastTime() const
const double defaultMaxStepsize
virtual returnValue evaluateSensitivities()=0
int * int_parameter_index
virtual returnValue deleteAllSeeds()
returnValue printLogRecord(std::ostream &_stream, int idx, LogPrintMode _mode=PRINT_ITEM_BY_ITEM) const
void init(unsigned _dim=0)
Provides a time grid consisting of vector-valued optimization variables at each grid point...
Allows to pass back messages to the calling function.
DVector evaluate(const EvaluationPoint &x, const int &number=0)
virtual returnValue printRunTimeProfile() const
Base class for all algorithmic modules within the ACADO Toolkit providing some basic functionality...
Allows to setup function evaluation points.
const double defaultStepsizeTuning
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
virtual int getDim() const =0
const double defaultMinStepsize
Allows to conveniently handle (one-dimensional) grids consisting of time points.
const int defaultMaxNumSteps
#define CLOSE_NAMESPACE_ACADO
virtual returnValue getProtectedBackwardSensitivities(DVector &Dx_x0, DVector &Dx_p, DVector &Dx_u, DVector &Dx_w, int order) const =0
returnValue getForwardSensitivities(DVector &Dx, int order) const
const double defaultIntegratorTolerance
returnValue setX(const DVector &x)
Abstract base class for all kinds of algorithms for integrating differential equations (ODEs or DAEs)...
virtual double getDifferentialEquationSampleTime() const
virtual returnValue setupOptions()
const int defaultIntegratorPrintlevel
virtual BooleanType isDifferentialEquationAffine() const
returnValue setForwardSeed(const int &order, const DVector &xSeed, const DVector &pSeed=emptyVector, const DVector &uSeed=emptyVector, const DVector &wSeed=emptyVector)
returnValue setT(const double &t)
const double defaultCorrectorTolerance
returnValue setTransition(const Transition &trs)
Derived & setZero(Index size)
virtual returnValue setupLogging()
const double defaultInitialStepsize
virtual double getStepLength() const
returnValue AD_backward(const DVector &seed, EvaluationPoint &df, const int &number=0)
const int defaultprintIntegratorProfile
virtual returnValue getProtectedForwardSensitivities(DMatrix *Dx, int order) const =0
const int defaultAlgebraicRelaxation
virtual returnValue setProtectedForwardSeed(const DVector &xSeed, const DVector &pSeed, const DVector &uSeed, const DVector &wSeed, const int &order)=0
DVector AD_forward(const EvaluationPoint &x, const int &number=0)
Allows to setup and evaluate transition functions based on SymbolicExpressions.
virtual returnValue diffTransitionForward(DVector &DX, const DVector &DP, const DVector &DU, const DVector &DW, const int &order)
virtual int getDimX() const
virtual returnValue init(const DifferentialEquation &rhs)=0
virtual BooleanType isDifferentialEquationDefined() const
Allows to setup and store user-specified log records of algorithmic information.
virtual returnValue diffTransitionBackward(DVector &DX, DVector &DP, DVector &DU, DVector &DW, int &order)
#define BEGIN_NAMESPACE_ACADO
int addLogRecord(LogRecord &_record)
returnValue integrateSensitivities()
const int defaultLinearAlgebraSolver
returnValue getBackwardSensitivities(DVector &Dx_x0, DVector &Dx_p, DVector &Dx_u, DVector &Dx_w, int order) const
virtual returnValue evaluate(const DVector &x0, const DVector &xa, const DVector &p, const DVector &u, const DVector &w, const Grid &t_)=0
virtual returnValue evaluateTransition(const double time, DVector &xd, const DVector &xa, const DVector &p, const DVector &u, const DVector &w)
returnValue setBackwardSeed(const int &order, const DVector &seed)
returnValue addOption(OptionsName name, int value)
virtual returnValue setProtectedBackwardSeed(const DVector &seed, const int &order)=0
const double defaultAbsoluteTolerance
returnValue integrate(double t0, double tend, double *x0, double *xa=0, double *p=0, double *u=0, double *w=0)
#define ACADOERROR(retval)
Allows to setup and evaluate differential equations (ODEs and DAEs) based on SymbolicExpressions.
DifferentialEquation * rhs