Branch and bound base class. More...
#include <branch_and_bound_base.h>
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_t * | planner_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. |
Branch and bound base class.
An abstract branch and bround heuristic class. All heuristics should inherit from this class.
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.
Implemented in smp::branch_and_bound_euclidean< typeparams, NUM_DIMENSIONS >.
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.
planner_in | New planner |
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.
upper_bound_cost_in | upper_bound_cost_in |
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.
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.