|
DART 6.12.2
|
#include <GenericMultiObjectiveProblem.hpp>
Public Member Functions | |
| GenericMultiObjectiveProblem (std::size_t dim, std::size_t integerDim=0u) | |
| Constructor. | |
| ~GenericMultiObjectiveProblem () override=default | |
| Destructor. | |
| virtual std::ostream & | print (std::ostream &os) const |
| Prints information of this class to a stream. | |
Objectives | |
| std::size_t | getObjectiveDimension () const override |
| Returns the total dimension of objective functions. | |
| void | setObjectiveFunctions (const std::vector< FunctionPtr > &objectives) |
| Sets objective functions to be minimized. | |
| void | addObjectiveFunction (FunctionPtr objective) |
| Adds a minimum objective function. | |
| std::size_t | getNumObjectiveFunctions () const |
| Returns the number objective functions. | |
| const std::vector< FunctionPtr > & | getObjectiveFunctions () const |
| Returns objective functions. | |
| void | removeObjectiveFunction (FunctionPtr function) |
| Removes an objective function. | |
| void | removeAllObjectiveFunctions () |
| Removes all objective functions. | |
Equality Constraints | |
| std::size_t | getEqConstraintDimension () const override |
| Returns the total dimension of equality constraints. | |
| void | addEqConstraintFunction (FunctionPtr eqConst) |
| Adds equality constraint. | |
| std::size_t | getNumEqualityConstraintFunctions () const |
| Returns number of equality constraints. | |
| FunctionPtr | getEqConstraintFunction (std::size_t index) const |
| Returns equality constraint. | |
| void | removeEqConstraintFunction (FunctionPtr eqConst) |
| Removes equality constraint. | |
| void | removeAllEqConstraintFunctions () |
| Removes all equality constraints. | |
Inequality Constraints | |
| std::size_t | getIneqConstraintDimension () const override |
| Returns the total dimension of inequality constraints. | |
| void | addIneqConstraintFunction (FunctionPtr ineqConst) |
| Adds inequality constraint. | |
| std::size_t | getNumIneqConstraintFunctions () const |
| Returns number of inequality constraints. | |
| FunctionPtr | getIneqConstraintFunction (std::size_t index) const |
| Returns inequality constraint. | |
| void | removeIneqConstraintFunction (FunctionPtr ineqConst) |
| Removes inequality constraint. | |
| void | removeAllIneqConstraintFunctions () |
| Removes all inequality constraints. | |
Evaluations | |
| Eigen::VectorXd | evaluateObjectives (const Eigen::VectorXd &x) const override |
| Evaluates objectives. | |
| Eigen::VectorXd | evaluateEqConstraints (const Eigen::VectorXd &x) const override |
| Evaluates equality constraints. | |
| Eigen::VectorXd | evaluateIneqConstraints (const Eigen::VectorXd &x) const override |
| Evaluates inequality constraints. | |
| std::size_t | getFitnessDimension () const |
| Return dimension of fitness. | |
| Eigen::VectorXd | evaluateFitness (const Eigen::VectorXd &x) const |
| Evaluates fitness, which is [objectives, equality constraints, inequality constraints]. | |
Solution | |
| virtual void | setSolutionDimension (std::size_t dim, std::size_t integerDim=0u) |
| Sets the dimension of the solution. | |
| virtual std::size_t | getSolutionDimension () const |
| Returns dimension of the solution. | |
| std::size_t | getDoubleDimension () const |
| Returns dimension of the floating-point part of the solution. | |
| virtual void | setIntegerDimension (std::size_t dim) |
| Sets dimension of the integers in the decision vector. | |
| virtual std::size_t | getIntegerDimension () const |
| Returns dimension of the integers in the decision vector. | |
| void | setLowerBounds (const Eigen::VectorXd &lb) |
| Sets lower bounds for optimization parameters. | |
| const Eigen::VectorXd & | getLowerBounds () const |
| Returns lower bounds for optimization parameters. | |
| void | setUpperBounds (const Eigen::VectorXd &ub) |
| Sets upper bounds for optimization parameters. | |
| const Eigen::VectorXd & | getUpperBounds () const |
| Returns upper bounds for optimization parameters. | |
Protected Attributes | |
| std::vector< FunctionPtr > | mObjectiveFunctions |
| Objective functions. | |
| std::vector< FunctionPtr > | mEqConstraintFunctions |
| Equality constraint functions. | |
| std::vector< FunctionPtr > | mIneqConstraintFunctions |
| Inequality constraint functions. | |
| std::size_t | mDimension |
| Dimension of the decision vector (or optimization parameters) | |
| std::size_t | mIntegerDimension |
| Dimension of integer in the decision vector. | |
| Eigen::VectorXd | mLowerBounds |
| Lower bounds for optimization parameters. | |
| Eigen::VectorXd | mUpperBounds |
| Upper bounds for optimization parameters. | |
Private Attributes | |
| std::size_t | mObjectiveDimension |
| Cache for objective dimension. | |
| std::size_t | mEqConstraintDimension |
| Cache for equality constraint dimension. | |
| std::size_t | mIneqConstraintDimension |
| Cache for inequality constraint dimension. | |
|
explicit |
Constructor.
|
overridedefault |
Destructor.
| void dart::optimizer::GenericMultiObjectiveProblem::addEqConstraintFunction | ( | FunctionPtr | eqConst | ) |
Adds equality constraint.
| void dart::optimizer::GenericMultiObjectiveProblem::addIneqConstraintFunction | ( | FunctionPtr | ineqConst | ) |
Adds inequality constraint.
Inequality constraints must evaluate to LESS THAN or equal to zero (within some tolerance) to be satisfied.
| void dart::optimizer::GenericMultiObjectiveProblem::addObjectiveFunction | ( | FunctionPtr | objective | ) |
Adds a minimum objective function.
|
overridevirtual |
Evaluates equality constraints.
Reimplemented from dart::optimizer::MultiObjectiveProblem.
| Eigen::VectorXd dart::optimizer::GenericMultiObjectiveProblem::evaluateFitness | ( | const Eigen::VectorXd & | x | ) | const |
Evaluates fitness, which is [objectives, equality constraints, inequality constraints].
|
overridevirtual |
Evaluates inequality constraints.
Reimplemented from dart::optimizer::MultiObjectiveProblem.
|
overridevirtual |
Evaluates objectives.
Implements dart::optimizer::MultiObjectiveProblem.
|
inherited |
Returns dimension of the floating-point part of the solution.
|
overridevirtual |
Returns the total dimension of equality constraints.
Reimplemented from dart::optimizer::MultiObjectiveProblem.
| FunctionPtr dart::optimizer::GenericMultiObjectiveProblem::getEqConstraintFunction | ( | std::size_t | index | ) | const |
Returns equality constraint.
| std::size_t dart::optimizer::GenericMultiObjectiveProblem::getFitnessDimension | ( | ) | const |
Return dimension of fitness.
|
overridevirtual |
Returns the total dimension of inequality constraints.
Reimplemented from dart::optimizer::MultiObjectiveProblem.
| FunctionPtr dart::optimizer::GenericMultiObjectiveProblem::getIneqConstraintFunction | ( | std::size_t | index | ) | const |
Returns inequality constraint.
|
virtualinherited |
Returns dimension of the integers in the decision vector.
|
inherited |
Returns lower bounds for optimization parameters.
| std::size_t dart::optimizer::GenericMultiObjectiveProblem::getNumEqualityConstraintFunctions | ( | ) | const |
Returns number of equality constraints.
| std::size_t dart::optimizer::GenericMultiObjectiveProblem::getNumIneqConstraintFunctions | ( | ) | const |
Returns number of inequality constraints.
| std::size_t dart::optimizer::GenericMultiObjectiveProblem::getNumObjectiveFunctions | ( | ) | const |
Returns the number objective functions.
|
overridevirtual |
Returns the total dimension of objective functions.
Implements dart::optimizer::MultiObjectiveProblem.
| const std::vector< FunctionPtr > & dart::optimizer::GenericMultiObjectiveProblem::getObjectiveFunctions | ( | ) | const |
Returns objective functions.
|
virtualinherited |
Returns dimension of the solution.
|
inherited |
Returns upper bounds for optimization parameters.
|
virtualinherited |
Prints information of this class to a stream.
| void dart::optimizer::GenericMultiObjectiveProblem::removeAllEqConstraintFunctions | ( | ) |
Removes all equality constraints.
| void dart::optimizer::GenericMultiObjectiveProblem::removeAllIneqConstraintFunctions | ( | ) |
Removes all inequality constraints.
| void dart::optimizer::GenericMultiObjectiveProblem::removeAllObjectiveFunctions | ( | ) |
Removes all objective functions.
| void dart::optimizer::GenericMultiObjectiveProblem::removeEqConstraintFunction | ( | FunctionPtr | eqConst | ) |
Removes equality constraint.
| void dart::optimizer::GenericMultiObjectiveProblem::removeIneqConstraintFunction | ( | FunctionPtr | ineqConst | ) |
Removes inequality constraint.
| void dart::optimizer::GenericMultiObjectiveProblem::removeObjectiveFunction | ( | FunctionPtr | function | ) |
Removes an objective function.
|
virtualinherited |
Sets dimension of the integers in the decision vector.
|
inherited |
Sets lower bounds for optimization parameters.
| void dart::optimizer::GenericMultiObjectiveProblem::setObjectiveFunctions | ( | const std::vector< FunctionPtr > & | objectives | ) |
Sets objective functions to be minimized.
|
virtualinherited |
Sets the dimension of the solution.
The element type of the solution can be either double or int. In the case that the solution partially contains integers, we assume the integer part takes place the tail of the solution, and the size of the integer part is integerDim. For example, a solution vector can be [floating1, floating2, ..., int1, int2].
Note that the dim represents the whole dimension of the solution so that the dimension of floating-point part is to be (dim - integerDim).
By default, we assume the solution is homogeneously floating-point type ( i.e., integerDim is zero).
| [in] | dim | Total dimension of the solution. |
| [in] | integerDim | The dimension of integer part in the solution. |
|
inherited |
Sets upper bounds for optimization parameters.
|
protectedinherited |
Dimension of the decision vector (or optimization parameters)
|
private |
Cache for equality constraint dimension.
|
protected |
Equality constraint functions.
|
private |
Cache for inequality constraint dimension.
|
protected |
Inequality constraint functions.
|
protectedinherited |
Dimension of integer in the decision vector.
The integers are placed in the tail of the decision vector.
|
protectedinherited |
Lower bounds for optimization parameters.
|
private |
Cache for objective dimension.
|
protected |
Objective functions.
|
protectedinherited |
Upper bounds for optimization parameters.