Class QPProblem

  • All Implemented Interfaces:
    ConstrainedOptimProblem, OptimProblem

    public class QPProblem
    extends Object
    implements ConstrainedOptimProblem
    Quadratic Programming is the problem of optimizing (minimizing) a quadratic function of several variables subject to linear constraints on these variables. The standard form, following the convention in the reference, is: \[ \min_x \left \{ \frac{1}{2} \times x'Hx + x'p \right \} \\ Ax \geq b, A_{eq}x = b_{eq} \]
    See Also:
    • Wikipedia: Quadratic programming
    • "Andreas Antoniou, Wu-Sheng Lu, "Chapter 13, Quadratic and Convex Programming," Practical Optimization: Algorithms and Engineering Applications."
    • Constructor Detail

      • QPProblem

        public QPProblem​(QuadraticFunction f,
                         LinearGreaterThanConstraints greater,
                         LinearLessThanConstraints less)
        Construct a quadratic programming problem with linear inequality constraints.
        Parameters:
        f - the quadratic objective function to be minimized
        greater - the linear greater-than-or-equal-to constraints
        less - the linear less-than-or-equal-to constraints
      • QPProblem

        public QPProblem​(QuadraticFunction f,
                         LinearEqualityConstraints equal,
                         LinearGreaterThanConstraints greater)
        Construct a quadratic programming problem with linear equality and greater-than-or-equal-to constraints.
        Parameters:
        f - the quadratic objective function to be minimized
        equal - the linear equality constraints
        greater - the linear greater-than-or-equal-to constraints
      • QPProblem

        public QPProblem​(QuadraticFunction f,
                         LinearGreaterThanConstraints greater)
        Construct a quadratic programming problem with linear greater-than-or-equal-to constraints.
        Parameters:
        f - the quadratic objective function to be minimized
        greater - the linear greater-than-or-equal-to constraints
      • QPProblem

        public QPProblem​(QuadraticFunction f,
                         LinearEqualityConstraints equal,
                         LinearLessThanConstraints less)
        Construct a quadratic programming problem with linear equality and less-than-or-equal-to constraints.
        Parameters:
        f - the quadratic objective function to be minimized
        equal - the linear equality constraints
        less - the linear less-than-or-equal-to constraints
      • QPProblem

        public QPProblem​(QuadraticFunction f,
                         LinearLessThanConstraints less)
        Construct a quadratic programming problem with linear less-than-or-equal-to constraints.
        Parameters:
        f - the quadratic objective function to be minimized
        less - the linear less-than-or-equal-to constraints
      • QPProblem

        public QPProblem​(QPProblem that)
        Copy constructor.
        Parameters:
        that - an quadratic programming problem
    • Method Detail

      • dimension

        public int dimension()
        Description copied from interface: OptimProblem
        Get the number of variables.
        Specified by:
        dimension in interface OptimProblem
        Returns:
        the number of variables.
      • getGreaterThanConstraints

        public LinearGreaterThanConstraints getGreaterThanConstraints()
        Get the set of linear greater-than-or-equal-to constraints.
        Returns:
        the set of linear greater-than-or-equal-to constraints
      • A

        public ImmutableMatrix A()
        Get the coefficients of the inequality constraints: A as in \(Ax \geq b\).
        Returns:
        the inequality constraint coefficients
      • b

        public ImmutableVector b()
        Get the values of the inequality constraints: b as in \(Ax \geq b\).
        Returns:
        the inequality constraint values
      • Aeq

        public ImmutableMatrix Aeq()
        Get the coefficients of the equality constraints: Aeq as in \(A_{eq}x = b_{eq}\).
        Returns:
        the equality constraint coefficients
      • beq

        public ImmutableVector beq()
        Get the values of the equality constraints: beq as in \(A_{eq}x = b_{eq}\).
        Returns:
        the equality constraint values