public class LPStandardConverter extends Object
LPs to standard form, "Convex Optimization", p 147
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 |
---|
LPStandardConverter()
Constructor, set the strictlyStandardForm to false
|
LPStandardConverter(boolean strictlySF)
Constructor, set the default unbounded lower and upper bounds
|
LPStandardConverter(boolean strictlySF,
double unboundedLBVal,
double unboundedUBVal)
Constructor
|
LPStandardConverter(double unboundedLBVal,
double unboundedUBVal)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
getOriginalN()
Get the original number of variables
|
RealMatrix |
getStandardA()
Get the final equalities constraints coefficients
|
RealVector |
getStandardB()
Get the final equalities constraints limits
|
RealVector |
getStandardC()
Get the final objective function
|
double[] |
getStandardComponents(double[] x)
Express a vector in the original variables in the final standard variable form
|
RealVector |
getStandardLB()
Get the final lower bounds
This makes sense only if strictlyStandardForm = false (otherwise all lb are 0).
|
int |
getStandardN()
Get the final number of variables
|
int |
getStandardS()
Get the final number of slack variables for inequalities constraints
|
RealVector |
getStandardUB()
Get the final upper bounds
This makes sense only if strictlyStandardForm = false (otherwise all ub are unbounded).
|
double |
getUnboundedLBValue()
Get the unbounded lower bound value
|
double |
getUnboundedUBValue()
Get the unbounded upper bound value
|
boolean |
isLbUnbounded(Double lb)
Is the lower bound unbounded?
|
boolean |
isUbUnbounded(Double ub)
Is the upper bound unbounded?
|
double[] |
postConvert(double[] x)
Get back the vector in the original components.
|
void |
toStandardForm(double[] originalC,
double[][] originalG,
double[] originalH,
double[][] originalA,
double[] originalB,
double[] originalLB,
double[] originalUB)
Transforms the problem from a general form to the (quasi) standard LP form.
|
void |
toStandardForm(RealVector originalC,
RealMatrix originalG,
RealVector originalH,
RealMatrix originalA,
RealVector originalB,
RealVector originalLB,
RealVector originalUB)
Transforms the problem from a general form to the (quasi) standard LP form.
|
public static final double DEFAULT_UNBOUNDED_LOWER_BOUND
public static final double DEFAULT_UNBOUNDED_UPPER_BOUND
public LPStandardConverter()
public LPStandardConverter(boolean strictlySF)
strictlySF
- true/falsepublic LPStandardConverter(double unboundedLBVal, double unboundedUBVal)
unboundedLBVal
- unbounded lower bound valueunboundedUBVal
- unbounded upper bound valuepublic LPStandardConverter(boolean strictlySF, double unboundedLBVal, double unboundedUBVal)
strictlySF
- true/falseunboundedLBVal
- unbounded lower bound valueunboundedUBVal
- unbounded upper bound valuepublic void toStandardForm(double[] originalC, double[][] originalG, double[] originalH, double[][] originalA, double[] originalB, double[] originalLB, double[] originalUB)
originalC
- original C arrayoriginalG
- original G matrixoriginalH
- original H arrayoriginalA
- original A matrixoriginalB
- original B arrayoriginalLB
- if null, all lower bounds default to this.unspecifiedLBValueoriginalUB
- if null, all upper bounds default to this.unspecifiedUBValueLPs to standard form, "Convex Optimization", p 147
public void toStandardForm(RealVector originalC, RealMatrix originalG, RealVector originalH, RealMatrix originalA, RealVector originalB, RealVector originalLB, RealVector originalUB)
originalC
- original C arrayoriginalG
- original G matrixoriginalH
- original H arrayoriginalA
- original A matrixoriginalB
- original B arrayoriginalLB
- if null, all lower bounds default to this.unspecifiedLBValueoriginalUB
- if null, all upper bounds default to this.unspecifiedUBValueLPs to standard form, "Convex Optimization", p 147
public double[] postConvert(double[] x)
x
- vector in the standard variablespublic double[] getStandardComponents(double[] x)
x
- vector in the original variablespublic int getOriginalN()
public int getStandardN()
public int getStandardS()
public RealVector getStandardC()
public RealMatrix getStandardA()
public RealVector getStandardB()
public RealVector getStandardLB()
public RealVector getStandardUB()
public boolean isLbUnbounded(Double lb)
lb
- lower boundpublic boolean isUbUnbounded(Double ub)
ub
- upper boundpublic double getUnboundedLBValue()
public double getUnboundedUBValue()
Copyright © 2021 CNES. All rights reserved.