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()
BBNode
public double value()
BBNode
public boolean isCandidate()
BBNode
isCandidate
in interface BBNode
true
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()
ConstrainedOptimProblem
getLessThanConstraints
in interface ConstrainedOptimProblem
public EqualityConstraints getEqualityConstraints()
ConstrainedOptimProblem
getEqualityConstraints
in interface ConstrainedOptimProblem
public int dimension()
OptimProblem
dimension
in interface OptimProblem
public RealScalarFunction f()
OptimProblem
f
in interface OptimProblem
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.