Public Member Functions | Protected Attributes | List of all members

Container class to store and pass data to the ModelData class. More...

#include <model_container.hpp>

Inheritance diagram for ModelContainer:
Inheritance graph
[legend]

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
 
ModelDatagetModelData ()
 
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
 

Detailed Description

Container class to store and pass data to the ModelData class.

TODO: Rien

Author
Rien Quirynen

Definition at line 52 of file model_container.hpp.

Constructor & Destructor Documentation

BEGIN_NAMESPACE_ACADO ModelContainer::ModelContainer ( )

Default constructor.

Definition at line 45 of file model_container.cpp.

Member Function Documentation

uint ModelContainer::addOutput ( const OutputFcn outputEquation_,
const DVector measurements 
)

Adds an output function.

Parameters
outputEquation_an output function to be added
measurementsthe measurement points per interval
\return SUCCESSFUL_RETURN

Definition at line 131 of file model_container.cpp.

uint ModelContainer::addOutput ( const OutputFcn outputEquation_,
const uint  numberMeasurements 
)

Adds an output function.

Parameters
outputEquation_an output function to be added
numberMeasurementsthe 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.

Parameters
outputThe output function to be added.
diffs_outputThe derivatives of the output function to be added.
dimThe dimension of the output function.
measurementsThe 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.

Parameters
outputThe output function to be added.
diffs_outputThe derivatives of the output function to be added.
dimThe dimension of the output function.
numberMeasurementsThe 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.

Parameters
outputThe output function to be added.
diffs_outputThe derivatives of the output function to be added.
dimThe dimension of the output function.
measurementsThe measurement points per interval
colIndDVector stores the column indices of the elements for Compressed Row Storage (CRS).
rowPtrDVector stores the locations that start a row for Compressed Row Storage (CRS).
Returns
SUCCESSFUL_RETURN

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.

Parameters
outputThe output function to be added.
diffs_outputThe derivatives of the output function to be added.
dimThe dimension of the output function.
numberMeasurementsThe number of measurements per interval
colIndDVector stores the column indices of the elements for Compressed Row Storage (CRS).
rowPtrDVector stores the locations that start a row for Compressed Row Storage (CRS).
Returns
SUCCESSFUL_RETURN

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.

Returns
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.

Parameters
[in]_gridIntegration grid.
Returns
SUCCESSFUL_RETURN

Definition at line 175 of file model_container.cpp.

returnValue ModelContainer::getModel ( DifferentialEquation _f) const

Returns the differential equations in the model.

Returns
SUCCESSFUL_RETURN

Definition at line 185 of file model_container.cpp.

ModelData & ModelContainer::getModelData ( )

Returns the model data object.

Returns
the model data object.

Definition at line 318 of file model_container.cpp.

uint ModelContainer::getN ( ) const

Returns number of control intervals.

Returns
Number of control intervals

Definition at line 266 of file model_container.cpp.

uint ModelContainer::getNDX ( ) const

Returns number of differential state derivatives.

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.

Returns
Number of parameters

Definition at line 253 of file model_container.cpp.

uint ModelContainer::getNU ( ) const

Returns number of control inputs.

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.

Returns
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.

Returns
Number of differential states

Definition at line 228 of file model_container.cpp.

uint ModelContainer::getNXA ( ) const

Returns number of algebraic states.

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.

Parameters
[in]_NX1Number of differential states in linear input subsystem.
[in]_NX2Number of differential states in nonlinear subsystem.
[in]_NX3Number of differential states in linear output subsystem.
[in]_NDXNumber of differential states derivatives.
[in]_NDX3Number of differential states derivatives in the linear output subsystem.
[in]_NXANumber of algebraic states.
[in]_NXA3Number of algebraic states in the linear output subsystem.
[in]_NUNumber of control inputs
[in]_NODNumber of online data
[in]_NPNumber of parameters
Returns
SUCCESSFUL_RETURN

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.

Parameters
[in]_NX1Number of differential states in linear input subsystem.
[in]_NX2Number of differential states in nonlinear subsystem.
[in]_NX3Number of differential states in linear output subsystem.
[in]_NDXNumber of differential states derivatives.
[in]_NXANumber of algebraic states.
[in]_NUNumber of control inputs
[in]_NODNumber of online data
[in]_NPNumber of parameters
Returns
SUCCESSFUL_RETURN

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.

