smp::branch_and_bound_base< typeparams > Class Template Reference

Branch and bound base class. More...

#include <branch_and_bound_base.h>

Inheritance diagram for smp::branch_and_bound_base< typeparams >:
smp::branch_and_bound_euclidean< typeparams, NUM_DIMENSIONS >

List of all members.

Public Member Functions

int set_planner (planner_t *planner_in)
 Sets the planner to which the branch and bound heuristic will be applied.
int set_upper_bound_cost (double upper_bound_cost_in)
 Sets an upper bound for the optimal cost.
virtual int run_branch_and_bound ()=0
 Runs the branch and bound algorithm.

Protected Attributes

planner_tplanner_bnb
 The planner on which the branch and bound heuristic is applied.
double upper_bound_cost
 An upper bound on the cost of an optimal solution.

Detailed Description

template<class typeparams>
class smp::branch_and_bound_base< typeparams >

Branch and bound base class.

An abstract branch and bround heuristic class. All heuristics should inherit from this class.


Member Function Documentation

template<class typeparams >
virtual int smp::branch_and_bound_base< typeparams >::run_branch_and_bound ( ) [pure virtual]

Runs the branch and bound algorithm.

Once this function is called, the branch and bound algorithm goes through all the vertices in the graph and deletes those that can not lead to (or unlikely to lead to) an optimal solution.

Returns:
Returns 1 for success, and a non-positive value to indicate failure.

Implemented in smp::branch_and_bound_euclidean< typeparams, NUM_DIMENSIONS >.

template<class typeparams >
int smp::branch_and_bound_base< typeparams >::set_planner ( planner_t planner_in)

Sets the planner to which the branch and bound heuristic will be applied.

The branch and bound heuristic works with the vertex list of the planner that it is given as an input. The planner is provided to the branch and bound heuristic using this function.

Parameters:
planner_inNew planner
Returns:
Returns 1 for success, and a non-positive value to indicate failure.
template<class typeparams >
int smp::branch_and_bound_base< typeparams >::set_upper_bound_cost ( double  upper_bound_cost_in)

Sets an upper bound for the optimal cost.

The branch and bound heuristic requires an upper bound on the cost of an optimal solution. This function can be used to set and update this upper bound.

Parameters:
upper_bound_cost_inupper_bound_cost_in
Returns:
Returns 1 for success, and a non-positive value to indicate failure.

Member Data Documentation

template<class typeparams >
planner_t* smp::branch_and_bound_base< typeparams >::planner_bnb [protected]

The planner on which the branch and bound heuristic is applied.

The branch and bound heuristic uses this variable to access, e.g., the vertex list of the planner that the heuristic is being applied.

template<class typeparams >
double smp::branch_and_bound_base< typeparams >::upper_bound_cost [protected]

An upper bound on the cost of an optimal solution.

This variable can be used by any derived class to access the upper bound on the cost of an optimal solution. This variable is usually frequently updated by the user using the set_upper_bound_cost function over the course of an incremental planning process.


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