TOMLAB OPTIMIZATION ENVIRONMENT: qpAssign

   

qpAssign

Purpose

For setting up a quadratic programming problem.

Syntax

   Prob = qpAssign(F, c, A, b_L, b_U, x_L, x_U, x_0, problemName,...
                   setupFile, nProblem, fLowBnd, x_min, x_max, f_opt, x_opt);

Description

qpAssign is a direct way of setting up a Quadratic Programming (QP) problem in the TOMLAB Quick (TQ) format.

The information is put into the TOMLAB input problem structure Prob.

   Prob = qpAssign( ....)

It is then possible to solve the QP problem using the TOMLAB QP solver qpSolve with the call:

   Result = qpSolve(Prob);

or any general constrained solver:

   Result = tomRun('conSolve',Prob);

Adding the two parameters [] and 2 gives a call to PrintResult

   Result = tomRun('nlpSolve',Prob),[],2);

If the /SOL toolbox is available, use QPOPT or SQOPT (or SNOPT).

  Result = tomRun('qpopt',Prob);
  Result = tomRun('sqopt',Prob);
  Result = tomRun('snopt',Prob);

It is also possible to run the quadprog.m interface, similar to quadprog in Optimization Toolbox 2.0.

See the file tomlab\examples\testquadprog.m for an example

qpAssign also makes the mideva.m file needed for use with MIDEVA and nonlinear solvers.

Problem

        min   0.5 * x' * F * x + c' * x.  x in R^n
         x
        s/t   x_L <=   x  <= x_U
              b_L <= A x  <= b_U

 Equality equations: Set b_L==b_U
 Fixed    variables: Set x_L==x_U

Input Parameters

One parameter F must always be given. Empty gives default

 F            The matrix F in 0.5 x' F x in the objective function
 c            The vector c in c'x in the objective function
 A:           The linear constraint matrix 
 b_L:         The lower bounds for the linear constraints
 b_U:         The upper bounds for the linear constraints
 x_L:         Lower bounds on x
 x_U:         Upper bounds on x

              b_L, b_U, x_L, x_U must either be empty or of full length

 x_0:         Starting point x (may be empty)
 problemName  The name of the problem (string)
 setupFile    The (unique) name as a TOMLAB Init File. If nonempty qpAssign
              will create a executable m-file with this name and the given
              problem defined as the first problem in this file.
              See qp_prob.m, the TOMLAB predefined QP Init File.
              If empty, no Init File is created. Also see nProblem.
 nProblem     Number of problems, or problem number, to define in the setupFile
              Not used if setupFile is empty.

              nProblem = 1 ==> File is created to make it easy to edit new
              problems into the file. Text are included on how to add new
              problems. The given problem is set as number 1.
              If isempty(nProblem) same as nProblem=1. 

              length(nProblem) > 1 ==> A file suitable for large test sets
              are setup, where the problem definition is read from mat-files.
              Statements for problems nProblem(1) to nProblem(2) are defined.
              The given input is assumed to be nProblem(1), and the
              corresponding mat-file is created.

              If nProblem > 1. Additional problems are assumed, and the only
              thing done is to create a mat-file with the problem.

              If isempty(setupFile), nProblem is not used

 fLowBnd      A lower bound on the function value at optimum. Only used if
              running the nonlinear TOMLAB solvers with line search
 x_min        Lower bounds on each x-variable, used for plotting
 x_max        Upper bounds on each x-variable, used for plotting
 f_opt        Optimal function value(s), if known (Stationary points)
 x_opt        The x-values corresponding to the given f_opt, if known.
              If only one f_opt, give x_opt as a 1 by n vector
              If several f_opt values, give x_opt as a length(f_opt) x n matrix
              If adding one extra column n+1 in x_opt, 
              0 indicates min, 1 saddle, 2 indicates max.
              x_opt and f_opt is used in printouts and plots.

  miqpAssign   sdpAssign