MISQP: Difference between revisions

From TomWiki
Jump to navigationJump to search
Line 171: Line 171:


''Result'' Structure with result from optimization. The following fields are set:
''Result'' Structure with result from optimization. The following fields are set:
{|class="wikitable"
!Output||Description
|-valign="top"
|''Result''||The structure with results (see ResultDef.m).
|-valign="top"
|''f_k''||Function value at optimum.
|-valign="top"
|''x_k''||Solution vector.
|-valign="top"
|''x_0''||Initial solution vector.
|-valign="top"
|''g_k''||Exact gradient computed at optimum.
|-valign="top"
|''xState''||State of variables. Free == 0; On lower == 1; On upper == 2; Fixed == 3;
|-valign="top"
|''bState''||State of linear constraints.  Free == 0; Lower == 1; Upper == 2; Equality == 3;
|-valign="top"
|''v_k''||Lagrangian multipliers (for bounds + dual solution vector).
|-valign="top"
|''ExitFlag''||Exit status from miql.m (similar to TOMLAB).
|-valign="top"
|''Inform''||MIQL information parameter.
-4 - Branch and Bound root QP could not be solved.
-3 - Relaxed QP without feasible solution.
-2 - A feasible solution could not be computed by maxnde subproblems.
-1 - A feasible solution does not exist.
0 - The optimal solution is found.
1 - A feasible solution is found, but tree search is terminated because of reaching maxnde nodes.
2 - Index in Prob.MIP.intVars out of bounds.
3 - Internal inconsistency of continuous QP.
4 - Length of a work array is too short.
5 - Sizes are incorrectly set.
6 - An integer option for Branch and Bound is incorrectly set.
7 - Independent Lagrangian multipliers could not be calculated, working arrays are too small, increase maxnde.
8 - Print file or print level is incorrectly set.
9 - Lower variable bound greater than upper variable bound.
11 - Subsolver QL could not solve QP after a maximal number of 40*(n+m) iterations.
12 - The termination accuracy is insufficient for QL to satisfy its convergence criteria.
13 - QL terminated due to an internal inconsistency, e.g., division by zero.
14 - Numerical instabilities prevent successful termination of QL.
> 90 - Constraints are inconsistent and constraint number Inform - 100 is causing the conflict. The problem has no feasible solution.
|-valign="top"
|''rc''||Reduced costs. If ninf=0, last m == -v_k.
|-valign="top"
|''Iter''||Number of iterations.
|-valign="top"
||''FuncEv''||Number of function evaluations.  Set to Iter.
|-valign="top"
|''GradEv''||Number of gradient evaluations. Set to Iter.
|-valign="top"
||''ConstrEv''||Number of constraint evaluations.  Set to 0.
|-valign="top"
|''QP.B''||Basis vector in TOMLAB QP standard.
|-valign="top"
|''MinorIter''||Number of minor iterations. NOT SET.
|-valign="top"
|''Solver''||Name of solver (miql).
|-valign="top"
|''SolverAlgorithm''||Description of the solver.
|-valign="top"
|''MIQL.cutges''||Total number of cutting planes.
|-valign="top"
|''MIQL.nodes''||Total number of branch and bound nodes.
|-valign="top"
|''MIQL.ctime''||Time spent generating cutting planes.
|-valign="top"
|''MIQL.bbtime''||Time spent for branch and bound process.
|-valign="top"
|''MIQL.cutgap''||Gap reduced by cutting planes compared to original relaxed solution.
|-valign="top"
|''MIQL.rlxopt''||Relaxed optimal value.
|-valign="top"
|''MIQL.gencut''||Nonzero if cuts were generated.
|}


===qlTL===
===qlTL===

Revision as of 10:45, 13 August 2013

Introduction

Overview

Welcome to the TOMLAB /MISQP User's Guide. TOMLAB /MISQP includes the MISQP and MIQL solvers from Klaus Schittkowski and an interface to The MathWorks' MATLAB.

TOMLAB /MISQP solves mixed-integer nonlinear mathematical programming problems with equality and inequality constraints. It is assumed that integer variables have a smooth influence on the model functions, i.e., that function values do not change drastically when in- or decrementing an integer value.

The internal algorithm uses a modified sequential quadratic approximation method, stabilized by a trust region method including Yuan's second order corrections. The Hessian of the Lagrangian function is approximated by BFGS updates subject to the continous and integer variables.

