NAG CL Interface
h02ddc (handle_​solve_​minlp)

Note: this function uses optional parameters to define choices in the problem specification and in the details of the algorithm. If you wish to use default settings for all of the optional parameters, you need only read Sections 1 to 10 of this document. If, however, you wish to reset some or all of the settings please refer to Section 11 for a detailed description of the algorithm and to Section 12 for a detailed description of the specification of the optional parameters.
Settings help

CL Name Style:


1 Purpose

h02ddc is a solver from the NAG optimization modelling suite for Mixed Integer Nonlinear Programming (MINLP) problems.

2 Specification

#include <nag.h>
void  h02ddc (void *handle,
void (*objfun)(Integer nvar, const double x[], double *fx, Integer *inform, Nag_Comm *comm),
void (*objgrd)(Integer nvar, const double x[], Integer nnzfd, double fdx[], Integer *inform, Nag_Comm *comm),
void (*confun)(Integer nvar, const double x[], Integer ncnln, double gx[], Integer *inform, Nag_Comm *comm),
void (*congrd)(Integer nvar, const double x[], Integer nnzgd, double gdx[], Integer *inform, Nag_Comm *comm),
void (*monit)(Integer nvar, const double x[], Integer *inform, const double rinfo[], const double stats[], Nag_Comm *comm),
Integer nvar, double x[], double rinfo[], double stats[], Nag_Comm *comm, NagError *fail)
The function may be called by the names: h02ddc or nag_mip_handle_solve_minlp.

3 Description

h02ddc solves Mixed Integer Nonlinear Programming (MINLP) problems using a modified Sequential Quadratic Programming (SQP) method. The problem is assumed to be stated in the following general form:
minimize x {Rnc,Zni} f(x) subject to lgg(x)ug, 12 xTQix + riTx + si0 ,   1imQ, lBBxuB, lxxux, (1)
where
h02ddc serves as a solver for problems stored as a handle. The handle points to an internal data structure which defines the problem and serves as a means of communication for functions in the NAG optimization modelling suite. First, the problem handle is initialized, typically by calling e04rac. Then some of the components of the model need to be defined by calling one or more of the following functions based on the component type:
When the nonlinear objective function f(x) is specified using e04rgc, objfun and objgrd will be used to compute values and gradients of the objective function. Similarly, confun and congrd will be used to compute values and gradients of the nonlinear constraint functions g(x) specified by e04rkc.
No assumptions are made regarding f(x) except that it is twice continuously differentiable with respect to continuous elements of x. It is not assumed that integer variables are relaxable. In other words, problem functions are evaluated only at integer points.
Partial derivatives of f(x) and g(x) are not required for the ni integer variables. They can hence be omitted entirely when specifying the sparsity pattern of the derivatives in calls to e04rgc and e04rkc, respectively. Gradients with respect to integer variables are approximated by difference formulae and those provided by the user will be ignored.
Once the problem is fully described, the handle may be passed to the solver h02ddc. When the handle is no longer needed, e04rzc should be called to destroy it and deallocate the memory held within. There are other ways that the problem model can be defined and/or updated, see Section 4.1 in the E04 Chapter Introduction for more details about the NAG optimization modelling suite.
The algorithm behaviour can be modified by various optional parameters (see Section 12) which can be set by e04zmc and e04zpc anytime between the initialization of the handle and a call to the solver. Once the solver has finished, options or the model may be modified for the next solve. The solver may be called repeatedly with various starting points and/or optional parameters. Option getter e04znc can be called to retrieve the current value of any option.
The optional parameter Task may be used to switch the problem to maximization.
Several options may have a significant impact on the performance of the solver. Even if the defaults were chosen to suit the majority of problems, it is recommended that you experiment in order to find the most suitable set of options for a particular problem, see Sections 11 and 12 for further details.

3.1 Alternative solvers

h02ddc is a generic solver which can solve a great variety of integer problems, however, a dedicated solver might work better in the following case.

4 References

Exler O, Lehmann T and Schittkowski K (2013) A comparative study of SQP-type algorithms for nonlinear and nonconvex mixed-integer optimization Mathematical Programming Computation 4 383–412
Mann A (1986) GAMS/MINOS: Three examples Department of Operations Research Technical Report Stanford University
Powell M J D (1983) On the quadratic programming algorithm of Goldfarb and Idnani Report DAMTP 1983/Na 19 University of Cambridge, Cambridge
Yuan Y-x and Sun W (2006) Optimization Theory and Methods Springer–Verlag

5 Arguments

1: handle void * Input
On entry: the handle to the problem. It needs to be initialized (e.g., by e04rac) and to hold a problem formulation compatible with h02ddc. It must not be changed between calls to the NAG optimization modelling suite.
2: objfun function, supplied by the user External Function
objfun must calculate the value of the nonlinear objective function f(x) at a specified value of the n-element vector of x variables. If there is no nonlinear objective (e.g., e04rec or e04rfc was called to define a linear or quadratic objective function), objfun will never be called by h02ddc and may be NULLFN.
The specification of objfun is:
void  objfun (Integer nvar, const double x[], double *fx, Integer *inform, Nag_Comm *comm)
1: nvar Integer Input
On entry: n, the current number of decision variables x in the model.
2: x[nvar] const double Input
On entry: the vector x of variable values at which the objective function is to be evaluated.
3: fx double * Output
On exit: the value of the objective function at x.
4: inform Integer * Input/Output
On entry: a non-negative value.
On exit: must be set to a value describing the action to be taken by the solver on return from objfun. Specifically, if the value is negative, then the value of fx will be discarded and the solver will terminate immediately with fail.code= NE_FAILED_START or NE_USER_NAN (the same will happen if fx is Infinity or NaN); otherwise, the solver will proceed normally.
5: comm Nag_Comm *
Pointer to structure of type Nag_Comm; the following members are relevant to objfun.
userdouble *
iuserInteger *
pPointer 
The type Pointer will be void *. Before calling h02ddc you may allocate memory and initialize these pointers with various quantities for use by objfun when called from h02ddc (see Section 3.1.1 in the Introduction to the NAG Library CL Interface).
3: objgrd function, supplied by the user External Function
objgrd must calculate the values of the nonlinear objective function gradients f x at a specified value of the n-element vector of x variables. If there is no nonlinear objective (e.g., e04rec or e04rfc was called to define a linear or quadratic objective function), objgrd will never be called by h02ddc and may be NULLFN.
The specification of objgrd is:
void  objgrd (Integer nvar, const double x[], Integer nnzfd, double fdx[], Integer *inform, Nag_Comm *comm)
1: nvar Integer Input
On entry: n, the current number of decision variables x in the model.
2: x[nvar] const double Input
On entry: the vector x of variable values at which the objective function gradient is to be evaluated.
3: nnzfd Integer Input
On entry: the number of nonzero elements in the sparse gradient vector of the objective function, as was set in a previous call to e04rgc.
4: fdx[dim] double Input/Output
On entry: the elements should only be assigned and not referenced.
On exit: the values of the nonzero elements in the sparse gradient vector of the objective function, in the order specified by idxfd in a previous call to e04rgc. fdx[i-1] will store the gradient element f xj , where j=idxfd[i-1].
5: inform Integer * Input/Output
On entry: a non-negative value.
On exit: must be set to a value describing the action to be taken by the solver on return from objgrd. Specifically, if the value is negative the solution of the current problem will terminate immediately with fail.code= NE_FAILED_START or NE_USER_NAN (the same will happen if fdx contains Infinity, NaN, or unassigned elements); otherwise, computations will continue.
6: comm Nag_Comm *
Pointer to structure of type Nag_Comm; the following members are relevant to objgrd.
userdouble *
iuserInteger *
pPointer 
The type Pointer will be void *. Before calling h02ddc you may allocate memory and initialize these pointers with various quantities for use by objgrd when called from h02ddc (see Section 3.1.1 in the Introduction to the NAG Library CL Interface).
4: confun function, supplied by the user External Function
confun must calculate the values of the mg-element vector g i(x) of nonlinear constraint functions at a specified value of the n-element vector of x variables. If no nonlinear constraints were registered in this handle, confun will never be called by h02ddc and may be specified as NULLFN.
The specification of confun is:
void  confun (Integer nvar, const double x[], Integer ncnln, double gx[], Integer *inform, Nag_Comm *comm)
1: nvar Integer Input
On entry: n, the current number of decision variables x in the model.
2: x[nvar] const double Input
On entry: the vector x of variable values at which the constraint functions are to be evaluated.
3: ncnln Integer Input
On entry: mg, the number of nonlinear constraints, as specified in an earlier call to e04rkc.
4: gx[dim] double Output
On exit: the mg values of the nonlinear constraint functions at x.
5: inform Integer * Input/Output
On entry: a non-negative value.
On exit: must be set to a value describing the action to be taken by the solver on return from confun. Specifically, if the value is negative, then the value of gx will be discarded and the solver will terminate immediately with fail.code= NE_FAILED_START or NE_USER_NAN (the same will happen if gx contains Infinity or NaN); otherwise, the solver will proceed normally.
6: comm Nag_Comm *
Pointer to structure of type Nag_Comm; the following members are relevant to confun.
userdouble *
iuserInteger *
pPointer 
The type Pointer will be void *. Before calling h02ddc you may allocate memory and initialize these pointers with various quantities for use by confun when called from h02ddc (see Section 3.1.1 in the Introduction to the NAG Library CL Interface).
5: congrd function, supplied by the user External Function
congrd must calculate the nonzero values of the sparse Jacobian of the nonlinear constraint functions gi x at a specified value of the n-element vector of x variables. If there are no nonlinear constraints (e.g., e04rkc was never called with the same handle or it was called with ncnln =0), congrd will never be called by h02ddc and may be specified as NULLFN.
The specification of congrd is:
void  congrd (Integer nvar, const double x[], Integer nnzgd, double gdx[], Integer *inform, Nag_Comm *comm)
1: nvar Integer Input
On entry: n, the current number of decision variables x in the model.
2: x[nvar] const double Input
On entry: the vector x of variable values at which the Jacobian of the constraint functions is to be evaluated.
3: nnzgd Integer Input
On entry: is the number of nonzero elements in the sparse Jacobian of the constraint functions, as was set in a previous call to e04rkc.
4: gdx[dim] double Input/Output
On entry: the elements should only be assigned and not referenced.
On exit: the nonzero values of the Jacobian of the nonlinear constraints, in the order specified by irowgd and icolgd in an earlier call to e04rkc. gdx[i-1] will be the gradient gj xk , where j=irowgd[i-1] and k=icolgd[i-1].
5: inform Integer * Input/Output
On entry: a non-negative value.
On exit: must be set to a value describing the action to be taken by the solver on return from congrd. Specifically, if the value is negative the solution of the current problem will terminate immediately with fail.code= NE_FAILED_START or NE_USER_NAN (the same will happen if gdx contains Infinity, NaN, or unassigned elements); otherwise, computations will continue.
6: comm Nag_Comm *
Pointer to structure of type Nag_Comm; the following members are relevant to congrd.
userdouble *
iuserInteger *
pPointer 
The type Pointer will be void *. Before calling h02ddc you may allocate memory and initialize these pointers with various quantities for use by congrd when called from h02ddc (see Section 3.1.1 in the Introduction to the NAG Library CL Interface).
6: monit function, supplied by the user External Function
monit is provided to enable you to monitor the progress of the optimization and optionally to terminate the solver early if necessary. It is invoked at the end of every ith major iteration where i is given by the MISQP Monitor Frequency (the default is 0, monit is not called).
monit may be specified as NULLFN.
The specification of monit is:
void  monit (Integer nvar, const double x[], Integer *inform, const double rinfo[], const double stats[], Nag_Comm *comm)
1: nvar Integer Input
On entry: n, the current number of decision variables x in the model.
2: x[nvar] const double Input
On entry: xi, the values of the decision variables x at the current iteration.
3: inform Integer * Input/Output
On entry: a non-negative value.
On exit: must be set to a value describing the action to be taken by the solver on return from monit. Specifically, if the value is negative the solution of the current problem will terminate immediately with fail.code= NE_USER_STOP; otherwise, computations will continue.
4: rinfo[100] const double Input
On entry: error measures and various indicators at the end of the current iteration as described in rinfo.
5: stats[100] const double Input
On entry: solver statistics at the end of the current iteration as described in stats.
6: comm Nag_Comm *
Pointer to structure of type Nag_Comm; the following members are relevant to monit.
userdouble *
iuserInteger *
pPointer 
The type Pointer will be void *. Before calling h02ddc you may allocate memory and initialize these pointers with various quantities for use by monit when called from h02ddc (see Section 3.1.1 in the Introduction to the NAG Library CL Interface).
7: nvar Integer Input
On entry: n, the current number of decision variables x in the model.
8: x[nvar] double Input/Output
On entry: x0, the initial estimates of the variables x.
On exit: the final values of the variables x.
9: rinfo[100] double Output
On exit: error measures and various indicators at the end of the final iteration as given in the table below:
0 Objective function value f(x).
199 Reserved for future use.
10: stats[100] double Output
On exit: solver statistics at the end of the final iteration as given in the table below:
0 Number of function evaluations.
12 Reserved for future use.
3 Number of gradient evaluations.
4 Number of calls to the QP solver.
5 Reserved for future use.
6 Number of branch-and-bound nodes.
7 Total time spent in solver (including user-supplied function calls).
8 Total time spent evaluating objective function.
9 Total time spent evaluating objective gradient.
10 Total time spent evaluating constraint functions.
11 Total time spent evaluating constraint Jacobian.
12 Total number of inner iterations.
13 Total number of iterations.
1499 Reserved for future use.
11: comm Nag_Comm *
The NAG communication argument (see Section 3.1.1 in the Introduction to the NAG Library CL Interface).
12: fail NagError * Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).