Parameters
[in]_NXNumber of differential states.
[in]_NDXNumber of differential states derivatives.
[in]_NXANumber of algebraic states.
[in]_NUNumber of control inputs
[in]_NODNumber of online data
[in]_NPNumber of parameters
Returns
SUCCESSFUL_RETURN

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.

Parameters
[in]_NXNumber of differential states.
[in]_NUNumber of control inputs
[in]_NODNumber of online data
[in]_NPNumber of parameters
Returns
SUCCESSFUL_RETURN

Definition at line 67 of file model_container.cpp.

returnValue ModelContainer::setIntegrationGrid ( const Grid _ocpGrid,
const uint  _numSteps 
)

Sets integration grid.

Parameters
[in]_ocpGridEvaluation grid for optimal control.
[in]numStepsThe number of integration steps along the horizon.
Returns
SUCCESSFUL_RETURN

Definition at line 180 of file model_container.cpp.

returnValue ModelContainer::setLinearInput ( const DMatrix A1_,
const DMatrix B1_ 
)
Parameters
[in].
Returns
SUCCESSFUL_RETURN

Definition at line 92 of file model_container.cpp.

returnValue ModelContainer::setLinearInput ( const DMatrix M1_,
const DMatrix A1_,
const DMatrix B1_ 
)
Parameters
[in].
Returns
SUCCESSFUL_RETURN

Definition at line 86 of file model_container.cpp.

returnValue ModelContainer::setLinearOutput ( const DMatrix A3_,
const OutputFcn rhs_ 
)
Parameters
[in].
Returns
SUCCESSFUL_RETURN

Definition at line 105 of file model_container.cpp.

returnValue ModelContainer::setLinearOutput ( const DMatrix M3_,
const DMatrix A3_,
const OutputFcn rhs_ 
)
Parameters
[in].
Returns
SUCCESSFUL_RETURN

Definition at line 99 of file model_container.cpp.

returnValue ModelContainer::setLinearOutput ( const DMatrix A3_,
const std::string &  _rhs3,
const std::string &  _diffs_rhs3 
)
Parameters
[in].
Returns
SUCCESSFUL_RETURN

Definition at line 118 of file model_container.cpp.

returnValue ModelContainer::setLinearOutput ( const DMatrix M3_,
const DMatrix A3_,
const std::string &  _rhs3,
const std::string &  _diffs_rhs3 
)
Parameters
[in].
Returns
SUCCESSFUL_RETURN

Definition at line 112 of file model_container.cpp.

returnValue ModelContainer::setModel ( const DifferentialEquation _f)

Assigns Differential Equation to be used by the integrator.

Parameters
[in]fDifferential equation.
Returns
SUCCESSFUL_RETURN

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.

Parameters
[in]_rhs_ODEName of the function, evaluating the ODE right-hand side.
[in]_diffs_rhs_ODEName of the function, evaluating the derivatives of the ODE right-hand side.
Returns
SUCCESSFUL_RETURN

Definition at line 81 of file model_container.cpp.

returnValue ModelContainer::setModelData ( const ModelData data)

Sets the model data object.

Parameters
[in]datathe model data object.
Returns
SUCCESSFUL_RETURN

Definition at line 323 of file model_container.cpp.

returnValue ModelContainer::setN ( const uint  N_)

Sets the number of shooting intervals.

Parameters
[in]N_The number of shooting intervals.
Returns
SUCCESSFUL_RETURN

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_ 
)
Parameters
[in].
Returns
SUCCESSFUL_RETURN

Definition at line 125 of file model_container.cpp.

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.

Parameters
numberMeasurementsthe number of measurements per horizon for each output function

Returns
SUCCESSFUL_RETURN

Member Data Documentation

ModelData ModelContainer::modelData
protected

The model data.

Definition at line 442 of file model_container.hpp.

uint ModelContainer::NOD
protected

Number of online data values.

Definition at line 440 of file model_container.hpp.

uint ModelContainer::NP
protected

Number of parameters.

Definition at line 439 of file model_container.hpp.

uint ModelContainer::NU
protected

Number of control inputs.

Definition at line 438 of file model_container.hpp.


The documentation for this class was generated from the following files:


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:35:25