|
returnValue | maximizeLagrangeTerm (const Expression &arg) |
|
returnValue | maximizeMayerTerm (const Expression &arg) |
|
returnValue | minimizeLagrangeTerm (const Expression &arg) |
|
returnValue | minimizeMayerTerm (const Expression &arg) |
|
returnValue | minimizeMayerTerm (const int &multiObjectiveIdx, const Expression &arg) |
|
| OCP (const double &tStart_=0.0, const double &tEnd_=1.0, const int &N_=20) |
|
| OCP (const double &tStart_, const double &tEnd_, const DVector &_numSteps) |
|
| OCP (const double &tStart_, const Parameter &tEnd_, const int &N_=20) |
|
| OCP (const Grid &grid_) |
|
returnValue | subjectTo (const DifferentialEquation &differentialEquation_) |
|
returnValue | subjectTo (const ConstraintComponent &component) |
|
returnValue | subjectTo (int index_, const ConstraintComponent &component) |
|
returnValue | subjectTo (const double lb_, const Expression &arg1, const Expression &arg2, const double ub_) |
|
virtual | ~OCP () |
|
|
Adds a Least Square term of the form
Here the sum is over all grid points of the objective grid. The DMatrix is assumed to be symmetric and positive (semi-) definite. The Function is called reference and can be specified by the user. The function is a standard Function.
- See also
- Function
- Returns
- SUCCESSFUL_RETURN
|
returnValue | minimizeLSQ (const DMatrix &S, const Function &h, const DVector &r) |
|
returnValue | minimizeLSQ (const Function &h, const DVector &r) |
|
returnValue | minimizeLSQ (const Function &h) |
|
returnValue | minimizeLSQ (const MatrixVariablesGrid &S, const Function &h, const VariablesGrid &r) |
|
returnValue | minimizeLSQ (const DMatrix &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 DMatrix &S, const Function &h, const char *rFilename) |
|
returnValue | minimizeLSQ (const Function &h, const char *rFilename) |
|
returnValue | minimizeLSQ (const DMatrix &S, const Function &h) |
|
returnValue | minimizeLSQ (const BMatrix &S, const Function &h) |
|
returnValue | minimizeLSQ (const DMatrix &S, const std::string &h) |
|
returnValue | minimizeLSQ (const BMatrix &S, const std::string &h) |
|
|
|
returnValue | minimizeLSQEndTerm (const DMatrix &S, const Function &m, const DVector &r) |
|
returnValue | minimizeLSQEndTerm (const Function &m, const DVector &r) |
|
returnValue | minimizeLSQEndTerm (const DMatrix &S, const Function &m) |
|
returnValue | minimizeLSQEndTerm (const DMatrix &S, const std::string &m) |
|
returnValue | minimizeLSQEndTerm (const BMatrix &S, const Function &m) |
|
returnValue | minimizeLSQEndTerm (const BMatrix &S, const std::string &m) |
|
|
returnValue | minimizeLSQLinearTerms (const DVector &Slx, const DVector &Slu) |
|
returnValue | minimizeLSQLinearTerms (const BVector &Slx, const BVector &Slu) |
|
|
returnValue | subjectTo (const double lb_, const Expression *arguments, const double ub_) |
|
|
Adds a constraint of the form
with constant lower and upper bounds.
|
returnValue | subjectTo (const DVector &_lb, const Expression &_expr, const DVector &_ub) |
|
returnValue | subjectTo (int _index, const DVector &_lb, const Expression &_expr, const DVector &_ub) |
|
|
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 |
|
double | getStartTime () const |
|
double | getEndTime () const |
|
int | getNumberOfMayerTerms () const |
|
returnValue | getObjective (const int &multiObjectiveIdx, Expression **arg) const |
|
returnValue | minimizeMayerTerm (const int &multiObjectiveIdx, const Expression &arg) |
|
| MultiObjectiveFunctionality () |
|
| MultiObjectiveFunctionality (const MultiObjectiveFunctionality &rhs) |
|
MultiObjectiveFunctionality & | operator= (const MultiObjectiveFunctionality &rhs) |
|
| ~MultiObjectiveFunctionality () |
|
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) |
|
Data class for defining optimal control problems.
The class OCP is a data class for defining optimal control problems. In the most easiest an optimal control problem can consists of an objective only - i.e. in principle we can set up NLP's as well if no dynamic system is specified. However, in general the objective functional is optimized subject to a dynamic equation and different kind of constraints.
Note that the OCP class is only designed for the user and collects data only. In order to solve an OCP this class must be setup and passed to an appropriate OptimizationAlgorithm.
For setting up an optimal control problem (OCP), we should first specify the time horizon on which the OCP is defined. Note that there are several constructors available which allow to construct an OCP directly with the corresponding time interval. Here, the interval can consist of of given bounds, but in another variant a parameter can be passed in order to allow the setup of optimal control problems for which the end time is optimized, too.
Constraints can be specified with the "subjectTo" syntax. Please note that every parameter, state, control etc which is not fixed via a constraint will be regarded as an optimization variable. In particular, initial value or boundary constraints appear in many OCP formulations and of course all these constraints should all be set explicitly. Moreover, the dynamic equations (model) is regarded as a constraint, too.
Please note that the OCP class only collects the formulation of the problem. If initial values for non-linear problems should be specified, this needs to be done on the algorithm dealing with the OCP. (
- See also
- OptimizationAlgorithm)
For advanced users and developers it might be important to know that the class OCP inherits the MultiObjectiveFunctionality which is needed if more than one objective should be specified.
Please check the tutorial examples as well as the class reference below, to learn about the usage of this class in more detail.
Definition at line 89 of file ocp.hpp.