pybnb.futures¶
-
class
pybnb.futures.NestedSolver(problem, node_limit=None, time_limit=5, queue_limit=None, track_bound=True, queue_strategy='depth')[source]¶ A class for creating a nested branch-and-bound solve strategy. An instance of this class (wrapped around a standard problem) can be passed to the solver as the problem argument.
Parameters: - problem (
pybnb.Problem) – An object defining a branch-and-bound problem. - node_limit (int, optional) – The same as the standard solver option, but applied to the nested solver to limit the number of nodes to explore when processing a work item. (default: None)
- time_limit (float, optional) – The same as the standard solver option, but applied to the nested solver to limit the amount of time spent processing a work item. (default: 5)
- queue_limit (int, optional) – The same as the standard solver option, but applied to the nested solver to limit the size of the queue. (default: None)
- track_bound (bool, optional) – The same as the standard solver option, but applied to the nested solver control bound tracking. (default: True)
- queue_strategy (
QueueStrategyor tuple) – The same as the standard solver option, but applied to the nested solver to control the queue strategy used when processing a work item. (default: ‘depth’)
-
objective()[source]¶ The solver does not call this method when it sees the problem implements a nested solve.
-
bound()[source]¶ The solver does not call this method when it sees the problem implements a nested solve.
-
branch()[source]¶ The solver does not call this method when it sees the problem implements a nested solve.
-
load_state(node)[source]¶ Calls the load_state() method on the user-provided problem and prepares for a nested solve.
-
notify_solve_begins(comm, worker_comm, convergence_checker)[source]¶ Calls the notify_solve_begins() method on the user-provided problem and prepares for a solve.
- problem (