Node

class bnbpy.cython.node.Node

Bases: object

Class for representing a node in a search tree.

branch()

Calls problem branch() method to create derived sub-problems. Each subproblem is used to instantiate a child node. Child nodes are evaluated in terms of lower bound as they are initialized.

Returns:

List of child nodes, if any

Return type:

list[Node]

check_feasible()

Calls problem check_feasible() method

Returns:

Feasibility check result

Return type:

bool

children
compute_bound()

Computes the lower bound of the problem and sets it to problem attribute lb, which is referenced as a Node property.

copy(deep=True)
index
lb
level
parent
problem
set_solution(solution)

Calls method set_solution of problem, which also computes its lower bound if not yet solved.

Parameters:

solution (Solution) – New solution to overwrite current

solution