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 double getStepLength() const
virtual int getDimX() const
returnValue addItem(LogName _name, const char *const _label=DEFAULT_LABEL)
virtual returnValue getProtectedX(DVector *xEnd) const =0
const double defaultRelaxationParameter
const double defaultMaxStepsize
virtual returnValue evaluateSensitivities()=0
int * int_parameter_index
DVector getDifferentialStateComponents() const
virtual returnValue deleteAllSeeds()
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)
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
virtual double getDifferentialEquationSampleTime() const
#define CLOSE_NAMESPACE_ACADO
virtual returnValue getProtectedBackwardSensitivities(DVector &Dx_x0, DVector &Dx_p, DVector &Dx_u, DVector &Dx_w, int order) const =0
const double defaultIntegratorTolerance
returnValue setX(const DVector &x)
Abstract base class for all kinds of algorithms for integrating differential equations (ODEs or DAEs)...
virtual BooleanType canHandleImplicitSwitches() const
virtual returnValue setupOptions()
const int defaultIntegratorPrintlevel
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)
returnValue printLogRecord(std::ostream &_stream, int idx, LogPrintMode _mode=PRINT_ITEM_BY_ITEM) const
const double defaultCorrectorTolerance
returnValue setTransition(const Transition &trs)
Derived & setZero(Index size)
virtual returnValue setupLogging()
const double defaultInitialStepsize
returnValue AD_backward(const DVector &seed, EvaluationPoint &df, const int &number=0)
const int defaultprintIntegratorProfile
virtual returnValue getProtectedForwardSensitivities(DMatrix *Dx, int order) const =0
returnValue getBackwardSensitivities(DVector &Dx_x0, DVector &Dx_p, DVector &Dx_u, DVector &Dx_w, int order) const
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 BooleanType isDifferentialEquationAffine() const
virtual returnValue diffTransitionForward(DVector &DX, const DVector &DP, const DVector &DU, const DVector &DW, const int &order)
virtual returnValue init(const DifferentialEquation &rhs)=0
double getLastTime() 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 getForwardSensitivities(DVector &Dx, 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)
virtual returnValue printRunTimeProfile() const
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)
virtual BooleanType isDifferentialEquationDefined() const
Allows to setup and evaluate differential equations (ODEs and DAEs) based on SymbolicExpressions.
DifferentialEquation * rhs