This class allows for the definition of multiobjective optimal planning problems. Objectives are added to this compound object, and motion costs are computed by taking a weighted sum of the individual objective costs. More...
#include <ompl/base/OptimizationObjective.h>

Public Member Functions | |
MultiOptimizationObjective (const SpaceInformationPtr &si) | |
void | addObjective (const OptimizationObjectivePtr &objective, double weight) |
Adds a new objective for this multiobjective. A weight must also be specified for specifying importance of this objective in planning. | |
std::size_t | getObjectiveCount () const |
Returns the number of objectives that make up this multiobjective. | |
const OptimizationObjectivePtr & | getObjective (unsigned int idx) const |
Returns a specific objective from this multiobjective, where the individual objectives are in order of addition to the multiobjective, and idx is the zero-based index into this ordering. | |
double | getObjectiveWeight (unsigned int idx) const |
Returns the weighing factor of a specific objective. | |
void | setObjectiveWeight (unsigned int idx, double weight) |
Sets the weighing factor of a specific objective. | |
void | lock () |
This method "freezes" this multiobjective so that no more objectives can be added to it. | |
bool | isLocked () const |
Returns whether this multiobjective has been locked from adding further objectives. | |
virtual Cost | stateCost (const State *s) const |
virtual Cost | motionCost (const State *s1, const State *s2) const |
Protected Attributes | |
std::vector< Component > | components_ |
List of objective/weight pairs. | |
bool | locked_ |
Whether this multiobjective is locked from further additions. | |
Friends | |
OptimizationObjectivePtr | operator+ (const OptimizationObjectivePtr &a, const OptimizationObjectivePtr &b) |
OptimizationObjectivePtr | operator* (double w, const OptimizationObjectivePtr &a) |
OptimizationObjectivePtr | operator* (const OptimizationObjectivePtr &a, double w) |
Detailed Description
This class allows for the definition of multiobjective optimal planning problems. Objectives are added to this compound object, and motion costs are computed by taking a weighted sum of the individual objective costs.
Definition at line 155 of file OptimizationObjective.h.
Member Function Documentation
ompl::base::Cost base::MultiOptimizationObjective::motionCost | ( | const State * | s1, |
const State * | s2 | ||
) | const [virtual] |
The default implementation of this method is to use addition to add up all the individual objectives' motion cost values, where each individual value is scaled by its weight
Implements base::OptimizationObjective.
Definition at line 229 of file OptimizationObjective.cpp.
ompl::base::Cost base::MultiOptimizationObjective::stateCost | ( | const State * | s | ) | const [virtual] |
The default implementation of this method is to use addition to add up all the individual objectives' state cost values, where each individual value is scaled by its weight
Implements base::OptimizationObjective.
Definition at line 216 of file OptimizationObjective.cpp.
The documentation for this class was generated from the following files:
- ompl/base/OptimizationObjective.h
- ompl/base/src/OptimizationObjective.cpp