6 Error Indicators and Warnings

NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
NE_BAD_PARAM
On entry, argument value had an illegal value.
NE_DERIV_ERRORS
User-provided constraint gradient is likely to be incorrect. This error indicates that the user-supplied gradient vector gdx has entries that do not match with a finite-differences approximation of it.
User-provided objective gradient is likely to be incorrect. This error indicates that the user-supplied gradient vector fdx has entries that do not match with a finite-differences approximation of it.
NE_FAILED_START
The current starting point is unusable.
Either inform was set to a negative value within the user-supplied functions objfun, objgrd, confun or congrd, or the values returned contain Infinity, NaN, or unassigned elements.
NE_HANDLE
The supplied handle does not define a valid handle to the data structure for the NAG optimization modelling suite. It has not been properly initialized or it has been corrupted.
NE_INFEASIBLE
Termination at an infeasible iterate; if the problem is feasible, try a different starting value.
The solver detected an infeasible problem.
NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
NE_NO_IMPROVEMENT
More than the maximum number of feasible steps without improvement in the objective function. If the maximum number of feasible steps is small, say less than 5, try increasing it. Optional parameter MISQP Feasible Steps=value.;
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.
NE_NULL_ARGUMENT
The problem requires the confun values. Please provide a proper confun function.
The problem requires the congrd derivatives. Please provide a proper congrd function.
The problem requires the objfun values. Please provide a proper objfun function.
The problem requires the objgrd derivatives. Please provide a proper objgrd function.
NE_NUM_DIFFICULTIES
The optimization failed due to numerical difficulties. Set optional parameter Print Level=3 for more information.;
NE_PHASE
The problem is already being solved.
NE_REF_MATCH
The information supplied does not match with that previously stored.
On entry, nvar=value must match that given during initialization of the handle, i.e., value.
NE_SETUP_ERROR
This solver does not support the model defined in the handle.
NE_TIME_LIMIT
The solver terminated after the maximum time allowed was exhausted.
Maximum number of seconds exceeded. Use optional parameter Time Limit to change the limit.
NE_TOO_MANY_ITER
Maximum number of iterations exceeded.
The MISQP Iteration Limit limit was exceeded before a solution with the requested accuracy could be found. Check the iteration log to be sure that progress was being made. If so, rerun the problem after increasing this optional parameter.
NE_USER_NAN
Invalid number detected in user-supplied function.
Either inform was set to a negative value within the user-supplied functions objfun, objgrd, confun or congrd, or the values returned contain Infinity, NaN, or unassigned elements.
NE_USER_STOP
User requested termination during a monitoring step. inform was set to a negative value in monit.
NE_ZERO_COEFF
Termination with zero integer trust region for integer variables; try a different starting value.
Optional parameter MISQP Integer Trust Radius=value.;
NE_ZERO_VARS
On entry, there are no binary or integer variables.

