public class LPProblemImpl1 extends Object implements LPProblem
LPProblem.
For convenient construction, this implementation allows all forms of linear constraints:
| Constructor and Description |
|---|
LPProblemImpl1(Vector cost,
LinearGreaterThanConstraints greater,
LinearEqualityConstraints equal)
Construct a general linear programming problem with only greater-than-or-equal-to and
equality constraints.
|
LPProblemImpl1(Vector cost,
LinearGreaterThanConstraints greater,
LinearLessThanConstraints less,
LinearEqualityConstraints equal,
BoxConstraints bounds)
Construct a general linear programming problem.
|
| 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.
|
RealScalarFunction |
f()
Get the objective function.
|
LinearEqualityConstraints |
getEqualityConstraints()
Gets the equality constraints, hi(x) = 0
|
LinearLessThanConstraints |
getLessThanConstraints()
Gets the less-than-or-equal-to constraints, gi(x) ≤
0
|
boolean |
isFree(int i)
Check whether xi is a free variable after handling the box constraints.
|
int |
nEqualities()
Get the number of equality constraints.
|
int |
nGreaterThanInequalities()
Get the number of greater-than-or-equal-to constraints.
|
String |
toString() |
public LPProblemImpl1(Vector cost, LinearGreaterThanConstraints greater, LinearLessThanConstraints less, LinearEqualityConstraints equal, BoxConstraints bounds)
cost - the objective functiongreater - the greater-than-or-equal-to inequality constraintsless - the less-than-or-equal-to inequality constraintsequal - the equality constraintsbounds - the bounds for variablespublic LPProblemImpl1(Vector cost, LinearGreaterThanConstraints greater, LinearEqualityConstraints equal)
cost - the objective functiongreater - the greater-than-or-equal-to inequality constraintsequal - the equality constraintspublic int nGreaterThanInequalities()
public int nEqualities()
public int dimension()
OptimProblemdimension in interface OptimProblempublic RealScalarFunction f()
OptimProblemf in interface OptimProblempublic LinearLessThanConstraints getLessThanConstraints()
ConstrainedOptimProblemgetLessThanConstraints in interface ConstrainedOptimProblempublic LinearEqualityConstraints getEqualityConstraints()
ConstrainedOptimProblemgetEqualityConstraints in interface ConstrainedOptimProblempublic ImmutableVector c()
LPProblempublic ImmutableMatrix A()
LPProblempublic ImmutableVector b()
LPProblempublic ImmutableMatrix Aeq()
LPProblempublic ImmutableVector beq()
LPProblempublic boolean isFree(int i)
LPProblemCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.