WWW | Store | Account | Contact Us
SHAZAM Homepage

QP

The QP command is available to compute the solution to Quadratic Programming problems, which are characterized by an objective function of quadratic form with constraints that are linear.

In general, the format is:

QP c Q A b / options

OR

QP c Q / UNCONSTR options

The available options are:

OPTION DESCRIPTION
cholspec Used if the user wishes to supply the Cholesky decomposition of the objective matrix Q. In this case, the Cholesky decomposition must be contained in the lower half of the input matrix Q. This option is only available when both MIN and METHOD=POWELL are specified, and may not be used with the NEGDEF option.
conv= As defined for the NL command. Used when solving the least squares sub-problems when METHOD=STEP. The default is CONV=10^-6.
diagr= If NEGDEF and METHOD=POWELL are specified, the multiple of the identity matrix added to the quadratic matrix, Q for minimization, or -Q for maximization problems, will be at most the value of this option times the smallest multiple that makes the matrix positive definite. The default is DIAGR=1.1 and any number specified must be greater than 1.
dual= Saves the dual solution in the vector specified.
dump Prints information for SHAZAM consultants.
ifact= Saves the indices of the final active constraints, applicable when using METHOD=POWELL.
iter= Specifies the maximum number of iterations. The default number is ITER=40(N+M).
lagrange= Saves the Lagrange multipliers of the final active constraints, applicable when using METHOD=POWELL.
lower= Specifies the lower bounds of the solution and should be a vector of length N. METHOD=STEP may not be used with this option. If METHOD=POWELL and no lower bounds are specified using either LOWER= or LOWSCAL=, the default LOWSCAL=-1012 is applied.
lowscal= Specifies a scalar which is applied as the lower bound on all variables. METHOD=STEP allows only LOWSCAL=0. If METHOD=POWELL and no lower bounds are specified using either LOWER= or LOWSCAL=, the default LOWSCAL=-10^12 is applied. This option will be ignored if LOWER= is also specified.
meq= Indicates the number of constraints that are equality constraints. These constraints should be contained in the top rows of input matrix A and vector b. METHOD=POWELL is automatically used with this option.
method= Specifies the method to be used for the solution of the quadratic programming problem. The default is METHOD=POWELL, as described by Powell [1983]. The alternative is METHOD=STEP, which is an implementation of the algorithm presented in Wang, Chukova and Lai [2005]. Both methods should yield nearly identical solutions, although some problems will only be solvable with METHOD=POWELL.
min Indicates that the problem is a MINimization problem.
negdef Indicates that the quadratic matrix in the objective function, Q for a minimization problem, or -Q for a maximization problem, is not positive definite. This option is only available with METHOD=POWELL. The user must take extreme care when using this option, as explained above.
pdual Calculates and prints the dual solution. This is the default. Specify NOPDUAL to suppress consideration of the dual problem.
primal= Saves the primal solution in the vector specified.
unconstr Must be used if a problem is unconstrained.
upper= Specifies the upper bounds of the solution and should be a vector of length N. METHOD=POWELL is automatically used with this option. If METHOD=POWELL and no upper bounds are specified using either UPPER= or UPSCAL=, the default UPSCAL=10^12 is applied.
upscal= Specifies a scalar which is applied as the upper bound on all variables. METHOD=POWELL is automatically used with this option. If METHOD=POWELL and no upper bounds are specified using either UPPER= or UPSCAL=, the default UPSCAL=10^12 is applied. This option will be ignored if UPPER= is also specified.
zerotol= Used in both methods to set the threshold below which numbers are assumed to be zero. The default is ZEROTOL=10^-12.

The temporary variable $ERR stores the Error Code.

The temporary variable $VAL stores the value of the objective function.

The temporary variable $T1 stores the number of variables in the problem, N.

The temporary variable $T2 stores the number of constraints in the problem, M.

The temporary variable $T3 stores the multiple of the identity matrix added to the objective function matrix to force it to be positive definite.