ompl::base::CostConvergenceTerminationCondition Class Reference

: A termination condition for stopping an optimizing planner based on cost convergence More...

#include <ompl/base/terminationconditions/CostConvergenceTerminationCondition.h>

Inheritance diagram for ompl::base::CostConvergenceTerminationCondition:

Public Member Functions

 CostConvergenceTerminationCondition (ProblemDefinitionPtr &pdef, size_t solutionsWindow=10, double epsilon=0.1)
 Constructor. More...
void processNewSolution (const Cost solutionCost)
- Public Member Functions inherited from ompl::base::PlannerTerminationCondition
 PlannerTerminationCondition (const PlannerTerminationConditionFn &fn)
 Construct a termination condition. By default, eval() will call the externally specified function fn to decide whether the planner should terminate.
 PlannerTerminationCondition (const PlannerTerminationConditionFn &fn, double period)
 Construct a termination condition that is evaluated every period seconds. The evaluation of the condition consists of calling fn() in a separate thread. Calls to eval() will always return the last value computed by the call to fn().
bool operator() () const
 Return true if the planner should stop its computation.
 operator bool () const
 Cast as true if the planner should stop its computation.
void terminate () const
 Notify that the condition for termination should become true, regardless of what eval() returns. This function may be called while the condition is being evaluated by other threads.
bool eval () const
 The implementation of some termination condition. By default, this just calls fn_()

Detailed Description

: A termination condition for stopping an optimizing planner based on cost convergence

Definition at line 111 of file CostConvergenceTerminationCondition.h.

Constructor & Destructor Documentation

◆ CostConvergenceTerminationCondition()

ompl::base::CostConvergenceTerminationCondition::CostConvergenceTerminationCondition ( ProblemDefinitionPtr pdef,
size_t  solutionsWindow = 10,
double  epsilon = 0.1 


pdefProblem definition, needed to get access to the optimization objective and to set a callback to get intermediate solutions.
solutionsWindowMinimum number of solutions to use in deciding whether a planner has converged.
epsilonThreshold to consider for convergence. This should be a positive number close to 0. If the cumulative moving average does not change by a relative fraction of epsilon after a new better solution is found, convergence has been reached and a planner should terminate..

Definition at line 39 of file CostConvergenceTerminationCondition.cpp.

The documentation for this class was generated from the following files: