Module ojalgo

Class NullSpaceProjection


  • class NullSpaceProjection
    extends java.lang.Object
    Null-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 Detail

      • myOriginal

        private final ConvexData<java.lang.Double> myOriginal
      • myDecomposition

        private final QR<java.lang.Double> myDecomposition
      • 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.
      • 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.