public class ILPProblemImpl1 extends Object implements ILPProblem
| Constructor and Description |
|---|
ILPProblemImpl1(Vector cost,
LinearGreaterThanConstraints greater,
LinearLessThanConstraints less,
LinearEqualityConstraints equal,
BoxConstraints bounds,
int[] integers,
double epsilon)
Construct an ILP problem, in which the variables can be real or integral.
|
| Modifier and Type | Method and Description |
|---|---|
ImmutableMatrix |
A()
Get the coefficients, A, of the greater-than-or-equal-to constraints A * x ≥ b.
|
ImmutableMatrix |
Aeq()
Get the coefficients, Aeq, of the equality constraints Aeq * x ≥ beq.
|
ImmutableVector |
b()
Get the values, b, of the greater-than-or-equal-to constraints A * x ≥ b.
|
ImmutableVector |
beq()
Get the values, beq, of the equality constraints Aeq * x ≥ beq.
|
ImmutableVector |
c()
Get the objective function.
|
int |
dimension()
Get the number of variables.
|
double |
epsilon()
Get the threshold to check whether a variable is an integer.
|
RealScalarFunction |
f()
Get the objective function.
|
LinearEqualityConstraints |
getEqualityConstraints()
Gets the equality constraints, hi(x) = 0
|
int[] |
getIntegerIndices()
Get the indices of the integral variables.
|
LinearLessThanConstraints |
getLessThanConstraints()
Gets the less-than-or-equal-to constraints, gi(x) ≤
0
|
int[] |
getNonIntegralIndices(double[] x)
Check which elements in x do not satisfy the integral constraints.
|
boolean |
isFree(int i)
Check whether xi is a free variable after handling the box constraints.
|
public ILPProblemImpl1(Vector cost, LinearGreaterThanConstraints greater, LinearLessThanConstraints less, LinearEqualityConstraints equal, BoxConstraints bounds, int[] integers, double epsilon)
cost - the linear objective functiongreater - the greater-than-or-equal-to constraintsless - the less-than-or-equal-to constraintsequal - the equality constraintsbounds - the box constraintsintegers - the indices of the integral variablesepsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0public double epsilon()
IPProblempublic int[] getIntegerIndices()
IPProblemgetIntegerIndices in interface IPProblempublic int[] getNonIntegralIndices(double[] x)
IPProblemgetNonIntegralIndices in interface IPProblemx - an argument to the objective functionint[] of length 0 indicates that all integral variables in x are integers.public LinearLessThanConstraints getLessThanConstraints()
ConstrainedOptimProblemgetLessThanConstraints in interface ConstrainedOptimProblempublic LinearEqualityConstraints getEqualityConstraints()
ConstrainedOptimProblemgetEqualityConstraints in interface ConstrainedOptimProblempublic int dimension()
OptimProblemdimension in interface OptimProblempublic RealScalarFunction f()
OptimProblemf in interface OptimProblempublic ImmutableVector c()
LPProblempublic ImmutableMatrix A()
LPProblempublic ImmutableVector b()
LPProblempublic ImmutableMatrix Aeq()
LPProblempublic ImmutableVector beq()
LPProblemCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.