Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

Chapter Contents
Chapter Introduction
NAG Toolbox

# NAG Toolbox: nag_mip_optset (h02zk)

## Purpose

nag_mip_optset (h02zk) either initializes or resets the optional parameter arrays or sets a single optional parameter for supported problem solving functions in Chapter H.
Currently, only nag_mip_sqp (h02da) is supported.

## Syntax

[iopts, opts, ifail] = h02zk(optstr, iopts, opts, 'liopts', liopts, 'lopts', lopts)
[iopts, opts, ifail] = nag_mip_optset(optstr, iopts, opts, 'liopts', liopts, 'lopts', lopts)

## Description

nag_mip_optset (h02zk) has three purposes: to initialize optional parameter arrays; to reset all optional parameters to their default values; or to set a single optional parameter to a user-supplied value.
Optional parameters and their values are, in general, presented as a character string, optstr, of the form ‘option $\text{}=\mathit{optval}$’; alphabetic characters can be supplied in either upper or lower case. Both option and $\mathit{optval}$ may consist of one or more tokens separated by white space. The tokens that comprise $\mathit{optval}$ will normally be either an integer, real or character value as defined in the description of the specific optional argument. In addition all optional parameters can take an $\mathit{optval}$ DEFAULT which resets the optional parameter to its default value.
It is imperative that optional parameter arrays are initialized before any options are set, before the relevant problem solving function is called and before any options are queried using nag_mip_optget (h02zl). To initialize the optional parameter arrays iopts and opts for a specific problem solving function, the option Initialize is used with optval identifying the problem solving function to be called, via its short name. For example, to initialize optional parameter arrays to be passed to nag_mip_sqp (h02da), nag_mip_optset (h02zk) is called as follows:
[iopts, opts, ifail] = h02zk('Initialize = h02da', iopts, opts);
Information relating to available option names and their corresponding valid values is given in Optional Parameters in nag_mip_sqp (h02da).

None.

## Parameters

### Compulsory Input Parameters

1:     $\mathrm{optstr}$ – string
A string identifying the option to be set.
$\mathbf{Initialize}=\mathit{function name}$
Initialize the optional parameter arrays iopts and opts for use with function $\mathit{function name}$, where $\mathit{function name}$ is the short name associated with the function of interest.
$\mathbf{Defaults}$
Resets all options to their default values.
$\mathit{option}=\mathit{optval}$
See Optional Parameters in nag_mip_sqp (h02da) for details of valid values for option and optval. The equals sign ($=$) delimiter must be used to separate the option from its optval value.
optstr is case insensitive. Each token in the option and optval component must be separated by at least one space.
2:     $\mathrm{iopts}\left({\mathbf{liopts}}\right)$int64int32nag_int array
3:     $\mathrm{opts}\left({\mathbf{lopts}}\right)$ – double array

### Optional Input Parameters

1:     $\mathrm{liopts}$int64int32nag_int scalar
Default: the dimension of the array iopts.
The length of the array iopts.
Constraint: unless otherwise stated in the documentation for a specific, supported, problem solving function, ${\mathbf{liopts}}\ge 200$.
2:     $\mathrm{lopts}$int64int32nag_int scalar
Default: the dimension of the array opts.
The length of the array opts.
Constraint: unless otherwise stated in the documentation for a specific, supported, problem solving function, ${\mathbf{lopts}}\ge 100$.

### Output Parameters

1:     $\mathrm{iopts}\left({\mathbf{liopts}}\right)$int64int32nag_int array
2:     $\mathrm{opts}\left({\mathbf{lopts}}\right)$ – double array
3:     $\mathrm{ifail}$int64int32nag_int scalar
${\mathbf{ifail}}={\mathbf{0}}$ unless the function detects an error (see Error Indicators and Warnings).

## Error Indicators and Warnings

Errors or warnings detected by the function:
${\mathbf{ifail}}=11$
On entry, the optional parameter in optstr was not recognized.
${\mathbf{ifail}}=12$
On entry, the expected delimiter ‘$=$’ was not found in optstr.
${\mathbf{ifail}}=13$
On entry, could not convert the specified optval to an integer.
On entry, could not convert the specified optval to a real.
${\mathbf{ifail}}=14$
On entry, attempting to initialize the optional parameter arrays but specified function name was not valid.
${\mathbf{ifail}}=15$
On entry, the optval supplied for the integer optional parameter is not valid.
${\mathbf{ifail}}=16$
On entry, the optval supplied for the real optional parameter is not valid.
${\mathbf{ifail}}=17$
On entry, the optval supplied for the character optional parameter is not valid.
${\mathbf{ifail}}=21$
On entry, either the option arrays have not been initialized or they have been corrupted.
${\mathbf{ifail}}=31$
liopts is too small.
${\mathbf{ifail}}=51$
lopts is too small.
${\mathbf{ifail}}=-99$
${\mathbf{ifail}}=-399$
Your licence key may have expired or may not have been installed correctly.
${\mathbf{ifail}}=-999$
Dynamic memory allocation failed.

Not applicable.