Home > freetb4matlab > optimization > qp.m

# qp

## SYNOPSIS

function [x, obj, INFO, lambda] = qp (x0, H, q, A, b, lb, ub, A_lb, A_in, A_ub)

## DESCRIPTION

% -*- texinfo -*-
% @deftypefn {Function File} {[@var{x}, @var{obj}, @var{info}, @var{lambda}] =} qp (@var{x0}, @var{H}, @var{q}, @var{A}, @var{b}, @var{lb}, @var{ub}, @var{A_lb}, @var{A_in}, @var{A_ub})
% @iftex
% @tex
% $$% \min_x {1 \over 2} x^T H x + x^T q %$$
% @end tex
% @end iftex
% @ifnottex
%
% @example
% @group
%      min 0.5 x'*H*x + x'*q
%       x
% @end group
% @end example
%
% @end ifnottex
% subject to
% @iftex
% @tex
% $$% Ax = b \qquad lb \leq x \leq ub \qquad A_{lb} \leq A_{in} \leq A_{ub} %$$
% @end tex
% @end iftex
% @ifnottex
%
% @example
% @group
%      A*x = b
%      lb <= x <= ub
%      A_lb <= A_in*x <= A_ub
% @end group
% @end example
% @end ifnottex
%
% @noindent
% using a null-space active-set method.
%
% Any bound (@var{A}, @var{b}, @var{lb}, @var{ub}, @var{A_lb},
% @var{A_ub}) may be set to the empty matrix (@code{[]}) if not
% present.  If the initial guess is feasible the algorithm is faster.
%
% The value @var{info} is a structure with the following fields:
% @table @code
% @item solveiter
% The number of iterations required to find the solution.
% @item info
% An integer indicating the status of the solution, as follows:
% @table @asis
% @item 0
% The problem is feasible and convex.  Global solution found.
% @item 1
% The problem is not convex.  Local solution found.
% @item 2
% The problem is not convex and unbounded.
% @item 3
% Maximum number of iterations reached.
% @item 6
% The problem is infeasible.
% @end table
% @end table
% @end deftypefn

## CROSS-REFERENCE INFORMATION

This function calls:
• glpk % Solve a linear program using the GNU GLPK library. Given three
This function is called by:
• sqp % Solve the nonlinear program

Generated on Sat 16-May-2009 00:04:49 by m2html © 2003