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

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

# NAG Toolbox: nag_mip_optget (h02zl)

## Purpose

nag_mip_optget (h02zl) is used to query the value of optional parameters available to supported problem solving functions in Chapter H.
Currently, only nag_mip_sqp (h02da) is supported.

## Syntax

[ivalue, rvalue, cvalue, optype, ifail] = h02zl(optstr, iopts, opts)
[ivalue, rvalue, cvalue, optype, ifail] = nag_mip_optget(optstr, iopts, opts)

## Description

nag_mip_optget (h02zl) is used to query the current values of options. It is necessary to initialize optional parameter arrays using nag_mip_optset (h02zk) before any options are queried.
nag_mip_optget (h02zl) will normally return either an integer, real or character value dependent upon the type associated with the optional parameter being queried. Some real and integer options also return additional information in cvalue. Whether the option queried is of integer, real or character type, and whether additional information is returned in cvalue, is indicated by the returned value of optype.
Information on optional parameter names and whether these options are real, integer or character can be found in Optional Parameters in nag_mip_sqp (h02da).

None.

## Parameters

### Compulsory Input Parameters

1:     $\mathrm{optstr}$ – string
A string identifying the option whose current value is required. See Optional Parameters in nag_mip_sqp (h02da) for information on valid options. In addition, the following is a valid option:
$\mathbf{Identify}$
nag_mip_optget (h02zl) returns in cvalue the function name supplied to nag_mip_optset (h02zk) when the optional parameter arrays iopts and opts were initialized.
2:     $\mathrm{iopts}\left(:\right)$int64int32nag_int array
Note: the dimension of this array is dictated by the requirements of associated functions that must have been previously called. This array must be the same array passed as argument iopts in the previous call to nag_mip_optset (h02zk).
3:     $\mathrm{opts}\left(:\right)$ – double array
Note: the dimension of this array is dictated by the requirements of associated functions that must have been previously called. This array must be the same array passed as argument opts in the previous call to nag_mip_optset (h02zk).

None.

### Output Parameters

1:     $\mathrm{ivalue}$int64int32nag_int scalar
If the optional parameter supplied in optstr is an integer valued argument, ivalue will hold its current value.
2:     $\mathrm{rvalue}$ – double scalar
If the optional parameter supplied in optstr is a real valued argument, rvalue will hold its current value.
3:     $\mathrm{cvalue}$ – string
Note: the string returned in cvalue will never exceed $40$ characters in length.
If the optional parameter supplied in optstr is a character valued argument, cvalue will hold its current value. cvalue will also contain additional information for some integer and real valued arguments, as indicated by optype.
4:     $\mathrm{optype}$int64int32nag_int scalar
Indicates whether the optional parameter supplied in optstr is an integer, real or character valued argument and hence which of ivalue, rvalue or cvalue holds the current value.
${\mathbf{optype}}=1$
optstr is an integer valued optional parameter, its current value has been returned in ivalue.
${\mathbf{optype}}=2$
optstr is a real valued optional parameter, its current value has been returned in rvalue.
${\mathbf{optype}}=3$
optstr is a character valued optional parameter, its current value has been returned in cvalue.
${\mathbf{optype}}=4$
optstr is an integer valued optional parameter, its current value has been returned in ivalue. Additional information has been returned in cvalue.
${\mathbf{optype}}=5$
optstr is a real valued optional parameter, its current value has been returned in rvalue. Additional information has been returned in cvalue.
5:     $\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 option in optstr has not been recognized.
${\mathbf{ifail}}=41$
On entry, optstr indicates a character optional parameter, but cvalue is too short to hold the stored value. The returned value will be truncated.
${\mathbf{ifail}}=61$
The arrays iopts and opts have either not been initialized, have become corrupted, or are not compatible with this option setting function.
${\mathbf{ifail}}=-99$
An unexpected error has been triggered by this routine. Please contact NAG.
${\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.