7 Accuracy

The accuracy of the solution is determined by optional parameter MISQP Stop Tolerance.

8 Parallelism and Performance

Background information to multithreading can be found in the Multithreading documentation.
h02ddc makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the Users' Note for your implementation for any additional implementation-specific information.

9 Further Comments

9.1 Description of the Printed Output

The solver can print information to give an overview of the problem and of the progress of the computation. The output may be sent to two independent streams (files) which are set by optional parameters Print File. Optional parameters Print Level, Print Solution and Print Options determine the exposed level of detail. This allows, for example, a detailed log file to be generated while the condensed information is displayed on the screen.
By default (Print File=6, Print Level=2), the following sections are printed to the standard output:
Header
The header is a message indicating the start of the solver. It should look like:
 ---------------------------------------------------
  H02DD, Mixed-integer nonlinear programming solver
 ---------------------------------------------------
Optional parameters list
The list shows all options of the solver, each displayed on one line. The output contains the option name, its current value and an indicator for how it was set. The options unchanged from the default setting are noted by ‘d’, options you set are noted by ‘U’, and options reset by the solver are noted by ‘S’. Note that the output format is compatible with the file format expected by e04zpc. The output might look as follows:
Begin of Options
    Print File                    =                   6     * d
    Print Level                   =                   2     * U
    Print Options                 =                 Yes     * U
    Print Solution                =                 All     * U

    Infinite Bound Size           =         1.00000E+20     * d
    Task                          =            Minimize     * d
    Stats Time                    =                 Yes     * U
    Time Limit                    =         1.00000E+06     * d
    Verify Derivatives            =                 Yes     * U

    ...
    Misqp Improved Bounds         =                  No     * d
    Misqp Integer Trust Radius    =         1.00000E+01     * d
    Misqp Iteration Limit         =                 500     * d
    Misqp Maximum Restarts        =                   2     * d
    Misqp Modify Hessian          =                 Yes     * d
    Misqp Monitor Frequency       =                   1     * U
    Misqp Node Selection          =         Depth First     * d
    Misqp Non Monotone            =                  10     * d
    ...
