108 int nStart = (int)floor( (
double) (tStart/T+100.0*
EPS) );
109 int nEnd = (int)floor( (
double) (tEnd /T-100.0*
EPS) );
111 if ( nStart == nEnd )
113 _yRef = (
yRef.
getTimeSubGrid( tStart-T*(
double)nStart,tEnd-T*(
double)nStart )).shiftTimes( T*(
double)nStart );
119 for(
int i=nStart+1; i<nEnd; ++i )
VariablesGrid & shiftTimes(double timeShift)
StaticReferenceTrajectory & operator=(const StaticReferenceTrajectory &rhs)
Allows to define a static periodic reference trajectory that the ControlLaw aims to track...
USING_NAMESPACE_ACADO typedef TaylorVariable< Interval > T
Abstract base class to define a reference trajectory that the ControlLaw aims to track.
double getFirstTime() const
BEGIN_NAMESPACE_ACADO const double EPS
Provides a time grid consisting of vector-valued optimization variables at each grid point...
Allows to pass back messages to the calling function.
virtual returnValue getReference(double tStart, double tEnd, VariablesGrid &_yRef) const
PeriodicReferenceTrajectory & operator=(const PeriodicReferenceTrajectory &rhs)
#define CLOSE_NAMESPACE_ACADO
VariablesGrid getTimeSubGrid(uint startIdx, uint endIdx) const
PeriodicReferenceTrajectory()
returnValue appendTimes(const VariablesGrid &arg, MergeMethod _mergeMethod=MM_DUPLICATE)
virtual ReferenceTrajectory * clone() const
Allows to define a static reference trajectory that the ControlLaw aims to track. ...
void rhs(const real_t *x, real_t *f)
virtual ~PeriodicReferenceTrajectory()
double getLastTime() const
#define BEGIN_NAMESPACE_ACADO
BooleanType acadoIsStrictlyGreater(double x, double y, double TOL)
#define ACADOERROR(retval)