DART  6.7.3
dart::optimizer::GenericMultiObjectiveProblem Class Reference

#include <GenericMultiObjectiveProblem.hpp>

Inheritance diagram for dart::optimizer::GenericMultiObjectiveProblem:
dart::optimizer::MultiObjectiveProblem

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< FunctionPtrmObjectiveFunctions
 Objective functions. More...
 
std::vector< FunctionPtrmEqConstraintFunctions
 Equality constraint functions. More...
 
std::vector< FunctionPtrmIneqConstraintFunctions
 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...
 

Constructor & Destructor Documentation

◆ GenericMultiObjectiveProblem()

dart::optimizer::GenericMultiObjectiveProblem::GenericMultiObjectiveProblem ( std::size_t  dim,
std::size_t  integerDim = 0u 
)
explicit

Constructor.

◆ ~GenericMultiObjectiveProblem()

dart::optimizer::GenericMultiObjectiveProblem::~GenericMultiObjectiveProblem ( )
overridedefault

Destructor.

Member Function Documentation

◆ addEqConstraintFunction()

void dart::optimizer::GenericMultiObjectiveProblem::addEqConstraintFunction ( FunctionPtr  eqConst)

Adds equality constraint.

◆ addIneqConstraintFunction()

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.

◆ addObjectiveFunction()

void dart::optimizer::GenericMultiObjectiveProblem::addObjectiveFunction ( FunctionPtr  objective)

Adds a minimum objective function.

◆ evaluateEqConstraints()

Eigen::VectorXd dart::optimizer::GenericMultiObjectiveProblem::evaluateEqConstraints ( const Eigen::VectorXd &  x) const
overridevirtual

Evaluates equality constraints.

Reimplemented from dart::optimizer::MultiObjectiveProblem.

◆ evaluateFitness()

Eigen::VectorXd dart::optimizer::GenericMultiObjectiveProblem::evaluateFitness ( const Eigen::VectorXd &  x) const

Evaluates fitness, which is [objectives, equality constraints, inequality constraints].

◆ evaluateIneqConstraints()

Eigen::VectorXd dart::optimizer::GenericMultiObjectiveProblem::evaluateIneqConstraints ( const Eigen::VectorXd &  x) const
overridevirtual

Evaluates inequality constraints.

Reimplemented from dart::optimizer::MultiObjectiveProblem.

◆ evaluateObjectives()

Eigen::VectorXd dart::optimizer::GenericMultiObjectiveProblem::evaluateObjectives ( const Eigen::VectorXd &  x) const
overridevirtual

Evaluates objectives.

Implements dart::optimizer::MultiObjectiveProblem.

◆ getDoubleDimension()

std::size_t dart::optimizer::MultiObjectiveProblem::getDoubleDimension ( ) const
inherited

Returns dimension of the floating-point part of the solution.

◆ getEqConstraintDimension()

std::size_t dart::optimizer::GenericMultiObjectiveProblem::getEqConstraintDimension ( ) const
overridevirtual

Returns the total dimension of equality constraints.

Reimplemented from dart::optimizer::MultiObjectiveProblem.

◆ getEqConstraintFunction()

FunctionPtr dart::optimizer::GenericMultiObjectiveProblem::getEqConstraintFunction ( std::size_t  index) const

Returns equality constraint.

◆ getFitnessDimension()

std::size_t dart::optimizer::GenericMultiObjectiveProblem::getFitnessDimension ( ) const

Return dimension of fitness.

◆ getIneqConstraintDimension()

std::size_t dart::optimizer::GenericMultiObjectiveProblem::getIneqConstraintDimension ( ) const
overridevirtual

Returns the total dimension of inequality constraints.

Reimplemented from dart::optimizer::MultiObjectiveProblem.

◆ getIneqConstraintFunction()

FunctionPtr dart::optimizer::GenericMultiObjectiveProblem::getIneqConstraintFunction ( std::size_t  index) const

Returns inequality constraint.

◆ getIntegerDimension()

std::size_t dart::optimizer::MultiObjectiveProblem::getIntegerDimension ( ) const
virtualinherited

Returns dimension of the integers in the decision vector.

◆ getLowerBounds()

const Eigen::VectorXd & dart::optimizer::MultiObjectiveProblem::getLowerBounds ( ) const
inherited

Returns lower bounds for optimization parameters.

◆ getNumEqualityConstraintFunctions()

std::size_t dart::optimizer::GenericMultiObjectiveProblem::getNumEqualityConstraintFunctions ( ) const

Returns number of equality constraints.

◆ getNumIneqConstraintFunctions()

std::size_t dart::optimizer::GenericMultiObjectiveProblem::getNumIneqConstraintFunctions ( ) const

Returns number of inequality constraints.

◆ getNumObjectiveFunctions()

std::size_t dart::optimizer::GenericMultiObjectiveProblem::getNumObjectiveFunctions ( ) const

Returns the number objective functions.

◆ getObjectiveDimension()

