BnB typically interacts with a complete subtask solver:
best_cost_soln_so_far = +inf
while (better_cost_soln = search_for_soln_cheaper_than(best_cost_soln_so_far))
{
best_cost_soln_so_far = better_cost_soln
backtrack_into_search
}
Thus, your search for sub-problems will return when the cost of any partial solution that he examines exceeds the binding established best_cost_soln_so_far. If the search for a subtask finds a better solution, it is updated best_cost_soln_so_far, and the search continues from where he left off, looking for an even better solution. This is pretty easy to implement.
, , TSP, - ; , .