End of Options
Problem statistics
If Print Level2, statistics on the problem are printed. It should look as follows:
Problem Statistics
  No of variables                  8
    integer                        4
      inc. binary                  4
    free (unconstrained)           0
    bounded                        8
  No of lin. constraints           5
  No of nln. constraints           2
  Objective function       Nonlinear
Note: the list is showing that all four integer variables in the problem are binary..
Verification of derivatives
If Verify Derivatives=YES, then the user-supplied nonlinear objective gradient and constraint Jacobian are individually verified. Identified discrepancies will be indicated with BAD?. The output might look as follows:
 Verification of the objective gradients
   Col         X        DX         Gradient    Approximation  Test  Itns
     1  1.00E+00  2.43E-07   1.20000000E+01   1.20000000E+01    OK     1
     2  1.00E+00  1.98E-07   2.00000000E+01   2.00000000E+01    OK     1
     3  1.00E+00  1.54E-07   2.00000000E+01   2.00000000E+01    OK     1
 
   All     4 objective gradients out of the     4
   set in cols     1 through     8 seem to be ok.
 
   The largest relative error was    4.61E-11 in element     1
 
 
 Verification of the constraint gradients
   Col         X        DX   Row         Gradient    Approximation  Test  Itns
     1  1.00E+00  2.65E-06     1   8.00000000E+00   8.00000000E+00    OK     3
     2  1.00E+00  2.65E-06     1   9.00000000E+00   9.00000000E+00    OK     3
     3  1.00E+00  2.65E-06     1   1.10000000E+01   1.20000000E+01  BAD?     3  Linear or odd?
     4  1.00E+00  2.65E-06     1   7.00000000E+00   7.00000000E+00    OK     3
 
   There seem to be     1 incorrect constraint gradients out of the     8
   set in cols     1 through     8
 
   The largest relative error was    8.33E-02 in row    1, column    3
Major Iteration Log
This section describes the output to unit Print File if Print Level>1. One line of information is output every major iteration. Note that the printed objective function value may be scaled if MISQP Scale Objective=YES. The output might look as follows:
   Output in the following order:
 
     IT    - iteration number
     F     - objective function value
     MCV   - maximum constraint violation
     SIGMA - penalty parameter
     IL    - number inner loops
     DMAXC - maximum norm of continuous step D_C
     D1B   - 1-norm of binary step DELTA_B
     DMAXI - maximum norm of integer step D_I
 
   IT       F         MCV      SIGMA    IL   DMAXC      D1B      DMAXI
 -----------------------------------------------------------------------
    1  0.10000D+01  0.10D+01  0.10D+04   1  0.10D-02  0.20D+01  0.00D+00
    2  0.13846D+00  0.15D-15  0.10D+04   1  0.67D-03  0.10D+01  0.00D+00
    3  0.16239D+00  0.11D-37  0.10D+04   1  0.67D-03  0.20D+01  0.00D+00
    ...
