public class ILPNode extends Object implements BBNode, ConstrainedOptimProblem
ILPBranchAndBoundMinimizer to
solve an Integer Linear Programming problem.| Constructor and Description |
|---|
ILPNode(ILPProblem problem)
Construct a BB node and associate it with an ILP problem.
|
| Modifier and Type | Method and Description |
|---|---|
List<ILPNode> |
branching()
Get the children of this node by using the branching operation.
|
int |
dimension()
Get the number of variables.
|
RealScalarFunction |
f()
Get the objective function.
|
EqualityConstraints |
getEqualityConstraints()
Gets the equality constraints, hi(x) = 0
|
static LinearGreaterThanConstraints |
getGreaterThanConstraint(Vector minimizer,
int i)
Construct a greater-than constraint for the branching greater-than subproblem.
|
static LinearLessThanConstraints |
getLessThanConstraint(Vector minimizer,
int i)
Construct a less-than constraint for the branching less-than subproblem.
|
LessThanConstraints |
getLessThanConstraints()
Gets the less-than-or-equal-to constraints, gi(x) ≤
0
|
boolean |
isCandidate()
Check if this node is a possible solution to the original problem, e.g., not pruned.
|
ImmutableVector |
solution()
the solution to the sub-problem associated with this node
|
String |
toString() |
double |
value()
the value of this node
|
public ILPNode(ILPProblem problem)
problem - an ILP problempublic ImmutableVector solution()
BBNodepublic double value()
BBNodepublic boolean isCandidate()
BBNodeisCandidate in interface BBNodetrue if this node is a possible solution to the original problempublic List<ILPNode> branching()
public static LinearLessThanConstraints getLessThanConstraint(Vector minimizer, int i)
minimizer - the node's solutioni - the index of a non-satisfying integral variable (the branching variable),
counting from 1public static LinearGreaterThanConstraints getGreaterThanConstraint(Vector minimizer, int i)
minimizer - the node's solutioni - the index of a non-satisfying integral variable (the branching variable),
counting from 1public LessThanConstraints getLessThanConstraints()
ConstrainedOptimProblemgetLessThanConstraints in interface ConstrainedOptimProblempublic EqualityConstraints getEqualityConstraints()
ConstrainedOptimProblemgetEqualityConstraints in interface ConstrainedOptimProblempublic int dimension()
OptimProblemdimension in interface OptimProblempublic RealScalarFunction f()
OptimProblemf in interface OptimProblemCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.