TOMLAB /MIQL solves strictly convex mixed-integer quadratic mathematical programming problems with linear equality and inequality constraints. The mixed-integer problem is solved by a branch-and-cut algorithm.

Contents of this Manual

More information

Please visit the following links for more information:

Prerequisites

In this manual we assume that the user is familiar with mixed-integer nonlinear programming, setting up problems in TOMLAB (in particular unconstrained and constrained mixed-integer nonlinear programming (minlp) problems) and the Matlab language in general.

Using the Matlab Interface

The MISQP solver is accessed via the tomRun driver routine, which calls the misqpTL interface routine. The solver itself is located in the MEX file misqp. The same applies for the other two solvers.

Observe that miqpAssign should be used when defining the problem for MIQL and qpAssign for QL.

Function Description
misqpTL The interface routine called by the TOMLAB driver routine tomRun.

This routine then calls the MEX file misqp

miqlTL The interface routine called by the TOMLAB driver routine tomRun.

This routine then calls the MEX file miql

qlTL The interface routine called by the TOMLAB driver routine tomRun.

This routine then calls the MEX file ql

Setting MISQP Options

All MISQP control parameters are possible to set from Matlab.

Setting options using the Prob.MISQP structure

The parameters can be set as subfields in the Prob.MISQP structure. The following example shows how to set a limit on the maximum number of iterations.

Prob = minlpAssign(...)   %   Setup problem,  see help minlpAssign for more information
Prob.MISQP.maxit = 2000;  %   Setting maximum number of iterations

The maximum number of iterations can also be done through the TOMLAB parameter MaxIter:

Prob.optParam.MaxIter = 200;

In the cases where a solver specific parameter has a corresponding TOMLAB general parameter, the latter is used only if the user has not given the solver specific parameter.

A complete description of the available MISQP parameters can be found in #misqpTL.

Setting options using the Prob.MIQL structure

Options can be set for MIQL in the same way as for MISQP as described above in #Setting options using the Prob.MISQP structure. The only difference is in the name of the structure (MIQL instead of MISQP) and the assign-routine (miqpAssign instead of minlpAssign).

Setting options using the Prob.QL structure

Options can be set for QL in the same way as for MISQP as described above in #Setting options using the Prob.MISQP structure. The only difference is in the name of the structure (QL instead of MISQP) and the assign-routine (qpAssign instead of minlpAssign).

MISQP Solver References

Table: Solver routines in TOMLAB /MISQP.

Function Description Reference
ql Quadratic programming using a primal-dual method with cholesky decomposition. qlTL.m
miql Mixed-integer quadratic programming using a branch-and-cut method with ql as subsolver. miqlTL.m
misqp Constrained, mixed-integer nonlinear minimization using a sequential quadratic approximation method. miql is used as MIQP subsolver. misqpTL.m

A detailed description of the TOMLAB /MISQP solver interfaces is given below. Also see the M-file help for misqpTL.m, miqlTL.m and qlTL.m.

misqpTL

Purpose

Solves mixed-integer nonlinear optimization problems.

MISQP solves problems of the form

where , and and , Furthermore, are restricted to integer values only.

Calling Syntax

Prob = minlpAssign( ... );
Result = tomRun('misqp',Prob,...);

Description of Inputs

Prob Problem description structure. The following fields are used:

Description of Outputs

Result Structure with result from optimization. The following fields are set:

miqlTL

Purpose

Solves strictly convex mixed-integer quadratic programming problems.

MIQL solves problems of the form

where , and positive definite, , and .

The variables , the index subset of , are restricted to be integers.

If F is empty, an LP or MILP problem is solved.

Calling Syntax

Prob = miqpAssign( ... );
Result = tomRun('miql',Prob,...);

Description of Inputs

Prob Problem description structure. The following fields are used:

Description of Outputs

Result Structure with result from optimization. The following fields are set:

Output Description
Result The structure with results (see ResultDef.m).
f_k Function value at optimum.
x_k Solution vector.
x_0 Initial solution vector.
g_k Exact gradient computed at optimum.
xState State of variables. Free == 0; On lower == 1; On upper == 2; Fixed == 3;
bState State of linear constraints. Free == 0; Lower == 1; Upper == 2; Equality == 3;
v_k Lagrangian multipliers (for bounds + dual solution vector).
ExitFlag Exit status from miql.m (similar to TOMLAB).
Inform MIQL information parameter.