Minor Iteration Log
If Print Level 3 , further information for every minor iteration will be printed.
Summary
Once the solver finishes, a detailed summary is produced:
 -------------------------------------------------------------------------------
 Status: converged, an optimal solution was found
 -------------------------------------------------------------------------------
 
 Objective function value at solution:  2.92500E+00
 
 Number of function evaluations:                 118
 Number of gradient evaluations:                  22
 Number of calls of QP solver:                    35
 Number of B&B nodes:                            183
Is starts with a status line of the overall result, followed by the final objective value. If Print Level2, it will additionally report objective and constraint function calls, the QP solver calls, and the number of branch-and-bound nodes. Optionally, if Stats Time=YES or CPU, some statistics on timings is displayed. It might look as follows:
 Timing:
   Total time spent                               0.19 sec
   Total time in objective function               0.00 sec (  1.5%)
   Total time in objective gradient               0.00 sec (  0.5%)
   Total time in constraint functions             0.00 sec (  2.6%)
   Total time in constraint Jacobian              0.00 sec (  0.0%)
Solution
If Print Solution=YES, the values of the primal variables x are printed. Information about the gradient of the variables is also available for continuous variables. The rightmost label indicates the integrality of the variable as specified by e04rcc; with I indicating an (non-binary) integer and B a binary variable. It might look as follows:
 Primal variables:
   idx   Lower bound       Value       Upper bound     Gradient
     1   0.00000E+00    3.75000E-01    1.00000E+06    1.95000E+00
     2   0.00000E+00    5.25000E-01    1.00000E+06    9.75000E+00
     3   0.00000E+00    1.00000E+00    1.00000E+00        NaN        I
     4   0.00000E+00    1.00000E+00    1.00000E+00        NaN        B
     5   0.00000E+00    1.00000E+00    1.00000E+00        NaN        B

10 Example

Select a portfolio of at most p assets from n available with expected return ρ, is fully invested and that minimizes
xTΣx subject to  rTx = ρ i=1 n xi = 1 xi yi i=1 n yi p xi 0 yi = 0 or 1  
where
This example is taken from Mann (1986) with
r = ( 89127 ) Σ = ( 43-10 3610 -11100 0000 ) p = 3 ρ = 10.  
Linear constraints are supplied through both e04rjc and confun for illustrative purpose.

10.1 Program Text

Program Text (h02ddce.c)

10.2 Program Data

None.

10.3 Program Results

Program Results (h02ddce.r)

11 Algorithmic Details

Internally, all constraints in (1), except bound constraints, are rearranged into the forms below:
cj(x)=0, j=1,2,,me cj(x)0, j=me+1,me+2,,m  
with me equality constraints in a total of m constraint functions.
The method seeks to minimize the exact penalty function:
Pσ(x) = f(x) +σ g(x) (2)
where σ is adapted by the algorithm and g(x) is an m-dimensional vector given by:
g(x) = cj(x), j=1,2,,me = min(cj(x),0), j=me+1,me+2,,m.  
Successive quadratic approximations are applied under the assumption that integer variables have a smooth influence on the model functions, that is function values do not change drastically when incrementing or decrementing an integer value. In practice this requires integer variables to be ordinal not categorical. The algorithm is stabilised by a trust region method including Yuan's second order corrections, see Yuan and Sun (2006). The Hessian of the Lagrangian function is approximated by BFGS (see Section 11.4 in e04ucc) updates subject to the continuous and integer variables.
The mixed-integer quadratic programming subproblems of the SQP-trust region method are solved by a branch and cut method with continuous subproblem solutions obtained by the primal-dual method of Goldfarb and Idnani, see Powell (1983). Different strategies are available for selecting a branching variable: and a node from where branching, that is the generation of two new subproblems, begins:
This implementation is based on the algorithm MISQP as described in Exler et al. (2013).

12 Optional Parameters

