Class MultiOptimizationObjective
Defined in File OptimizationObjective.h
Nested Relationships
Nested Types
Inheritance Relationships
Base Type
public ompl::base::OptimizationObjective
(Class OptimizationObjective)
Class Documentation
-
class MultiOptimizationObjective : public ompl::base::OptimizationObjective
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.
Public 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.
Protected Attributes
-
bool locked_
Whether this multiobjective is locked from further additions.
Friends
-
friend OptimizationObjectivePtr operator+(const OptimizationObjectivePtr &a, const OptimizationObjectivePtr &b)
Given two optimization objectives, returns a MultiOptimizationObjective that combines the two objectives with both weights equal to 1.0.
-
friend OptimizationObjectivePtr operator*(double weight, const OptimizationObjectivePtr &a)
Given a weighing factor and an optimization objective, returns a MultiOptimizationObjective containing only this objective weighted by the given weight.
-
friend OptimizationObjectivePtr operator*(const OptimizationObjectivePtr &a, double weight)
Given a weighing factor and an optimization objective, returns a MultiOptimizationObjective containing only this objective weighted by the given weight.
-
struct Component
Defines a pairing of an objective and its weight.
Public Functions
-
Component(OptimizationObjectivePtr obj, double weight)
-
Component(OptimizationObjectivePtr obj, double weight)
-
MultiOptimizationObjective(const SpaceInformationPtr &si)