-4 - Branch and Bound root QP could not be solved.

-3 - Relaxed QP without feasible solution.

-2 - A feasible solution could not be computed by maxnde subproblems.

-1 - A feasible solution does not exist.

0 - The optimal solution is found.

1 - A feasible solution is found, but tree search is terminated because of reaching maxnde nodes.

2 - Index in Prob.MIP.intVars out of bounds.

3 - Internal inconsistency of continuous QP.

4 - Length of a work array is too short.

5 - Sizes are incorrectly set.

6 - An integer option for Branch and Bound is incorrectly set.

7 - Independent Lagrangian multipliers could not be calculated, working arrays are too small, increase maxnde.

8 - Print file or print level is incorrectly set.

9 - Lower variable bound greater than upper variable bound.

11 - Subsolver QL could not solve QP after a maximal number of 40*(n+m) iterations.

12 - The termination accuracy is insufficient for QL to satisfy its convergence criteria.

13 - QL terminated due to an internal inconsistency, e.g., division by zero.

14 - Numerical instabilities prevent successful termination of QL.

> 90 - Constraints are inconsistent and constraint number Inform - 100 is causing the conflict. The problem has no feasible solution.

rc Reduced costs. If ninf=0, last m == -v_k.
Iter Number of iterations.
FuncEv Number of function evaluations. Set to Iter.
GradEv Number of gradient evaluations. Set to Iter.
ConstrEv Number of constraint evaluations. Set to 0.
QP.B Basis vector in TOMLAB QP standard.
MinorIter Number of minor iterations. NOT SET.
Solver Name of solver (miql).
SolverAlgorithm Description of the solver.
MIQL.cutges Total number of cutting planes.
MIQL.nodes Total number of branch and bound nodes.
MIQL.ctime Time spent generating cutting planes.
MIQL.bbtime Time spent for branch and bound process.
MIQL.cutgap Gap reduced by cutting planes compared to original relaxed solution.
MIQL.rlxopt Relaxed optimal value.
MIQL.gencut Nonzero if cuts were generated.

qlTL

Solves strictly convex quadratic programming problems.

QL solves problems of the form

where , and positive definite, , and .

Calling Syntax

Prob = qpAssign( ... );
Result = tomRun('ql',Prob,...);

Description of Inputs

Prob Problem description structure. The following fields are used:

Field Description
x_L, x_U Bounds on variables.
b_L, b_U Bounds on linear constraints.
A Linear constraint matrix.
QP.c Linear coefficients in objective function.
QP.F Quadratic matrix of size n x n.
PriLevOpt Print Level in solver (0 = off, 1 = only final error message).
QL.eps Desired final accuracy. The parameter value should not be smaller than the underlying machine precision.
QL.PrintFile Name of print file. Amount/print type determined by optPar(1). Default name ql.txt.

Description of Outputs

Result Structure with result from optimization. The following fields are set:

Output Description
Result The structure with results (see ResultDef.m).
f_k Function value at optimum.
x_k Solution vector.
x_0 Initial solution vector.
g_k Exact gradient computed at optimum.
xState State of variables. Free == 0; On lower == 1; On upper == 2; Fixed == 3;
bState State of linear constraints. Free == 0; Lower == 1; Upper == 2; Equality == 3;
v_k Lagrangian multipliers (for bounds + dual solution vector).
ExitFlag Exit status from ql.m (similar to TOMLAB).
Inform QL information parameter.

0 - Optimal solution with unique minimizer found

1 - Too many iterations

2 - Accuracy insufficient to attain convergence

3 - Internal inconsistency, division by zero

5 - An input parameter was invalide

> 100 - Constraints are inconsistent and Inform=100+iCon where iCon denotes the index of the constraint causing the conflict. The problem has no feasible solution.

rc Reduced costs. If ninf=0, last m == -v_k.
Iter Number of iterations.
FuncEv Number of function evaluations. Set to Iter.
GradEv Number of gradient evaluations. Set to Iter.
ConstrEv Number of constraint evaluations. Set to 0.
QP.B Basis vector in TOMLAB QP standard.
MinorIter Number of minor iterations. NOT SET.
Solver Name of solver (ql).
SolverAlgorithm Description of the solver.