DART
6.10.1
|
#include <GenericMultiObjectiveProblem.hpp>
Public Member Functions | |
GenericMultiObjectiveProblem (std::size_t dim, std::size_t integerDim=0u) | |
Constructor. More... | |
~GenericMultiObjectiveProblem () override=default | |
Destructor. More... | |
virtual std::ostream & | print (std::ostream &os) const |
Prints information of this class to a stream. More... | |
Objectives | |
std::size_t | getObjectiveDimension () const override |
Returns the total dimension of objective functions. More... | |
void | setObjectiveFunctions (const std::vector< FunctionPtr > &objectives) |
Sets objective functions to be minimized. More... | |
void | addObjectiveFunction (FunctionPtr objective) |
Adds a minimum objective function. More... | |
std::size_t | getNumObjectiveFunctions () const |
Returns the number objective functions. More... | |
const std::vector< FunctionPtr > & | getObjectiveFunctions () const |
Returns objective functions. More... | |
void | removeObjectiveFunction (FunctionPtr function) |
Removes an objective function. More... | |
void | removeAllObjectiveFunctions () |
Removes all objective functions. More... | |
Equality Constraints | |
std::size_t | getEqConstraintDimension () const override |
Returns the total dimension of equality constraints. More... | |
void | addEqConstraintFunction (FunctionPtr eqConst) |
Adds equality constraint. More... | |
std::size_t | getNumEqualityConstraintFunctions () const |
Returns number of equality constraints. More... | |
FunctionPtr | getEqConstraintFunction (std::size_t index) const |
Returns equality constraint. More... | |
void | removeEqConstraintFunction (FunctionPtr eqConst) |
Removes equality constraint. More... | |
void | removeAllEqConstraintFunctions () |
Removes all equality constraints. More... | |
Inequality Constraints | |
std::size_t | getIneqConstraintDimension () const override |
Returns the total dimension of inequality constraints. More... | |
void | addIneqConstraintFunction (FunctionPtr ineqConst) |
Adds inequality constraint. More... | |
std::size_t | getNumIneqConstraintFunctions () const |
Returns number of inequality constraints. More... | |
FunctionPtr | getIneqConstraintFunction (std::size_t index) const |
Returns inequality constraint. More... | |
void | removeIneqConstraintFunction (FunctionPtr ineqConst) |
Removes inequality constraint. More... | |
void | removeAllIneqConstraintFunctions () |
Removes all inequality constraints. More... | |
Evaluations | |
Eigen::VectorXd | evaluateObjectives (const Eigen::VectorXd &x) const override |
Evaluates objectives. More... | |
Eigen::VectorXd | evaluateEqConstraints (const Eigen::VectorXd &x) const override |
Evaluates equality constraints. More... | |
Eigen::VectorXd | evaluateIneqConstraints (const Eigen::VectorXd &x) const override |
Evaluates inequality constraints. More... | |
std::size_t | getFitnessDimension () const |
Return dimension of fitness. More... | |
Eigen::VectorXd | evaluateFitness (const Eigen::VectorXd &x) const |
Evaluates fitness, which is [objectives, equality constraints, inequality constraints]. More... | |
Solution | |
virtual void | setSolutionDimension (std::size_t dim, std::size_t integerDim=0u) |
Sets the dimension of the solution. More... | |
virtual std::size_t | getSolutionDimension () const |
Returns dimension of the solution. More... | |
std::size_t | getDoubleDimension () const |
Returns dimension of the floating-point part of the solution. More... | |
virtual void | setIntegerDimension (std::size_t dim) |
Sets dimension of the integers in the decision vector. More... | |
virtual std::size_t | getIntegerDimension () const |
Returns dimension of the integers in the decision vector. More... | |
void | setLowerBounds (const Eigen::VectorXd &lb) |
Sets lower bounds for optimization parameters. More... | |
const Eigen::VectorXd & | getLowerBounds () const |
Returns lower bounds for optimization parameters. More... | |
void | setUpperBounds (const Eigen::VectorXd &ub) |
Sets upper bounds for optimization parameters. More... | |
const Eigen::VectorXd & | getUpperBounds () const |
Returns upper bounds for optimization parameters. More... | |
Protected Attributes | |
std::vector< FunctionPtr > | mObjectiveFunctions |
Objective functions. More... | |
std::vector< FunctionPtr > | mEqConstraintFunctions |
Equality constraint functions. More... | |
std::vector< FunctionPtr > | mIneqConstraintFunctions |
Inequality constraint functions. More... | |
std::size_t | mDimension |
Dimension of the decision vector (or optimization parameters) More... | |
std::size_t | mIntegerDimension |
Dimension of integer in the decision vector. More... | |
Eigen::VectorXd | mLowerBounds |
Lower bounds for optimization parameters. More... | |
Eigen::VectorXd | mUpperBounds |
Upper bounds for optimization parameters. More... | |
Private Attributes | |
std::size_t | mObjectiveDimension |
Cache for objective dimension. More... | |
std::size_t | mEqConstraintDimension |
Cache for equality constraint dimension. More... | |
std::size_t | mIneqConstraintDimension |
Cache for inequality constraint dimension. More... | |
|
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.