hide long namesshow long names
hide short namesshow short names
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)

 Contents

    1  Purpose
    2  Syntax
    7  Accuracy
    9  Example

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).

References

None.

Parameters

Compulsory Input Parameters

1:     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:
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:     iopts: 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:     opts: – 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).

Optional Input Parameters

None.

Output Parameters

1:     ivalue int64int32nag_int scalar
If the optional parameter supplied in optstr is an integer valued argument, ivalue will hold its current value.
2:     rvalue – double scalar
If the optional parameter supplied in optstr is a real valued argument, rvalue will hold its current value.
3:     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:     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.
optype=1
optstr is an integer valued optional parameter, its current value has been returned in ivalue.
optype=2
optstr is a real valued optional parameter, its current value has been returned in rvalue.
optype=3
optstr is a character valued optional parameter, its current value has been returned in cvalue.
optype=4
optstr is an integer valued optional parameter, its current value has been returned in ivalue. Additional information has been returned in cvalue.
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:     ifail int64int32nag_int scalar
ifail=0 unless the function detects an error (see Error Indicators and Warnings).

Error Indicators and Warnings

Errors or warnings detected by the function:
   ifail=11
On entry, the option in optstr has not been recognized.
   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.
   ifail=61
The arrays iopts and opts have either not been initialized, have become corrupted, or are not compatible with this option setting function.
   ifail=-99
An unexpected error has been triggered by this routine. Please contact NAG.
   ifail=-399
Your licence key may have expired or may not have been installed correctly.
   ifail=-999
Dynamic memory allocation failed.

Accuracy

Not applicable.

Further Comments

None.

Example

See the example programs associated with the problem solving function you wish to use for a demonstration of how to use nag_mip_optget (h02zl) to query options.

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

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015