octave: Quadratic Programming

 
 25.2 Quadratic Programming
 ==========================
 
 Octave can also solve Quadratic Programming problems, this is
 
      min 0.5 x'*H*x + x'*q
 
    subject to
 
           A*x = b
           lb <= x <= ub
           A_lb <= A_in*x <= A_ub
 
  -- : [X, OBJ, INFO, LAMBDA] = qp (X0, H)
  -- : [X, OBJ, INFO, LAMBDA] = qp (X0, H, Q)
  -- : [X, OBJ, INFO, LAMBDA] = qp (X0, H, Q, A, B)
  -- : [X, OBJ, INFO, LAMBDA] = qp (X0, H, Q, A, B, LB, UB)
  -- : [X, OBJ, INFO, LAMBDA] = qp (X0, H, Q, A, B, LB, UB, A_LB, A_IN,
           A_UB)
  -- : [X, OBJ, INFO, LAMBDA] = qp (..., OPTIONS)
      Solve a quadratic program (QP).
 
      Solve the quadratic program defined by
 
           min 0.5 x'*H*x + x'*q
            x
 
      subject to
 
           A*x = b
           lb <= x <= ub
           A_lb <= A_in*x <= A_ub
 
      using a null-space active-set method.
 
      Any bound (A, B, LB, UB, A_IN, A_LB, A_UB) may be set to the empty
      matrix (‘[]’) if not present.  The constraints A and A_IN are
      matrices with each row representing a single constraint.  The other
      bounds are scalars or vectors depending on the number of
      constraints.  The algorithm is faster if the initial guess is
      feasible.
 
      OPTIONS
           An optional structure containing the following parameter(s)
           used to define the behavior of the solver.  Missing elements
           in the structure take on default values, so you only need to
           set the elements that you wish to change from the default.
 
           ‘MaxIter (default: 200)’
                Maximum number of iterations.
 
      INFO
           Structure containing run-time information about the algorithm.
           The following fields are defined:
 
           ‘solveiter’
                The number of iterations required to find the solution.
 
           ‘info’
                An integer indicating the status of the solution.
 
                0
                     The problem is feasible and convex.  Global solution
                     found.
 
                1
                     The problem is not convex.  Local solution found.
 
                2
                     The problem is not convex and unbounded.
 
                3
                     Maximum number of iterations reached.
 
                6
                     The problem is infeasible.
 
  -- : X = pqpnonneg (C, D)
  -- : X = pqpnonneg (C, D, X0)
  -- : [X, MINVAL] = pqpnonneg (...)
  -- : [X, MINVAL, EXITFLAG] = pqpnonneg (...)
  -- : [X, MINVAL, EXITFLAG, OUTPUT] = pqpnonneg (...)
  -- : [X, MINVAL, EXITFLAG, OUTPUT, LAMBDA] = pqpnonneg (...)
      Minimize ‘1/2*x'*c*x + d'*x’ subject to ‘X >= 0’.
 
      C and D must be real, and C must be symmetric and positive
      definite.
 
      X0 is an optional initial guess for X.
 
      Outputs:
 
         • minval
 
           The minimum attained model value, 1/2*xmin’*c*xmin + d’*xmin
 
         • exitflag
 
           An indicator of convergence.  0 indicates that the iteration
           count was exceeded, and therefore convergence was not reached;
           >0 indicates that the algorithm converged.  (The algorithm is
           stable and will converge given enough iterations.)
 
         • output
 
           A structure with two fields:
 
              • "algorithm": The algorithm used ("nnls")
 
              • "iterations": The number of iterations taken.
 
         • lambda
 
           Not implemented.
 
DONTPRINTYET       See also: Seeoptimset XREFoptimset, *notelsqnonneg:
DONTPRINTYET       See also: Seeoptimset XREFoptimset, Seelsqnonneg

      XREFlsqnonneg, Seeqp XREFqp.