Container class to store and pass data to the ModelData class. More...
#include <model_container.hpp>
Public Member Functions | |
uint | addOutput (const OutputFcn &outputEquation_, const DVector &measurements) |
uint | addOutput (const OutputFcn &outputEquation_, const uint numberMeasurements) |
uint | addOutput (const std::string &output, const std::string &diffs_output, const uint dim, const DVector &measurements) |
uint | addOutput (const std::string &output, const std::string &diffs_output, const uint dim, const uint numberMeasurements) |
uint | addOutput (const std::string &output, const std::string &diffs_output, const uint dim, const DVector &measurements, const std::string &colInd, const std::string &rowPtr) |
uint | addOutput (const std::string &output, const std::string &diffs_output, const uint dim, const uint numberMeasurements, const std::string &colInd, const std::string &rowPtr) |
BooleanType | exportRhs () const |
DVector | getDimOutputs () const |
const std::string | getFileNameModel () const |
returnValue | getIntegrationGrid (Grid &_grid) const |
returnValue | getModel (DifferentialEquation &_f) const |
ModelData & | getModelData () |
uint | getN () const |
uint | getNDX () const |
uint | getNOD () const |
uint | getNP () const |
uint | getNU () const |
DVector | getNumMeas () const |
uint | getNX () const |
uint | getNXA () const |
BooleanType | hasDifferentialEquation () const |
BooleanType | hasEquidistantControlGrid () const |
BooleanType | hasOutputs () const |
ModelContainer () | |
BooleanType | modelDimensionsSet () const |
returnValue | setDimensions (uint _NX1, uint _NX2, uint _NX3, uint _NDX, uint _NDX3, uint _NXA, uint _NXA3, uint _NU, uint _NOD, uint _NP) |
returnValue | setDimensions (uint _NX1, uint _NX2, uint _NX3, uint _NDX, uint _NXA, uint _NU, uint _NOD, uint _NP) |
returnValue | setDimensions (uint _NX, uint _NDX, uint _NXA, uint _NU, uint _NOD, uint _NP) |
returnValue | setDimensions (uint _NX, uint _NU, uint _NOD, uint _NP) |
returnValue | setIntegrationGrid (const Grid &_ocpGrid, const uint _numSteps) |
returnValue | setLinearInput (const DMatrix &A1_, const DMatrix &B1_) |
returnValue | setLinearInput (const DMatrix &M1_, const DMatrix &A1_, const DMatrix &B1_) |
returnValue | setLinearOutput (const DMatrix &A3_, const OutputFcn &rhs_) |
returnValue | setLinearOutput (const DMatrix &M3_, const DMatrix &A3_, const OutputFcn &rhs_) |
returnValue | setLinearOutput (const DMatrix &A3_, const std::string &_rhs3, const std::string &_diffs_rhs3) |
returnValue | setLinearOutput (const DMatrix &M3_, const DMatrix &A3_, const std::string &_rhs3, const std::string &_diffs_rhs3) |
returnValue | setModel (const DifferentialEquation &_f) |
returnValue | setModel (const std::string &fileName, const std::string &_rhs_ODE, const std::string &_diffs_rhs_ODE) |
returnValue | setModelData (const ModelData &data) |
returnValue | setN (const uint N_) |
returnValue | setNARXmodel (const uint _delay, const DMatrix &_parms) |
returnValue | setNOD (const uint NOD_) |
returnValue | setNonlinearFeedback (const DMatrix &C_, const OutputFcn &feedb_) |
returnValue | setNP (const uint NP_) |
returnValue | setNU (const uint NU_) |
returnValue | setupOutput (const DVector &numberMeasurements) |
Protected Attributes | |
ModelData | modelData |
uint | NOD |
uint | NP |
uint | NU |
Container class to store and pass data to the ModelData class.
TODO: Rien
Definition at line 52 of file model_container.hpp.
BEGIN_NAMESPACE_ACADO ModelContainer::ModelContainer | ( | ) |
Default constructor.
Definition at line 45 of file model_container.cpp.
Adds an output function.
outputEquation_ | an output function to be added |
measurements | the measurement points per interval \return SUCCESSFUL_RETURN |
Definition at line 131 of file model_container.cpp.
Adds an output function.
outputEquation_ | an output function to be added |
numberMeasurements | the number of measurements per interval \return SUCCESSFUL_RETURN |
Definition at line 139 of file model_container.cpp.
uint ModelContainer::addOutput | ( | const std::string & | output, |
const std::string & | diffs_output, | ||
const uint | dim, | ||
const DVector & | measurements | ||
) |
Adds an output function.
output | The output function to be added. |
diffs_output | The derivatives of the output function to be added. |
dim | The dimension of the output function. |
measurements | The measurement points per interval \return SUCCESSFUL_RETURN |
Definition at line 145 of file model_container.cpp.
uint ModelContainer::addOutput | ( | const std::string & | output, |
const std::string & | diffs_output, | ||
const uint | dim, | ||
const uint | numberMeasurements | ||
) |
Adds an output function.
output | The output function to be added. |
diffs_output | The derivatives of the output function to be added. |
dim | The dimension of the output function. |
numberMeasurements | The number of measurements per interval \return SUCCESSFUL_RETURN |
Definition at line 153 of file model_container.cpp.
uint ModelContainer::addOutput | ( | const std::string & | output, |
const std::string & | diffs_output, | ||
const uint | dim, | ||
const DVector & | measurements, | ||
const std::string & | colInd, | ||
const std::string & | rowPtr | ||
) |
Adds an output function.
output | The output function to be added. |
diffs_output | The derivatives of the output function to be added. |
dim | The dimension of the output function. |
measurements | The measurement points per interval |
colInd | DVector stores the column indices of the elements for Compressed Row Storage (CRS). |
rowPtr | DVector stores the locations that start a row for Compressed Row Storage (CRS). |
Definition at line 159 of file model_container.cpp.
uint ModelContainer::addOutput | ( | const std::string & | output, |
const std::string & | diffs_output, | ||
const uint | dim, | ||
const uint | numberMeasurements, | ||
const std::string & | colInd, | ||
const std::string & | rowPtr | ||
) |
Adds an output function.
output | The output function to be added. |
diffs_output | The derivatives of the output function to be added. |
dim | The dimension of the output function. |
numberMeasurements | The number of measurements per interval |
colInd | DVector stores the column indices of the elements for Compressed Row Storage (CRS). |
rowPtr | DVector stores the locations that start a row for Compressed Row Storage (CRS). |
Definition at line 168 of file model_container.cpp.
BooleanType ModelContainer::exportRhs | ( | ) | const |
Definition at line 222 of file model_container.cpp.
DVector ModelContainer::getDimOutputs | ( | ) | const |
Returns the dimensions of the different output functions.
Definition at line 300 of file model_container.cpp.
const std::string ModelContainer::getFileNameModel | ( | ) | const |
Definition at line 312 of file model_container.cpp.
returnValue ModelContainer::getIntegrationGrid | ( | Grid & | _grid | ) | const |
Gets integration grid.
[in] | _grid | Integration grid. |
Definition at line 175 of file model_container.cpp.
returnValue ModelContainer::getModel | ( | DifferentialEquation & | _f | ) | const |
Returns the differential equations in the model.
Definition at line 185 of file model_container.cpp.
ModelData & ModelContainer::getModelData | ( | ) |
Returns the model data object.
Definition at line 318 of file model_container.cpp.
uint ModelContainer::getN | ( | ) | const |
Returns number of control intervals.
Definition at line 266 of file model_container.cpp.
uint ModelContainer::getNDX | ( | ) | const |
Returns number of differential state derivatives.
Definition at line 234 of file model_container.cpp.
uint ModelContainer::getNOD | ( | ) | const |
Returns number of "online data" values.
Definition at line 259 of file model_container.cpp.
uint ModelContainer::getNP | ( | ) | const |
Returns number of parameters.
Definition at line 253 of file model_container.cpp.
uint ModelContainer::getNU | ( | ) | const |
Returns number of control inputs.
Definition at line 246 of file model_container.cpp.
DVector ModelContainer::getNumMeas | ( | ) | const |
Returns the number of measurements for the different output functions.
Definition at line 306 of file model_container.cpp.
uint ModelContainer::getNX | ( | ) | const |
Returns number of differential states.
Definition at line 228 of file model_container.cpp.
uint ModelContainer::getNXA | ( | ) | const |
Returns number of algebraic states.
Definition at line 240 of file model_container.cpp.
BooleanType ModelContainer::hasDifferentialEquation | ( | ) | const |
Definition at line 201 of file model_container.cpp.
BooleanType ModelContainer::hasEquidistantControlGrid | ( | ) | const |
Definition at line 216 of file model_container.cpp.
BooleanType ModelContainer::hasOutputs | ( | ) | const |
Definition at line 192 of file model_container.cpp.
BooleanType ModelContainer::modelDimensionsSet | ( | ) | const |
Definition at line 210 of file model_container.cpp.
returnValue ModelContainer::setDimensions | ( | uint | _NX1, |
uint | _NX2, | ||
uint | _NX3, | ||
uint | _NDX, | ||
uint | _NDX3, | ||
uint | _NXA, | ||
uint | _NXA3, | ||
uint | _NU, | ||
uint | _NOD, | ||
uint | _NP | ||
) |
Assigns the model dimensions to be used by the integrator.
[in] | _NX1 | Number of differential states in linear input subsystem. |
[in] | _NX2 | Number of differential states in nonlinear subsystem. |
[in] | _NX3 | Number of differential states in linear output subsystem. |
[in] | _NDX | Number of differential states derivatives. |
[in] | _NDX3 | Number of differential states derivatives in the linear output subsystem. |
[in] | _NXA | Number of algebraic states. |
[in] | _NXA3 | Number of algebraic states in the linear output subsystem. |
[in] | _NU | Number of control inputs |
[in] | _NOD | Number of online data |
[in] | _NP | Number of parameters |
Definition at line 52 of file model_container.cpp.
returnValue ModelContainer::setDimensions | ( | uint | _NX1, |
uint | _NX2, | ||
uint | _NX3, | ||
uint | _NDX, | ||
uint | _NXA, | ||
uint | _NU, | ||
uint | _NOD, | ||
uint | _NP | ||
) |
Assigns the model dimensions to be used by the integrator.
[in] | _NX1 | Number of differential states in linear input subsystem. |
[in] | _NX2 | Number of differential states in nonlinear subsystem. |
[in] | _NX3 | Number of differential states in linear output subsystem. |
[in] | _NDX | Number of differential states derivatives. |
[in] | _NXA | Number of algebraic states. |
[in] | _NU | Number of control inputs |
[in] | _NOD | Number of online data |
[in] | _NP | Number of parameters |
Definition at line 57 of file model_container.cpp.
returnValue ModelContainer::setDimensions | ( | uint | _NX, |
uint | _NDX, | ||
uint | _NXA, | ||
uint | _NU, | ||
uint | _NOD, | ||
uint | _NP | ||
) |
Assigns the model dimensions to be used by the integrator.
[in] | _NX | Number of differential states. |
[in] | _NDX | Number of differential states derivatives. |
[in] | _NXA | Number of algebraic states. |
[in] | _NU | Number of control inputs |
[in] | _NOD | Number of online data |
[in] | _NP | Number of parameters |
Definition at line 62 of file model_container.cpp.
returnValue ModelContainer::setDimensions | ( | uint | _NX, |
uint | _NU, | ||
uint | _NOD, | ||
uint | _NP | ||
) |
Assigns the model dimensions to be used by the integrator.
[in] | _NX | Number of differential states. |
[in] | _NU | Number of control inputs |
[in] | _NOD | Number of online data |
[in] | _NP | Number of parameters |
Definition at line 67 of file model_container.cpp.
returnValue ModelContainer::setIntegrationGrid | ( | const Grid & | _ocpGrid, |
const uint | _numSteps | ||
) |
Sets integration grid.
[in] | _ocpGrid | Evaluation grid for optimal control. |
[in] | numSteps | The number of integration steps along the horizon. |
Definition at line 180 of file model_container.cpp.
returnValue ModelContainer::setLinearInput | ( | const DMatrix & | A1_, |
const DMatrix & | B1_ | ||
) |
returnValue ModelContainer::setLinearInput | ( | const DMatrix & | M1_, |
const DMatrix & | A1_, | ||
const DMatrix & | B1_ | ||
) |
returnValue ModelContainer::setLinearOutput | ( | const DMatrix & | A3_, |
const OutputFcn & | rhs_ | ||
) |
returnValue ModelContainer::setLinearOutput | ( | const DMatrix & | M3_, |
const DMatrix & | A3_, | ||
const OutputFcn & | rhs_ | ||
) |
returnValue ModelContainer::setLinearOutput | ( | const DMatrix & | A3_, |
const std::string & | _rhs3, | ||
const std::string & | _diffs_rhs3 | ||
) |
returnValue ModelContainer::setLinearOutput | ( | const DMatrix & | M3_, |
const DMatrix & | A3_, | ||
const std::string & | _rhs3, | ||
const std::string & | _diffs_rhs3 | ||
) |
returnValue ModelContainer::setModel | ( | const DifferentialEquation & | _f | ) |
Assigns Differential Equation to be used by the integrator.
[in] | f | Differential equation. |
Definition at line 71 of file model_container.cpp.
returnValue ModelContainer::setModel | ( | const std::string & | fileName, |
const std::string & | _rhs_ODE, | ||
const std::string & | _diffs_rhs_ODE | ||
) |
Assigns the model to be used by the integrator.
[in] | _rhs_ODE | Name of the function, evaluating the ODE right-hand side. |
[in] | _diffs_rhs_ODE | Name of the function, evaluating the derivatives of the ODE right-hand side. |
Definition at line 81 of file model_container.cpp.
returnValue ModelContainer::setModelData | ( | const ModelData & | data | ) |
Sets the model data object.
[in] | data | the model data object. |
Definition at line 323 of file model_container.cpp.
returnValue ModelContainer::setN | ( | const uint | N_ | ) |
Sets the number of shooting intervals.
[in] | N_ | The number of shooting intervals. |
Definition at line 272 of file model_container.cpp.
returnValue ModelContainer::setNARXmodel | ( | const uint | _delay, |
const DMatrix & | _parms | ||
) |
Assigns a polynomial NARX model to be used by the integrator.
@param[in] delay The delay for the states in the NARX model. @param[in] parms The parameters defining the polynomial NARX model. \return SUCCESSFUL_RETURN
Definition at line 76 of file model_container.cpp.
returnValue ModelContainer::setNOD | ( | const uint | NOD_ | ) |
Definition at line 292 of file model_container.cpp.
returnValue ModelContainer::setNonlinearFeedback | ( | const DMatrix & | C_, |
const OutputFcn & | feedb_ | ||
) |
returnValue ModelContainer::setNP | ( | const uint | NP_ | ) |
Definition at line 285 of file model_container.cpp.
returnValue ModelContainer::setNU | ( | const uint | NU_ | ) |
Definition at line 278 of file model_container.cpp.
returnValue ModelContainer::setupOutput | ( | const DVector & | numberMeasurements | ) |
Sets up the output functions.
numberMeasurements | the number of measurements per horizon for each output function |
|
protected |
The model data.
Definition at line 442 of file model_container.hpp.
|
protected |
Number of online data values.
Definition at line 440 of file model_container.hpp.
|
protected |
Number of parameters.
Definition at line 439 of file model_container.hpp.
|
protected |
Number of control inputs.
Definition at line 438 of file model_container.hpp.