public class BranchAndBound extends Object implements MinimizationSolution<Vector>, IterativeMethod<BBNode>
Constructor and Description |
---|
BranchAndBound(ActiveList activeList,
BBNode root)
Solve a minimization problem using a branch-and-bound algorithm.
|
BranchAndBound(BBNode root)
Solve a minimization problem using a branch-and-bound algorithm using depth-first search.
|
Modifier and Type | Method and Description |
---|---|
ImmutableVector |
minimizer()
Get the minimizer (solution) to the minimization problem.
|
double |
minimum()
Get the (approximate) minimum found.
|
BBNode |
search(BBNode... initials)
Search for a solution that optimizes the objective function from the
given starting points.
|
void |
setInitials(BBNode... root)
Supply the starting points for the search.
|
Boolean |
step()
Do the next iteration.
|
public BranchAndBound(ActiveList activeList, BBNode root)
activeList
- the node popping strategy, e.g., depth-first-search, best-first-searchroot
- the root node of a minimization problempublic BranchAndBound(BBNode root)
root
- the root node of a minimization problempublic double minimum()
MinimizationSolution
minimum
in interface MinimizationSolution<Vector>
public ImmutableVector minimizer()
MinimizationSolution
minimizer
in interface MinimizationSolution<Vector>
public final void setInitials(BBNode... root)
IterativeMethod
setInitials
in interface IterativeMethod<BBNode>
root
- the initial guessespublic Boolean step() throws Exception
IterativeMethod
step
in interface IterativeMethod<BBNode>
Exception
- when an error occurs during the searchpublic BBNode search(BBNode... initials) throws Exception
IterativeMethod
#setInitials(S...)
and then
iteratively IterativeMethod.step()
.
It implements a default convergence criterion.search
in interface IterativeMethod<BBNode>
initials
- the initial guessesException
- when an error occurs during the searchCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.