std::size_t dart::optimizer::GenericMultiObjectiveProblem::getObjectiveDimension ( ) const
overridevirtual

Returns the total dimension of objective functions.

Implements dart::optimizer::MultiObjectiveProblem.

◆ getObjectiveFunctions()

const std::vector< FunctionPtr > & dart::optimizer::GenericMultiObjectiveProblem::getObjectiveFunctions ( ) const

Returns objective functions.

◆ getSolutionDimension()

std::size_t dart::optimizer::MultiObjectiveProblem::getSolutionDimension ( ) const
virtualinherited

Returns dimension of the solution.

◆ getUpperBounds()

const Eigen::VectorXd & dart::optimizer::MultiObjectiveProblem::getUpperBounds ( ) const
inherited

Returns upper bounds for optimization parameters.

◆ print()

std::ostream & dart::optimizer::MultiObjectiveProblem::print ( std::ostream &  os) const
virtualinherited

Prints information of this class to a stream.

◆ removeAllEqConstraintFunctions()

void dart::optimizer::GenericMultiObjectiveProblem::removeAllEqConstraintFunctions ( )

Removes all equality constraints.

◆ removeAllIneqConstraintFunctions()

void dart::optimizer::GenericMultiObjectiveProblem::removeAllIneqConstraintFunctions ( )

Removes all inequality constraints.

◆ removeAllObjectiveFunctions()

void dart::optimizer::GenericMultiObjectiveProblem::removeAllObjectiveFunctions ( )

Removes all objective functions.

◆ removeEqConstraintFunction()

void dart::optimizer::GenericMultiObjectiveProblem::removeEqConstraintFunction ( FunctionPtr  eqConst)

Removes equality constraint.

◆ removeIneqConstraintFunction()

void dart::optimizer::GenericMultiObjectiveProblem::removeIneqConstraintFunction ( FunctionPtr  ineqConst)

Removes inequality constraint.

◆ removeObjectiveFunction()

void dart::optimizer::GenericMultiObjectiveProblem::removeObjectiveFunction ( FunctionPtr  function)

Removes an objective function.

◆ setIntegerDimension()

void dart::optimizer::MultiObjectiveProblem::setIntegerDimension ( std::size_t  dim)
virtualinherited

Sets dimension of the integers in the decision vector.

◆ setLowerBounds()

void dart::optimizer::MultiObjectiveProblem::setLowerBounds ( const Eigen::VectorXd &  lb)
inherited

Sets lower bounds for optimization parameters.

◆ setObjectiveFunctions()

void dart::optimizer::GenericMultiObjectiveProblem::setObjectiveFunctions ( const std::vector< FunctionPtr > &  objectives)

Sets objective functions to be minimized.

◆ setSolutionDimension()

void dart::optimizer::MultiObjectiveProblem::setSolutionDimension ( std::size_t  dim,
std::size_t  integerDim = 0u 
)
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).

Parameters
[in]dimTotal dimension of the solution.
[in]integerDimThe dimension of integer part in the solution.

◆ setUpperBounds()

void dart::optimizer::MultiObjectiveProblem::setUpperBounds ( const Eigen::VectorXd &  ub)
inherited

Sets upper bounds for optimization parameters.

Member Data Documentation

◆ mDimension

std::size_t dart::optimizer::MultiObjectiveProblem::mDimension
protectedinherited

Dimension of the decision vector (or optimization parameters)

◆ mEqConstraintDimension

std::size_t dart::optimizer::GenericMultiObjectiveProblem::mEqConstraintDimension
private

Cache for equality constraint dimension.

◆ mEqConstraintFunctions

std::vector<FunctionPtr> dart::optimizer::GenericMultiObjectiveProblem::mEqConstraintFunctions
protected

Equality constraint functions.

◆ mIneqConstraintDimension

std::size_t dart::optimizer::GenericMultiObjectiveProblem::mIneqConstraintDimension
private

Cache for inequality constraint dimension.

◆ mIneqConstraintFunctions

std::vector<FunctionPtr> dart::optimizer::GenericMultiObjectiveProblem::mIneqConstraintFunctions
protected

Inequality constraint functions.

◆ mIntegerDimension

std::size_t dart::optimizer::MultiObjectiveProblem::mIntegerDimension
protectedinherited

Dimension of integer in the decision vector.

The integers are placed in the tail of the decision vector.

◆ mLowerBounds

Eigen::VectorXd dart::optimizer::MultiObjectiveProblem::mLowerBounds
protectedinherited

Lower bounds for optimization parameters.

◆ mObjectiveDimension

std::size_t dart::optimizer::GenericMultiObjectiveProblem::mObjectiveDimension
private

Cache for objective dimension.

◆ mObjectiveFunctions

std::vector<FunctionPtr> dart::optimizer::GenericMultiObjectiveProblem::mObjectiveFunctions
protected

Objective functions.

◆ mUpperBounds

Eigen::VectorXd dart::optimizer::MultiObjectiveProblem::mUpperBounds
protectedinherited

Upper bounds for optimization parameters.