ACADO Toolkit
1.2.0beta
Toolkit for Automatic Control and Dynamic Optimization
|
Data class for defining static optimization problems. More...
#include <nlp.hpp>
Public Member Functions | |
NLP () | |
Default constructor. | |
NLP (const NLP &rhs) | |
Copy constructor (deep copy). | |
virtual | ~NLP () |
Destructor. | |
NLP & | operator= (const NLP &rhs) |
Assignment operator (deep copy). | |
returnValue | minimize (const Expression &arg) |
returnValue | minimize (const int &multiObjectiveIdx, const Expression &arg) |
returnValue | minimizeMayerTerm (const Expression &arg) |
Adds an expression as a the Mayer term to be minimized. | |
returnValue | minimizeMayerTerm (const int &multiObjectiveIdx, const Expression &arg) |
Adds an expression as a the Mayer term to be minimized. | |
returnValue | maximizeMayerTerm (const Expression &arg) |
Adds an expression as a the Mayer term to be maximized. | |
returnValue | minimizeLagrangeTerm (const Expression &arg) |
Adds an expression as a the Lagrange term to be minimized. | |
returnValue | maximizeLagrangeTerm (const Expression &arg) |
Adds an expression as a the Lagrange term to be maximized. | |
returnValue | subjectTo (const DifferentialEquation &differentialEquation_) |
Adds an differential equation (as a continuous equality constraint). | |
returnValue | subjectTo (const ConstraintComponent &component) |
Adds a (continuous) constraint. | |
returnValue | subjectTo (const int index_, const ConstraintComponent &component) |
returnValue | subjectTo (const TimeHorizonElement index_, const ConstraintComponent &component) |
Adds a (discrete) contraint. | |
returnValue | subjectTo (const double lb_, const Expression &arg1, const Expression &arg2, const double ub_) |
Add a coupled boundary constraint. | |
returnValue | subjectTo (const double lb_, const Expression *arguments, const double ub_) |
Add a custom constraint. | |
int | getNumberOfMayerTerms () const |
returnValue | setDimensions (uint _NX1, uint _NX2, uint _NX3, uint _NDX, uint _NDX3, uint _NXA, uint _NXA3, uint _NU, uint _NP) |
Assigns the model dimensions to be used by the integrator. | |
returnValue | setDimensions (uint _NX1, uint _NX2, uint _NX3, uint _NDX, uint _NDX3, uint _NXA, uint _NXA3, uint _NU) |
returnValue | setDimensions (uint _NX1, uint _NX2, uint _NX3, uint _NDX, uint _NXA, uint _NU, uint _NP) |
Assigns the model dimensions to be used by the integrator. | |
returnValue | setDimensions (uint _NX1, uint _NX2, uint _NX3, uint _NDX, uint _NXA, uint _NU) |
returnValue | setDimensions (uint _NX, uint _NDX, uint _NXA, uint _NU, uint _NP) |
Assigns the model dimensions to be used by the integrator. | |
returnValue | setDimensions (uint _NX, uint _NDX, uint _NXA, uint _NU) |
returnValue | setDimensions (uint _NX, uint _NU, uint _NP) |
Assigns the model dimensions to be used by the integrator. | |
returnValue | setDimensions (uint _NX, uint _NU) |
returnValue | setModel (const DifferentialEquation &_f) |
Assigns Differential Equation to be used by the integrator. | |
returnValue | setModel (const String &fileName, const String &_rhs_ODE, const String &_diffs_rhs_ODE) |
Assigns the model to be used by the integrator. | |
returnValue | setNARXmodel (const uint _delay, const Matrix &_parms) |
Assigns a polynomial NARX model to be used by the integrator. | |
returnValue | setLinearInput (const Matrix &A1_, const Matrix &B1_) |
| |
returnValue | setLinearInput (const Matrix &M1_, const Matrix &A1_, const Matrix &B1_) |
| |
returnValue | setLinearOutput (const Matrix &A3_, const OutputFcn &rhs_) |
| |
returnValue | setLinearOutput (const Matrix &M3_, const Matrix &A3_, const OutputFcn &rhs_) |
| |
returnValue | setLinearOutput (const Matrix &A3_, const String &_rhs3, const String &_diffs_rhs3) |
| |
returnValue | setLinearOutput (const Matrix &M3_, const Matrix &A3_, const String &_rhs3, const String &_diffs_rhs3) |
| |
uint | addOutput (const OutputFcn &outputEquation_, const Vector &measurements) |
Adds an output function. | |
uint | addOutput (const OutputFcn &outputEquation_, const uint numberMeasurements) |
Adds an output function. | |
uint | addOutput (const String &output, const String &diffs_output, const uint dim, const Vector &measurements) |
Adds an output function. | |
uint | addOutput (const String &output, const String &diffs_output, const uint dim, const uint numberMeasurements) |
Adds an output function. | |
uint | addOutput (const String &output, const String &diffs_output, const uint dim, const Vector &measurements, const String &colInd, const String &rowPtr) |
Adds an output function. | |
uint | addOutput (const String &output, const String &diffs_output, const uint dim, const uint numberMeasurements, const String &colInd, const String &rowPtr) |
Adds an output function. | |
returnValue | setIntegrationGrid (const Grid &_ocpGrid, const uint _numSteps) |
Sets integration grid. | |
returnValue | setupOutput (const Vector &numberMeasurements) |
Sets up the output functions. | |
returnValue | getModel (DifferentialEquation &_f) const |
Returns the differential equations in the model. | |
BooleanType | hasOutputs () const |
BooleanType | hasDifferentialEquation () const |
BooleanType | modelDimensionsSet () const |
BooleanType | hasEquidistantControlGrid () const |
BooleanType | exportRhs () const |
uint | getNX () const |
Returns number of differential states. | |
uint | getNDX () const |
Returns number of differential state derivatives. | |
uint | getNXA () const |
Returns number of algebraic states. | |
uint | getNU () const |
Returns number of control inputs. | |
uint | getNP () const |
Returns number of parameters. | |
uint | getN () const |
Returns number of control intervals. | |
returnValue | setN (const uint N_) |
Sets the number of shooting intervals. | |
Vector | getDimOutputs () const |
Returns the dimensions of the different output functions. | |
Vector | getNumMeas () const |
Returns the number of measurements for the different output functions. | |
ModelData & | getModelData () |
Returns the model data object. | |
returnValue | setModelData (const ModelData &data) |
Sets the model data object. | |
const String | getFileNameModel () const |
Least Squares terms. | |
Adds a Least Square term of the form \begin{equation*} \frac{1}{2} \sum_i \Vert h(t_i,x(t_i),u(t_i),p(t_i),...) - r \Vert^2_{S_{i}} \end{equation*} Here the sum is over all grid points of the objective grid. The Matrix \( S \) is assumed to be symmetric and positive (semi-) definite. The Function \( r \) is called reference and can be specified by the user. The function \( h \) is a standard Function.
| |
returnValue | minimizeLSQ (const Matrix &S, const Function &h, const Vector &r) |
returnValue | minimizeLSQ (const Function &h, const Vector &r) |
returnValue | minimizeLSQ (const Function &h) |
returnValue | minimizeLSQ (const MatrixVariablesGrid &S, const Function &h, const VariablesGrid &r) |
returnValue | minimizeLSQ (const Matrix &S, const Function &h, const VariablesGrid &r) |
returnValue | minimizeLSQ (const Function &h, const VariablesGrid &r) |
returnValue | minimizeLSQ (const MatrixVariablesGrid &S, const Function &h, const char *rFilename) |
returnValue | minimizeLSQ (const Matrix &S, const Function &h, const char *rFilename) |
returnValue | minimizeLSQ (const Function &h, const char *rFilename) |
returnValue | minimizeLSQ (const ExportVariable &S, const Function &h) |
returnValue | minimizeLSQ (const ExportVariable &S, const String &h) |
Least Squares end terms. | |
Adds an Least Square term that is only evaluated at the end: \begin{equation*} \frac{1}{2} \Vert( m(T,x(T),u(T),p(T),...) - r )\Vert^2_S \end{equation*} where \( S \) is a weighting matrix, \( r \) a reference vector and \( T \) the time at the last objective grid point. The function \( m \) is a standard Function.
| |
returnValue | minimizeLSQEndTerm (const Matrix &S, const Function &m, const Vector &r) |
returnValue | minimizeLSQEndTerm (const Function &m, const Vector &r) |
returnValue | minimizeLSQEndTerm (const ExportVariable &S) |
returnValue | minimizeLSQEndTerm (const ExportVariable &S, const Function &m) |
returnValue | minimizeLSQEndTerm (const ExportVariable &S, const String &m) |
Helper functions. | |
BooleanType | hasObjective () const |
BooleanType | hasConstraint () const |
returnValue | getGrid (Grid &grid_) const |
returnValue | getObjective (Objective &objective_) const |
returnValue | getObjective (const int &multiObjectiveIdx, Expression **arg) const |
returnValue | getConstraint (Constraint &constraint_) const |
returnValue | setObjective (const Objective &objective_) |
returnValue | setConstraint (const Constraint &constraint_) |
returnValue | setNumberIntegrationSteps (const uint numSteps) |
virtual BooleanType | hasEquidistantGrid () const |
Returns whether the ocp grid is equidistant. | |
double | getStartTime () const |
double | getEndTime () const |
Set linear terms in the LSQ formulation. | |
returnValue | minimizeLSQLinearTerms (const Vector &Slx, const Vector &Slu) |
Applicable only for automatic code generation. | |
returnValue | minimizeLSQLinearTerms (const ExportVariable &Slx, const ExportVariable &Slu) |
Applicable only for automatic code generation. | |
Protected Member Functions | |
void | setupGrid (double tStart, double tEnd, int N) |
void | setupGrid (const Vector ×) |
void | copy (const OCP &rhs) |
Protected Attributes | |
Grid | grid |
Common discretization grid. | |
Objective | objective |
The Objective. | |
Constraint | constraint |
The Constraints. | |
int | nMayer |
Expression ** | mayerTerms |
ModelData | modelData |
The model data. |
The class NLP is a data class for defining static optimization problems.
NLP::~NLP | ( | ) | [virtual] |
uint ModelContainer::addOutput | ( | const OutputFcn & | outputEquation_, |
const Vector & | measurements | ||
) | [inherited] |
outputEquation_ | an output function to be added |
measurements | the measurement points per interval |
References ModelData::addOutput(), Vector::append(), and ModelContainer::modelData.
uint ModelContainer::addOutput | ( | const OutputFcn & | outputEquation_, |
const uint | numberMeasurements | ||
) | [inherited] |
outputEquation_ | an output function to be added |
numberMeasurements | the number of measurements per interval |
References ModelData::addOutput(), and ModelContainer::modelData.
uint ModelContainer::addOutput | ( | const String & | output, |
const String & | diffs_output, | ||
const uint | dim, | ||
const Vector & | measurements | ||
) | [inherited] |
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 |
References ModelData::addOutput(), Vector::append(), and ModelContainer::modelData.
uint ModelContainer::addOutput | ( | const String & | output, |
const String & | diffs_output, | ||
const uint | dim, | ||
const uint | numberMeasurements | ||
) | [inherited] |
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 |
References ModelData::addOutput(), and ModelContainer::modelData.
uint ModelContainer::addOutput | ( | const String & | output, |
const String & | diffs_output, | ||
const uint | dim, | ||
const Vector & | measurements, | ||
const String & | colInd, | ||
const String & | rowPtr | ||
) | [inherited] |
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 | Vector stores the column indices of the elements for Compressed Row Storage (CRS). |
rowPtr | Vector stores the locations that start a row for Compressed Row Storage (CRS). |
References ModelData::addOutput(), Vector::append(), and ModelContainer::modelData.
uint ModelContainer::addOutput | ( | const String & | output, |
const String & | diffs_output, | ||
const uint | dim, | ||
const uint | numberMeasurements, | ||
const String & | colInd, | ||
const String & | rowPtr | ||
) | [inherited] |
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 | Vector stores the column indices of the elements for Compressed Row Storage (CRS). |
rowPtr | Vector stores the locations that start a row for Compressed Row Storage (CRS). |
References ModelData::addOutput(), and ModelContainer::modelData.
References OCP::constraint, OCP::grid, ModelContainer::modelData, and OCP::objective.
Referenced by OCP::OCP(), and OCP::operator=().
BooleanType ModelContainer::exportRhs | ( | ) | const [inherited] |
References ModelData::exportRhs(), and ModelContainer::modelData.
returnValue OCP::getConstraint | ( | Constraint & | constraint_ | ) | const [inherited] |
References OCP::constraint, and SUCCESSFUL_RETURN.
Referenced by OptimizationAlgorithmBase::extractOCPdata(), ExportNLPSolver::setConstraints(), and MultiObjectiveAlgorithm::solve().
Vector ModelContainer::getDimOutputs | ( | ) | const [inherited] |
References ModelData::getDimOutputs(), and ModelContainer::modelData.
Referenced by SIMexport::exportAcadoHeader().
double OCP::getEndTime | ( | ) | const [inherited] |
References Grid::getLastTime(), and OCP::grid.
Referenced by OptimizationAlgorithmBase::getEndTime().
const String ModelContainer::getFileNameModel | ( | ) | const [inherited] |
References ModelData::getFileNameModel(), and ModelContainer::modelData.
returnValue OCP::getGrid | ( | Grid & | grid_ | ) | const [inherited] |
returnValue ModelContainer::getModel | ( | DifferentialEquation & | _f | ) | const [inherited] |
References ModelData::getModel(), ModelContainer::modelData, and SUCCESSFUL_RETURN.
Referenced by OCPexport::checkConsistency(), and OptimizationAlgorithmBase::extractOCPdata().
ModelData & ModelContainer::getModelData | ( | ) | [inherited] |
References ModelContainer::modelData.
Referenced by OCPexport::setup().
uint ModelContainer::getN | ( | ) | const [inherited] |
References ModelData::getN(), and ModelContainer::modelData.
Referenced by SIMexport::exportAcadoHeader(), OCPexport::exportAcadoHeader(), OCPexport::exportCode(), and OCPexport::setup().
uint ModelContainer::getNDX | ( | ) | const [inherited] |
References ModelData::getNDX(), and ModelContainer::modelData.
Referenced by SIMexport::exportAcadoHeader(), OCPexport::exportAcadoHeader(), OCPexport::exportCode(), and OCPexport::setup().
uint ModelContainer::getNP | ( | ) | const [inherited] |
References ModelData::getNP(), and ModelContainer::modelData.
Referenced by SIMexport::exportAcadoHeader(), OCPexport::exportAcadoHeader(), OCPexport::exportCode(), and OCPexport::setup().
uint ModelContainer::getNU | ( | ) | const [inherited] |
References ModelData::getNU(), and ModelContainer::modelData.
Referenced by SIMexport::exportAcadoHeader(), OCPexport::exportAcadoHeader(), OCPexport::exportCode(), and OCPexport::setup().
BEGIN_NAMESPACE_ACADO int MultiObjectiveFunctionality::getNumberOfMayerTerms | ( | ) | const [inline, inherited] |
References MultiObjectiveFunctionality::nMayer.
Referenced by MultiObjectiveAlgorithm::MultiObjectiveAlgorithm().
Vector ModelContainer::getNumMeas | ( | ) | const [inherited] |
References ModelData::getNumMeas(), and ModelContainer::modelData.
Referenced by SIMexport::exportAcadoHeader().
uint ModelContainer::getNX | ( | ) | const [inherited] |
References ModelData::getNX(), and ModelContainer::modelData.
Referenced by SIMexport::exportAcadoHeader(), OCPexport::exportAcadoHeader(), OCPexport::exportCode(), and OCPexport::setup().
uint ModelContainer::getNXA | ( | ) | const [inherited] |
References ModelData::getNXA(), and ModelContainer::modelData.
Referenced by SIMexport::exportAcadoHeader(), OCPexport::exportAcadoHeader(), OCPexport::exportCode(), and OCPexport::setup().
returnValue OCP::getObjective | ( | Objective & | objective_ | ) | const [inherited] |
returnValue OCP::getObjective | ( | const int & | multiObjectiveIdx, |
Expression ** | arg | ||
) | const [inherited] |
Reimplemented from MultiObjectiveFunctionality.
References OCP::getObjective().
double OCP::getStartTime | ( | ) | const [inherited] |
References Grid::getFirstTime(), and OCP::grid.
Referenced by OptimizationAlgorithmBase::getStartTime().
BooleanType OCP::hasConstraint | ( | ) | const [inherited] |
References BT_FALSE, BT_TRUE, OCP::constraint, and Constraint::isEmpty().
Referenced by OptimizationAlgorithmBase::extractOCPdata().
BooleanType ModelContainer::hasDifferentialEquation | ( | ) | const [inherited] |
References BT_FALSE, BT_TRUE, Function::getDim(), ModelData::getModel(), and ModelContainer::modelData.
Referenced by OptimizationAlgorithmBase::extractOCPdata().
BooleanType ModelContainer::hasEquidistantControlGrid | ( | ) | const [inherited] |
References ModelData::hasEquidistantControlGrid(), and ModelContainer::modelData.
Referenced by OCP::setNumberIntegrationSteps().
BooleanType OCP::hasEquidistantGrid | ( | ) | const [virtual, inherited] |
References ModelData::getNumSteps(), VectorspaceElement::isEmpty(), and ModelContainer::modelData.
BooleanType OCP::hasObjective | ( | ) | const [inherited] |
References BT_FALSE, BT_TRUE, Objective::isEmpty(), and OCP::objective.
Referenced by OCPexport::checkConsistency(), and OptimizationAlgorithmBase::extractOCPdata().
BooleanType ModelContainer::hasOutputs | ( | ) | const [inherited] |
References BT_FALSE, BT_TRUE, ModelData::getOutputExpressions(), and ModelContainer::modelData.
Referenced by SIMexport::setReference().
returnValue OCP::maximizeLagrangeTerm | ( | const Expression & | arg | ) | [inherited] |
References LagrangeTerm::addLagrangeTerm(), and OCP::objective.
returnValue OCP::maximizeMayerTerm | ( | const Expression & | arg | ) | [inherited] |
Note that this function is introduced for convenience only. A call of the form maximizeMayerTerm( arg ) is equivalent to calling minimizeMayerTerm( -arg ).
References Objective::addMayerTerm(), and OCP::objective.
returnValue NLP::minimize | ( | const Expression & | arg | ) |
References OCP::minimizeMayerTerm().
returnValue NLP::minimize | ( | const int & | multiObjectiveIdx, |
const Expression & | arg | ||
) |
References OCP::minimizeMayerTerm().
returnValue OCP::minimizeLagrangeTerm | ( | const Expression & | arg | ) | [inherited] |
References LagrangeTerm::addLagrangeTerm(), and OCP::objective.
returnValue OCP::minimizeLSQ | ( | const Matrix & | S, |
const Function & | h, | ||
const Vector & | r | ||
) | [inherited] |
S | a weighting matrix |
h | the LSQ-Function |
r | the reference |
References ACADOERROR, Objective::addLSQ(), BT_FALSE, Matrix::isPositiveSemiDefinite(), OCP::objective, and RET_NONPOSITIVE_WEIGHT.
Referenced by OCP::minimizeLSQ().
returnValue OCP::minimizeLSQ | ( | const Function & | h, |
const Vector & | r | ||
) | [inherited] |
h | the LSQ-Function |
r | the reference |
References Function::getDim(), OCP::minimizeLSQ(), and Matrix::setIdentity().
returnValue OCP::minimizeLSQ | ( | const Function & | h | ) | [inherited] |
h | the LSQ-Function |
References Function::getDim(), OCP::minimizeLSQ(), Matrix::setIdentity(), and VectorspaceElement::setZero().
returnValue OCP::minimizeLSQ | ( | const MatrixVariablesGrid & | S, |
const Function & | h, | ||
const VariablesGrid & | r | ||
) | [inherited] |
S | a weighting matrix |
h | the LSQ-Function |
r | the reference |
References Objective::addLSQ(), and OCP::objective.
returnValue OCP::minimizeLSQ | ( | const Matrix & | S, |
const Function & | h, | ||
const VariablesGrid & | r | ||
) | [inherited] |
S | a weighting matrix |
h | the LSQ-Function |
r | the reference |
References ACADOERROR, Objective::addLSQ(), BT_FALSE, Matrix::isPositiveSemiDefinite(), OCP::objective, and RET_NONPOSITIVE_WEIGHT.
returnValue OCP::minimizeLSQ | ( | const Function & | h, |
const VariablesGrid & | r | ||
) | [inherited] |
h | the LSQ-Function |
r | the reference |
References Objective::addLSQ(), and OCP::objective.
returnValue OCP::minimizeLSQ | ( | const MatrixVariablesGrid & | S, |
const Function & | h, | ||
const char * | rFilename | ||
) | [inherited] |
S | a weighting matrix |
h | the LSQ-Function |
rFilename | filename where the reference is stored |
References ACADOERROR, BT_TRUE, Grid::isEmpty(), OCP::minimizeLSQ(), readFromFile(), and RET_FILE_CAN_NOT_BE_OPENED.
returnValue OCP::minimizeLSQ | ( | const Matrix & | S, |
const Function & | h, | ||
const char * | rFilename | ||
) | [inherited] |
S | a weighting matrix |
h | the LSQ-Function |
rFilename | filename where the reference is stored |
References ACADOERROR, BT_TRUE, Grid::isEmpty(), OCP::minimizeLSQ(), readFromFile(), and RET_FILE_CAN_NOT_BE_OPENED.
returnValue OCP::minimizeLSQ | ( | const Function & | h, |
const char * | rFilename | ||
) | [inherited] |
h | the LSQ-Function |
rFilename | filename where the reference is stored |
References ACADOERROR, BT_TRUE, Grid::isEmpty(), OCP::minimizeLSQ(), readFromFile(), and RET_FILE_CAN_NOT_BE_OPENED.
returnValue OCP::minimizeLSQ | ( | const ExportVariable & | S, |
const Function & | h | ||
) | [inherited] |
S | a weighting matrix |
h | the LSQ-Function |
References Objective::addLSQ(), and OCP::objective.
returnValue OCP::minimizeLSQ | ( | const ExportVariable & | S, |
const String & | h | ||
) | [inherited] |
S | a weighting matrix |
h | the externally defined LSQ-Function |
References Objective::addLSQ(), and OCP::objective.
returnValue OCP::minimizeLSQEndTerm | ( | const Matrix & | S, |
const Function & | m, | ||
const Vector & | r | ||
) | [inherited] |
S | a weighting matrix |
m | the LSQ-Function |
r | the reference |
References ACADOERROR, Objective::addLSQEndTerm(), BT_FALSE, Matrix::isPositiveSemiDefinite(), OCP::objective, and RET_NONPOSITIVE_WEIGHT.
Referenced by OCP::minimizeLSQEndTerm().
returnValue OCP::minimizeLSQEndTerm | ( | const Function & | m, |
const Vector & | r | ||
) | [inherited] |
m | the LSQ-Function |
r | the reference |
References Function::getDim(), OCP::minimizeLSQEndTerm(), and Matrix::setIdentity().
returnValue OCP::minimizeLSQEndTerm | ( | const ExportVariable & | S | ) | [inherited] |
S | a weighting matrix for differential states |
returnValue OCP::minimizeLSQEndTerm | ( | const ExportVariable & | S, |
const Function & | m | ||
) | [inherited] |
S | a weighting matrix |
m | the LSQ-Function |
References Objective::addLSQEndTerm(), and OCP::objective.
returnValue OCP::minimizeLSQEndTerm | ( | const ExportVariable & | S, |
const String & | m | ||
) | [inherited] |
S | a weighting matrix |
m | the externally defined LSQ-Function |
References Objective::addLSQEndTerm(), and OCP::objective.
returnValue OCP::minimizeLSQLinearTerms | ( | const Vector & | Slx, |
const Vector & | Slu | ||
) | [inherited] |
Slx | a weighting vector for differential states. |
Slu | a weighting vector for controls. |
References Objective::addLSQLinearTerms(), and OCP::objective.
returnValue OCP::minimizeLSQLinearTerms | ( | const ExportVariable & | Slx, |
const ExportVariable & | Slu | ||
) | [inherited] |
Slx | a weighting vector for differential states. |
Slu | a weighting vector for controls. |
References Objective::addLSQLinearTerms(), and OCP::objective.
returnValue OCP::minimizeMayerTerm | ( | const Expression & | arg | ) | [inherited] |
References Objective::addMayerTerm(), and OCP::objective.
Referenced by minimize(), and OCP::minimizeMayerTerm().
returnValue OCP::minimizeMayerTerm | ( | const int & | multiObjectiveIdx, |
const Expression & | arg | ||
) | [inherited] |
In this version the number of the objective can be specified as well. This functionality is needed for multi-objective optimal control problems.
Reimplemented from MultiObjectiveFunctionality.
References OCP::minimizeMayerTerm().
BooleanType ModelContainer::modelDimensionsSet | ( | ) | const [inherited] |
References ModelContainer::modelData, and ModelData::modelDimensionsSet().
Referenced by SIMexport::exportCode().
returnValue OCP::setConstraint | ( | const Constraint & | constraint_ | ) | [inherited] |
References OCP::constraint, and SUCCESSFUL_RETURN.
Referenced by MultiObjectiveAlgorithm::solve().
returnValue ModelContainer::setDimensions | ( | uint | _NX1, |
uint | _NX2, | ||
uint | _NX3, | ||
uint | _NDX, | ||
uint | _NDX3, | ||
uint | _NXA, | ||
uint | _NXA3, | ||
uint | _NU, | ||
uint | _NP | ||
) | [inherited] |
[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] | _NP | Number of parameters |
References ModelContainer::modelData, and ModelData::setDimensions().
Referenced by ModelContainer::setDimensions().
returnValue ModelContainer::setDimensions | ( | uint | _NX1, |
uint | _NX2, | ||
uint | _NX3, | ||
uint | _NDX, | ||
uint | _NDX3, | ||
uint | _NXA, | ||
uint | _NXA3, | ||
uint | _NU | ||
) | [inherited] |
References ModelContainer::setDimensions().
returnValue ModelContainer::setDimensions | ( | uint | _NX1, |
uint | _NX2, | ||
uint | _NX3, | ||
uint | _NDX, | ||
uint | _NXA, | ||
uint | _NU, | ||
uint | _NP | ||
) | [inherited] |
[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] | _NP | Number of parameters |
References ModelContainer::setDimensions().
returnValue ModelContainer::setDimensions | ( | uint | _NX1, |
uint | _NX2, | ||
uint | _NX3, | ||
uint | _NDX, | ||
uint | _NXA, | ||
uint | _NU | ||
) | [inherited] |
References ModelContainer::setDimensions().
returnValue ModelContainer::setDimensions | ( | uint | _NX, |
uint | _NDX, | ||
uint | _NXA, | ||
uint | _NU, | ||
uint | _NP | ||
) | [inherited] |
[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] | _NP | Number of parameters |
References ModelContainer::setDimensions().
returnValue ModelContainer::setDimensions | ( | uint | _NX, |
uint | _NDX, | ||
uint | _NXA, | ||
uint | _NU | ||
) | [inherited] |
References ModelContainer::setDimensions().
returnValue ModelContainer::setDimensions | ( | uint | _NX, |
uint | _NU, | ||
uint | _NP | ||
) | [inherited] |
[in] | _NX | Number of differential states. |
[in] | _NU | Number of control inputs |
[in] | _NP | Number of parameters |
References ModelContainer::setDimensions().
returnValue ModelContainer::setDimensions | ( | uint | _NX, |
uint | _NU | ||
) | [inherited] |
References ModelContainer::setDimensions().
returnValue ModelContainer::setIntegrationGrid | ( | const Grid & | _ocpGrid, |
const uint | _numSteps | ||
) | [inherited] |
[in] | _ocpGrid | Evaluation grid for optimal control. |
[in] | numSteps | The number of integration steps along the horizon. |
References ModelContainer::modelData, and ModelData::setIntegrationGrid().
Referenced by OCP::setNumberIntegrationSteps().
returnValue ModelContainer::setLinearInput | ( | const Matrix & | A1_, |
const Matrix & | B1_ | ||
) | [inherited] |
[in] | . |
References eye(), Matrix::getNumRows(), ModelContainer::modelData, and ModelData::setLinearInput().
returnValue ModelContainer::setLinearInput | ( | const Matrix & | M1_, |
const Matrix & | A1_, | ||
const Matrix & | B1_ | ||
) | [inherited] |
[in] | . |
References ModelContainer::modelData, and ModelData::setLinearInput().
returnValue ModelContainer::setLinearOutput | ( | const Matrix & | A3_, |
const OutputFcn & | rhs_ | ||
) | [inherited] |
[in] | . |
References eye(), Matrix::getNumRows(), ModelContainer::modelData, and ModelData::setLinearOutput().
returnValue ModelContainer::setLinearOutput | ( | const Matrix & | M3_, |
const Matrix & | A3_, | ||
const OutputFcn & | rhs_ | ||
) | [inherited] |
[in] | . |
References ModelContainer::modelData, and ModelData::setLinearOutput().
returnValue ModelContainer::setLinearOutput | ( | const Matrix & | A3_, |
const String & | _rhs3, | ||
const String & | _diffs_rhs3 | ||
) | [inherited] |
[in] | . |
References eye(), Matrix::getNumRows(), ModelContainer::modelData, and ModelData::setLinearOutput().
returnValue ModelContainer::setLinearOutput | ( | const Matrix & | M3_, |
const Matrix & | A3_, | ||
const String & | _rhs3, | ||
const String & | _diffs_rhs3 | ||
) | [inherited] |
[in] | . |
References ModelContainer::modelData, and ModelData::setLinearOutput().
returnValue ModelContainer::setModel | ( | const DifferentialEquation & | _f | ) | [inherited] |
[in] | f | Differential equation. |
References ModelContainer::modelData, and ModelData::setModel().
returnValue ModelContainer::setModel | ( | const String & | fileName, |
const String & | _rhs_ODE, | ||
const String & | _diffs_rhs_ODE | ||
) | [inherited] |
[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. |
References ModelContainer::modelData, and ModelData::setModel().
returnValue ModelContainer::setModelData | ( | const ModelData & | data | ) | [inherited] |
[in] | data | the model data object. |
References ModelContainer::modelData, and SUCCESSFUL_RETURN.
returnValue ModelContainer::setN | ( | const uint | N_ | ) | [inherited] |
[in] | N_ | The number of shooting intervals. |
References ModelContainer::modelData, ModelData::setN(), and SUCCESSFUL_RETURN.
Referenced by OCP::OCP(), OCP::setupGrid(), and SIMexport::SIMexport().
returnValue ModelContainer::setNARXmodel | ( | const uint | _delay, |
const Matrix & | _parms | ||
) | [inherited] |
[in] | delay | The delay for the states in the NARX model. |
[in] | parms | The parameters defining the polynomial NARX model. |
References ModelContainer::modelData, and ModelData::setNARXmodel().
returnValue OCP::setNumberIntegrationSteps | ( | const uint | numSteps | ) | [inherited] |
References OCP::grid, ModelContainer::hasEquidistantControlGrid(), ModelContainer::setIntegrationGrid(), and SUCCESSFUL_RETURN.
Referenced by OCPexport::setup().
returnValue OCP::setObjective | ( | const Objective & | objective_ | ) | [inherited] |
References OCP::objective, and SUCCESSFUL_RETURN.
Referenced by MultiObjectiveAlgorithm::formulateOCP(), and MultiObjectiveAlgorithm::solveSingleObjective().
void OCP::setupGrid | ( | double | tStart, |
double | tEnd, | ||
int | N | ||
) | [protected, inherited] |
References OCP::constraint, Grid::getNumIntervals(), OCP::grid, Constraint::init(), Objective::init(), Grid::init(), OCP::objective, and ModelContainer::setN().
Referenced by OCP::OCP().
void OCP::setupGrid | ( | const Vector & | times | ) | [protected, inherited] |
returnValue ModelContainer::setupOutput | ( | const Vector & | numberMeasurements | ) | [inherited] |
numberMeasurements | the number of measurements per horizon for each output function |
returnValue OCP::subjectTo | ( | const DifferentialEquation & | differentialEquation_ | ) | [inherited] |
differentialEquation_ | the differential equation to be added |
n_ | the number of control intervals |
References ModelContainer::modelData, ModelData::setModel(), and SUCCESSFUL_RETURN.
Referenced by MultiObjectiveAlgorithm::formulateOCP().
returnValue OCP::subjectTo | ( | const ConstraintComponent & | component | ) | [inherited] |
References Constraint::add(), OCP::constraint, ConstraintComponent::getDim(), SUCCESSFUL_RETURN, and uint.
returnValue OCP::subjectTo | ( | const int | index_, |
const ConstraintComponent & | component | ||
) | [inherited] |
References Constraint::add(), OCP::constraint, ConstraintComponent::getDim(), SUCCESSFUL_RETURN, and uint.
returnValue OCP::subjectTo | ( | const TimeHorizonElement | index_, |
const ConstraintComponent & | component | ||
) | [inherited] |
References ACADO_TRY, ACADOERROR, Constraint::add(), AT_END, AT_START, OCP::constraint, ConstraintComponent::getDim(), Grid::getLastIndex(), OCP::grid, RET_UNKNOWN_BUG, SUCCESSFUL_RETURN, and uint.
returnValue OCP::subjectTo | ( | const double | lb_, |
const Expression & | arg1, | ||
const Expression & | arg2, | ||
const double | ub_ | ||
) | [inherited] |
Coupled boundary constraints of general form
\begin{equation*} \text{lb} \leq h_1( t_0,x(t_0),u(t_0),p,... ) + h_2( t_e,x(t_e),u(t_e),p,... ) \leq \text{ub} \end{equation*}
where \( t_0 \) is the first and \( t_e \) the last time point in the grid. Adds a constraint of the form
lb <= arg1(0) + arg2(T) <= ub
with constant lower and upper bounds.
References Constraint::add(), and OCP::constraint.
returnValue OCP::subjectTo | ( | const double | lb_, |
const Expression * | arguments, | ||
const double | ub_ | ||
) | [inherited] |
Adds a constraint of the form
\begin{equation*} \text{lb} <= \sum_i h_i(t_i, x(t_i), u(t_i), p, ...) <= \text{ub} \end{equation*}
with constant lower and upper bounds.
References Constraint::add(), and OCP::constraint.
Constraint OCP::constraint [protected, inherited] |
Referenced by OCP::copy(), OCP::getConstraint(), OCP::hasConstraint(), OCP::OCP(), OCP::setConstraint(), OCP::setupGrid(), and OCP::subjectTo().
Expression** MultiObjectiveFunctionality::mayerTerms [protected, inherited] |
ModelData ModelContainer::modelData [protected, inherited] |
Referenced by ModelContainer::addOutput(), SIMexport::checkConsistency(), OCP::copy(), SIMexport::exportAndRun(), SIMexport::exportEvaluation(), SIMexport::exportMakefile(), ModelContainer::exportRhs(), SIMexport::exportTest(), ModelContainer::getDimOutputs(), ModelContainer::getFileNameModel(), ModelContainer::getModel(), ModelContainer::getModelData(), ModelContainer::getN(), ModelContainer::getNDX(), ModelContainer::getNP(), ModelContainer::getNU(), ModelContainer::getNumMeas(), ModelContainer::getNX(), ModelContainer::getNXA(), ModelContainer::hasDifferentialEquation(), ModelContainer::hasEquidistantControlGrid(), OCP::hasEquidistantGrid(), ModelContainer::hasOutputs(), ModelContainer::modelDimensionsSet(), OCP::OCP(), ModelContainer::setDimensions(), ModelContainer::setIntegrationGrid(), ModelContainer::setLinearInput(), ModelContainer::setLinearOutput(), ModelContainer::setModel(), ModelContainer::setModelData(), ModelContainer::setN(), ModelContainer::setNARXmodel(), SIMexport::setup(), and OCP::subjectTo().
int MultiObjectiveFunctionality::nMayer [protected, inherited] |
Referenced by MultiObjectiveFunctionality::getNumberOfMayerTerms(), MultiObjectiveFunctionality::getObjective(), MultiObjectiveFunctionality::minimizeMayerTerm(), MultiObjectiveFunctionality::MultiObjectiveFunctionality(), MultiObjectiveFunctionality::operator=(), and MultiObjectiveFunctionality::~MultiObjectiveFunctionality().
Objective OCP::objective [protected, inherited] |
Referenced by OCP::copy(), OCP::getObjective(), OCP::hasObjective(), OCP::maximizeLagrangeTerm(), OCP::maximizeMayerTerm(), OCP::minimizeLagrangeTerm(), OCP::minimizeLSQ(), OCP::minimizeLSQEndTerm(), OCP::minimizeLSQLinearTerms(), OCP::minimizeMayerTerm(), OCP::OCP(), OCP::setObjective(), and OCP::setupGrid().