- java.lang.Object
-
- org.ojalgo.optimisation.convex.NullSpaceProjection
-
class NullSpaceProjection extends java.lang.ObjectNull-Space Projection for Convex Optimisation Problems with Equality Constraints.This class provides methods to reduce a convex optimisation problem with equality constraints to an equivalent problem without equality constraints, and fewer variables, by projecting onto the null-space of the equality constraint matrix. It uses QR decomposition to find a basis for the null-space and constructs the reduced problem accordingly.
There is of course some overhead in performing the reduction and in mapping solutions back and forth between the full and reduced problems, so this approach is most beneficial when the number of equality constraints is significant compared to the number of variables. In addition, the reduced problem may be denser than the original, which can impact solver performance.
-
-
Field Summary
Fields Modifier and Type Field Description private QR<java.lang.Double>myDecompositionprivate ConvexData<java.lang.Double>myOriginalprivate ConvexData<java.lang.Double>myReducedprivate MatrixStore<java.lang.Double>myX0private MatrixStore<java.lang.Double>myZ
-
Constructor Summary
Constructors Constructor Description NullSpaceProjection(ConvexData<java.lang.Double> original, QR<java.lang.Double> decomposition, MatrixStore<java.lang.Double> Z, MatrixStore<java.lang.Double> x0)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) ConvexData<java.lang.Double>getReduced()Constructs and returns the reduced convex optimisation problem without equality constraints.(package private) static NullSpaceProjectionreduce(ConvexData<java.lang.Double> fullModel)Reduces the given convex optimisation problem by eliminating equality constraints using null-space projection.(package private) Optimisation.ResulttoFullModelState(Optimisation.Result reducedlState)Maps a solution of the reduced problem back to a solution of the original full problem.(package private) Optimisation.ResulttoReducedState(Optimisation.Result fullModelState)Maps a solution of the full problem to a solution of the reduced problem.
-
-
-
Field Detail
-
myOriginal
private final ConvexData<java.lang.Double> myOriginal
-
myDecomposition
private final QR<java.lang.Double> myDecomposition
-
myZ
private final MatrixStore<java.lang.Double> myZ
-
myX0
private final MatrixStore<java.lang.Double> myX0
-
myReduced
private transient ConvexData<java.lang.Double> myReduced
-
-
Constructor Detail
-
NullSpaceProjection
NullSpaceProjection(ConvexData<java.lang.Double> original, QR<java.lang.Double> decomposition, MatrixStore<java.lang.Double> Z, MatrixStore<java.lang.Double> x0)
-
-
Method Detail
-
reduce
static NullSpaceProjection reduce(ConvexData<java.lang.Double> fullModel)
Reduces the given convex optimisation problem by eliminating equality constraints using null-space projection.
-
getReduced
ConvexData<java.lang.Double> getReduced()
Constructs and returns the reduced convex optimisation problem without equality constraints.
-
toFullModelState
Optimisation.Result toFullModelState(Optimisation.Result reducedlState)
Maps a solution of the reduced problem back to a solution of the original full problem.
-
toReducedState
Optimisation.Result toReducedState(Optimisation.Result fullModelState)
Maps a solution of the full problem to a solution of the reduced problem. If the full problem solution is null or infeasible, null is returned.
-
-