Several optional parameters in h02ddc define choices in the problem specification or the algorithm logic. In order to reduce the number of formal arguments of h02ddc these optional parameters have associated default values that are appropriate for most problems. Therefore, you need only specify those optional parameters whose values are to be different from their default values.
The remainder of this section can be skipped if you wish to use the default values for all optional parameters.
The optional parameters can be changed by calling e04zmc anytime between the initialization of the handle by e04rac and the call to the solver. Modification of the arguments during intermediate monitoring stops is not allowed. Once the solver finishes, the optional parameters can be altered again for the next solve.
The option values may be retrieved by e04znc.
The following is a list of the optional parameters available. A full description of each optional parameter is provided in Section 12.1.

12.1 Description of the Optional Parameters

For each option, we give a summary line, a description of the optional parameter and details of constraints.
The summary line contains:
All options accept the value DEFAULT to return single options to their default states.
Keywords and character values are case and white space insensitive.
Defaults
This special keyword may be used to reset all optional parameters to their default values. Any value given with this keyword will be ignored.
Infinite Bound SizerDefault =1020
This defines the ‘infinite’ bound bigbnd in the definition of the problem constraints. Any upper bound greater than or equal to bigbnd will be regarded as + (and similarly any lower bound less than or equal to -bigbnd will be regarded as -). Note that a modification of this optional parameter does not influence constraints which have already been defined; only the constraints formulated after the change will be affected.
Constraint: Infinite Bound Size1000.
MISQP Branching RuleaDefault =MAXIMUM
This option specifies the branching rule for branch-and-bound search.
MISQP Branching Rule=MAXIMUM
Maximum fractional branching.
MISQP Branching Rule=MINIMUM
Minimum fractional branching.
MISQP Continuous Trust RadiusrDefault =10.0
This parameter sets the initial continuous trust region radius, Δ0c; the initial trial step dRnc for the SQP approximation must satisfy d Δ0c.
Constraint: MISQP Continuous Trust Radius>0.0.
MISQP DescentrDefault =0.05
This sets the initial descent parameter, δ.
Larger values of δ allow penalty parameter σ to increase faster, which can lead to faster convergence.
Constraint: 0.0<MISQP Descent<1.0.
MISQP Descent FactorrDefault =0.1
This parameter defines the factor for decreasing the internal descent parameter, δ, between iterations.
Constraint: 0.0<MISQP Descent Factor<1.0.
MISQP Feasible StepsiDefault =10
This parameter defines the maximum number of feasible steps without improvements.
Feasibility is measured by g(x)εtol, where εtol is defined by the optional parameter MISQP Stop Tolerance.
Constraint: MISQP Feasible Steps>1.
MISQP Improved BoundsaDefault =NO
When MISQP Node Selection=BEST OF ALL, this option specifies whether to calculate improved bounds.
Constraint: MISQP Improved Bounds=YES or NO.
MISQP Integer Trust RadiusrDefault =10.0
This parameter sets the initial integer trust region radius, Δ0i; the initial trial step eRni for the SQP approximation must satisfy eΔ0i.
Constraint: MISQP Integer Trust Radius1.0.
MISQP Iteration LimitiDefault =500
This parameter sets the maximum number of iterations to be performed by h02ddc. Setting the option too low might lead to fail.code= NE_TOO_MANY_ITER.
Constraint: MISQP Iteration Limit1.
MISQP Maximum RestartsiDefault =2
This parameter defines the maximum number of restarts that allow the mixed integer SQP algorithm to return to a better solution.
Setting a value higher than the default might lead to better results at the expense of function evaluations.
Constraint: 0<MISQP Maximum Restarts15.
MISQP Modify HessianaDefault =YES
This option specifies whether to modify the Hessian approximation in an attempt to get more accurate search directions. Calculation time is increased when the number of integer variables is large.
Constraint: MISQP Modify Hessian=YES or NO.
MISQP Monitor FrequencyiDefault =0
This parameter specifies the frequency on which to call the monitor function monit. If zero, the monitor function will not be called.
Constraint: MISQP Monitor Frequency0.
MISQP Node SelectionaDefault =DEPTH FIRST
This option specifies the node selection strategy for branch-and-bound search.
MISQP Node Selection=BEST OF ALL
Large tree search; this method is the slowest as it solves all subproblem QPs independently.
MISQP Node Selection=BEST OF TWO
Uses warm starts and less memory.
MISQP Node Selection=DEPTH FIRST
Uses more warm starts. If warm starts are applied, they can speed up the solution of mixed integer subproblems significantly when solving almost identical QPs.
MISQP Non MonotoneiDefault =10
This parameter defines the maximum number of successive iterations considered for the non-monotone trust region algorithm, allowing the penalty function to increase.
Constraint: 0<MISQP Non Monotone<100.
MISQP PenaltyrDefault =1000.0
This sets the initial penalty parameter, σ.
Constraint: MISQP Penalty0.0.
MISQP Penalty FactorrDefault =10.0
This parameter defines the factor for increasing the internal penalty parameter, σ, when the trust regions cannot be enlarged at a trial step.
Constraint: MISQP Penalty Factor>1.0.
MISQP QP AccuracyrDefault =10-10
This parameter defines the termination tolerance of the relaxed quadratic program subproblems.
Constraint: MISQP QP Accuracy>0.0.
MISQP Scale Continuous VarsaDefault =YES
This option specifies whether to internally scale continuous variable values.
Constraint: MISQP Scale Continuous Vars=YES or NO.
MISQP Scale ObjectiveaDefault =YES
This option specifies whether to internally scale objective function values greater than MISQP Scale Objective Bound.
Constraint: MISQP Scale Objective=YES or NO.
MISQP Scale Objective BoundrDefault =1.0
When MISQP Scale Objective=YES, absolute objective function values greater than this parameter are internally scaled.
Constraint: MISQP Scale Objective Bound>0.0.
MISQP Stop TolerancerDefault = max(10-5,ε)
This parameter sets the requested accuracy for determining feasible points during iterations and for halting the method when the predicted improvement in objective function is less than MISQP Stop Tolerance.
Constraint: MISQP Stop Tolerance0.0.
MISQP Subproblem Max NodesiDefault =500
This parameter defines the maximum number of branch-and-bound steps for solving the mixed integer quadratic problems.
Constraint: MISQP Subproblem Max Nodes>1.
MISQP Warm StartsiDefault =100
This parameter defines the maximum number of warm starts within the mixed integer QP solver. See MISQP Node Selection.
Constraint: MISQP Warm Starts0.
Print FileiDefault =Nag_FileID number associated with stdout
(See Section 3.1.1 in the Introduction to the NAG Library CL Interface for further information on NAG data types.)
If i0, the Nag_FileID number (as returned from x04acc, stdout as the default) for the primary output of the solver. If Print File=−1, the primary output is completely turned off independently of other settings. The following information is output to the unit:
Constraint: Print File-1.
Print LeveliDefault =2
This parameter defines how detailed information should be printed by the solver to the primary output.
i Output
0 No output from the solver
1 Only the final status and the objective value
2 Problem statistics, one line per iteration showing the progress of the solution with respect to the convergence measures, final status and statistics
3, 4, 5 As level 2 and additionally inner iteration log with further details.
Constraint: 0Print Level5.
Print OptionsaDefault =YES
If Print Options=YES, a listing of optional parameters will be printed to the primary output.
Constraint: Print Options=YES or NO.
Print SolutionaDefault =NO
If Print Solution=YES, the final values of the solution vector are printed on the primary and secondary outputs.
Constraint: Print Solution=YES or NO.
Stats TimeaDefault =NO
This parameter allows you to turn on timings of various parts of the algorithm to give a better overview of where most of the time is spent. This might be helpful for a choice of different solving approaches. It is possible to choose between CPU and wall clock time. Choice YES is equivalent to WALL CLOCK.
Constraint: Stats Time=YES, NO, CPU or WALL CLOCK.
TaskaDefault =MINIMIZE
This parameter specifies the required direction of the optimization. If Task=FEASIBLE POINT, the objective function (if set) is ignored and the algorithm stops as soon as a feasible point is found. If no objective function is set, Task reverts to FEASIBLE POINT automatically.
Constraint: Task=MINIMIZE, MAXIMIZE or FEASIBLE POINT.
Time LimitrDefault =106
This parameter specifies a limit in seconds that the solver can use to solve one problem. If during the convergence check this limit is exceeded, the solver will terminate with fail.code= NE_TIME_LIMIT error message.
Constraint: Time Limit>0.
Verify DerivativesaDefault =NO
This parameter specifies whether the function should perform numerical checks on the consistency of the user-supplied gradient functions objgrd and congrd. If any discrepancies are found, fail.code= NE_DERIV_ERRORS is returned. It is recommended that such checks are enabled when first developing the formulation of the problem, however, the verification process results in a significant increase in the number of the function evaluations and thus it shouldn't be used in production code.
Constraint: Verify Derivatives=YES or NO.