260 tmp.
read( fileName );
302 yRef.
print(
"yRef init" );
373 const double*
const _y,
379 return step( currentTime,tmp,_yRef );
451 yRef.
print(
"yRef feedback" );
467 uTmp.
print(
"u(0) after feedbackStep");
492 yRef.
print(
"yRef preparation" );
510 uTmp.print(
"u(0) after preparationStep");
521 double nextControlLaw =
INFTY;
522 double nextEstimator =
INFTY;
540 return acadoMin( nextControlLaw,nextEstimator );
587 int useReferencePrediction = 0;
593 Grid predictionGrid( tStart,tEnd );
594 _yRef.
init( firstVector,predictionGrid );
virtual returnValue preparationStep(double nextTime=0.0, const VariablesGrid &_yRef=emptyConstVariablesGrid)
Calculates the control inputs of the Process based on the Process outputs.
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 addItem(LogName _name, const char *const _label=DEFAULT_LABEL)
Abstract base class to define a reference trajectory that the ControlLaw aims to track.
virtual returnValue setupLogging()
Allows real time measurements based on the system's clock.
returnValue setEstimator(Estimator &_estimator)
virtual uint getNX() const
virtual returnValue step(double currentTime, const DVector &_y)=0
virtual returnValue reset()
virtual returnValue getCurrentReference(double tStart, VariablesGrid &_yRef) const
returnValue setStatus(BlockStatus _status)
BooleanType isDefined() const
returnValue initializeAlgebraicStates(const VariablesGrid &_xa_init)
virtual returnValue init(double startTime=0.0, const DVector &_x=emptyConstVector, const DVector &_xa=emptyConstVector, const DVector &_u=emptyConstVector, const DVector &_p=emptyConstVector, const DVector &_w=emptyConstVector)=0
Provides a time grid consisting of vector-valued optimization variables at each grid point...
int addLogRecord(LogRecord &record)
Allows to pass back messages to the calling function.
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
ReferenceTrajectory * referenceTrajectory
Allows to conveniently handle (one-dimensional) grids consisting of time points.
BooleanType isEmpty() const
const int defaultUseReferencePrediction
virtual returnValue obtainEstimates(double currentTime, const DVector &_y, DVector &xEst, DVector &pEst)
virtual returnValue feedbackStep(double currentTime, const DVector &_x, const DVector &_p=emptyConstVector, const VariablesGrid &_yRef=emptyConstVariablesGrid)
virtual returnValue init(double startTime=0.0, const DVector &x0_=emptyConstVector, const DVector &p_=emptyConstVector)
#define CLOSE_NAMESPACE_ACADO
virtual uint getNXA() const
returnValue getOutputs(DVector &_x, DVector &_xa, DVector &_u, DVector &_p, DVector &_w) const
virtual uint getNU() const
RealClock controlLawClock
returnValue setLast(LogName _name, const DMatrix &value, double time=-INFTY)
BlockStatus getStatus() const
virtual returnValue step(double currentTime, const DVector &_y, const VariablesGrid &_yRef=emptyConstVariablesGrid)
BooleanType isDefined() const
Controller & operator=(const Controller &rhs)
returnValue setReferenceTrajectory(ReferenceTrajectory &_referenceTrajectory)
double getSamplingTimeEstimator()
BEGIN_NAMESPACE_ACADO BooleanType acadoIsInteger(double x)
virtual returnValue initializeAlgebraicStates(const VariablesGrid &_xa_init)
virtual returnValue init(double startTime=0.0, const DVector &_x0=emptyConstVector, const DVector &_p=emptyConstVector, const VariablesGrid &_yRef=emptyConstVariablesGrid)
DVector getFirstVector() const
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
Base class for interfacing online state/parameter estimators.
virtual returnValue preparationStep(double nextTime=0.0, const VariablesGrid &_yRef=emptyConstVariablesGrid)
virtual uint getNP() const
void rhs(const real_t *x, real_t *f)
double getNextSamplingInstant(double currentTime)
double getSamplingTime() const
double getSamplingTimeControlLaw()
virtual returnValue start()
returnValue read(std::istream &stream)
int acadoMin(const int x, const int y)
Base class for building-blocks of the SimulationEnvironment.
virtual returnValue stop()
DVector getVector(uint pointIdx) const
returnValue setControlLaw(ControlLaw &_controlLaw)
Allows to setup and store user-specified log records of algorithmic information.
#define BEGIN_NAMESPACE_ACADO
virtual uint getNW() const
virtual returnValue feedbackStep(double currentTime, const DVector &_y, const VariablesGrid &_yRef=emptyConstVariablesGrid)
SimulationBlock & operator=(const SimulationBlock &rhs)
virtual returnValue setupOptions()
returnValue getU(DVector &_u) const
virtual double getLengthPredictionHorizon() const
returnValue addOption(OptionsName name, int value)
virtual returnValue init(double startTime=0.0, const DVector &_x=emptyConstVector, const DVector &_p=emptyConstVector, const VariablesGrid &_yRef=emptyConstVariablesGrid)=0
virtual returnValue step(double _currentTime, const DVector &_y, const DVector &_x=emptyConstVector, const DVector &_xa=emptyConstVector, const DVector &_u=emptyConstVector, const DVector &_p=emptyConstVector, const DVector &_w=emptyConstVector)=0
Base class for interfacing online feedback laws to be used within a Controller.
virtual returnValue getReference(double tStart, double tEnd, VariablesGrid &_yRef) const =0
#define ACADOERROR(retval)
virtual returnValue getTime(double &_elapsedTime)