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 | 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 | setupOutput (const DVector &numberMeasurements) |
Protected Attributes | |
ModelData | modelData |
Container class to store and pass data to the ModelData class.
TODO: Rien
Definition at line 52 of file model_container.hpp.
Default constructor.
Definition at line 45 of file model_container.cpp.
uint ModelContainer::addOutput | ( | const OutputFcn & | outputEquation_, |
const DVector & | measurements | ||
) |
Adds an output function.
outputEquation_ | an output function to be added |
measurements | the measurement points per interval |
Definition at line 122 of file model_container.cpp.
uint ModelContainer::addOutput | ( | const OutputFcn & | outputEquation_, |
const uint | numberMeasurements | ||
) |
Adds an output function.
outputEquation_ | an output function to be added |
numberMeasurements | the number of measurements per interval |
Definition at line 130 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 |
Definition at line 136 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 |
Definition at line 144 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 150 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 159 of file model_container.cpp.
BooleanType ModelContainer::exportRhs | ( | ) | const |
Definition at line 208 of file model_container.cpp.
DVector ModelContainer::getDimOutputs | ( | ) | const |
Returns the dimensions of the different output functions.
Definition at line 262 of file model_container.cpp.
const std::string ModelContainer::getFileNameModel | ( | ) | const |
Definition at line 274 of file model_container.cpp.
returnValue ModelContainer::getModel | ( | DifferentialEquation & | _f | ) | const |
Returns the differential equations in the model.
Definition at line 171 of file model_container.cpp.
Returns the model data object.
Definition at line 280 of file model_container.cpp.
uint ModelContainer::getN | ( | ) | const |
Returns number of control intervals.
Definition at line 249 of file model_container.cpp.
uint ModelContainer::getNDX | ( | ) | const |
Returns number of differential state derivatives.
Definition at line 220 of file model_container.cpp.
uint ModelContainer::getNOD | ( | ) | const |
Returns number of "online data" values.
Definition at line 243 of file model_container.cpp.
uint ModelContainer::getNP | ( | ) | const |
Returns number of parameters.
Definition at line 238 of file model_container.cpp.
uint ModelContainer::getNU | ( | ) | const |
Returns number of control inputs.
Definition at line 232 of file model_container.cpp.
DVector ModelContainer::getNumMeas | ( | ) | const |
Returns the number of measurements for the different output functions.
Definition at line 268 of file model_container.cpp.
uint ModelContainer::getNX | ( | ) | const |
Returns number of differential states.
Definition at line 214 of file model_container.cpp.
uint ModelContainer::getNXA | ( | ) | const |
Returns number of algebraic states.
Definition at line 226 of file model_container.cpp.
Definition at line 187 of file model_container.cpp.
Definition at line 202 of file model_container.cpp.
BooleanType ModelContainer::hasOutputs | ( | ) | const |
Definition at line 178 of file model_container.cpp.
Definition at line 196 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 49 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 54 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 59 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 64 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 166 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 68 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 78 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 285 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 255 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.
[in] | delay | The delay for the states in the NARX model. |
[in] | parms | The parameters defining the polynomial NARX model. |
Definition at line 73 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 |
ModelData ModelContainer::modelData [protected] |
The model data.
Definition at line 415 of file model_container.hpp.