public class LPPresolver extends Object
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_UNBOUNDED_LOWER_BOUND
Default unbounded lower bound
|
static double |
DEFAULT_UNBOUNDED_UPPER_BOUND
Default unbounded upper bound
|
Constructor and Description |
---|
LPPresolver()
Default constructor
|
LPPresolver(double unboundedLBVal,
double unboundedUBVal)
Constructor
|
Modifier and Type | Method and Description |
---|---|
double |
getMaxRescaledUB()
Get the maximum rescaled lower bound
|
double |
getMinRescaledLB()
Get the minimum rescaled lower bound
|
int |
getOriginalMeq()
Get the original number of variables
|
int |
getOriginalN()
Get the original number of variables
|
RealMatrix |
getPresolvedA()
Get the presolved matrix A
|
RealVector |
getPresolvedB()
Get the presolved vector B
|
RealVector |
getPresolvedC()
Get the presolved vector C
|
RealVector |
getPresolvedLB()
Get the presolved lower bounds vector
|
int |
getPresolvedMeq()
Get the presolved number of variables
|
int |
getPresolvedN()
Get the presolved number of variables
|
RealVector |
getPresolvedUB()
Get the presolved upper bounds vector
|
RealVector |
getPresolvedYlb()
Get the presolved Y lower bounds vector
|
RealVector |
getPresolvedYub()
Get the presolved Y upper bounds vector
|
RealVector |
getPresolvedZlb()
Get the presolved Z lower bounds vector
|
RealVector |
getPresolvedZub()
Get the presolved Z upper bounds vector
|
boolean |
isAvoidIncreaseSparsity()
If true, no method for making normal equations sparser will be applied.
|
boolean |
isLBUnbounded(double lb)
Is the lower bound unbounded?
|
boolean |
isUBUnbounded(double ub)
Is the upper bound unbounded?
|
double[] |
postsolve(double[] x)
From the full x, gives back its postsolved elements.
|
double[] |
presolve(double[] x)
From the full x, gives back its presolved elements.
|
void |
presolve(double[] originalC,
double[][] originalA,
double[] originalB,
double[] originalLB,
double[] originalUB)
Presolve
|
void |
presolve(RealVector originalC,
RealMatrix originalA,
RealVector originalB,
RealVector originalLB,
RealVector originalUB)
Presolve
|
void |
setAvoidFillIn(boolean avoidFI)
Set true if no methods that cause fill-in in the original matrices will be called or false otherwise
|
void |
setAvoidIncreaseSparsity(boolean avoidIS)
Set true if no method for making normal equations sparser will be applied or false otherwise
|
void |
setAvoidScaling(boolean avoidS)
Set if the matrix scaling should be disabled (true) or not (false)
|
void |
setExpectedSolution(double[] sol)
Just for testing porpose
|
void |
setNOfSlackVariables(int nOfSlackVar)
Set the number of slack variables
|
void |
setZeroTolerance(double epsilon)
Set the value for zero-comparison:
if |a - b| < eps then a - b = 0. |
public static final double DEFAULT_UNBOUNDED_LOWER_BOUND
public static final double DEFAULT_UNBOUNDED_UPPER_BOUND
public LPPresolver()
public LPPresolver(double unboundedLBVal, double unboundedUBVal)
unboundedLBVal
- unbounded lower boundunboundedUBVal
- unbounded upper boundpublic boolean isAvoidIncreaseSparsity()
public void setAvoidIncreaseSparsity(boolean avoidIS)
avoidIS
- true/falsepublic void setAvoidFillIn(boolean avoidFI)
avoidFI
- true/falsepublic void setAvoidScaling(boolean avoidS)
avoidS
- true/falsepublic void presolve(double[] originalC, double[][] originalA, double[] originalB, double[] originalLB, double[] originalUB)
originalC
- original C vectororiginalA
- original A matrixoriginalB
- original B vectororiginalLB
- original LB vectororiginalUB
- original UB vectorpublic void presolve(RealVector originalC, RealMatrix originalA, RealVector originalB, RealVector originalLB, RealVector originalUB)
originalC
- original C vectororiginalA
- original A matrixoriginalB
- original B vectororiginalLB
- original LB vectororiginalUB
- original UB vectorpublic double[] presolve(double[] x)
x
- full xpublic double[] postsolve(double[] x)
x
- full xpublic boolean isLBUnbounded(double lb)
lb
- lower boundpublic boolean isUBUnbounded(double ub)
ub
- upper boundpublic int getOriginalN()
public int getOriginalMeq()
public int getPresolvedN()
public int getPresolvedMeq()
public RealVector getPresolvedC()
public RealMatrix getPresolvedA()
public RealVector getPresolvedB()
public RealVector getPresolvedLB()
public RealVector getPresolvedUB()
public RealVector getPresolvedYlb()
public RealVector getPresolvedYub()
public RealVector getPresolvedZlb()
public RealVector getPresolvedZub()
public void setNOfSlackVariables(int nOfSlackVar)
nOfSlackVar
- numberpublic void setExpectedSolution(double[] sol)
sol
- solutionpublic double getMinRescaledLB()
public double getMaxRescaledUB()
public void setZeroTolerance(double epsilon)
epsilon
- valueCopyright © 2023 CNES. All rights reserved.