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_optset (h02zk)

 Contents

    1  Purpose
    2  Syntax
    7  Accuracy
    9  Example

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 =optval’; alphabetic characters can be supplied in either upper or lower case. Both option and optval may consist of one or more tokens separated by white space. The tokens that comprise 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 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).

References

None.

Parameters

Compulsory Input Parameters

1:     optstr – string
A string identifying the option to be set.
Initialize=function name
Initialize the optional parameter arrays iopts and opts for use with function function name, where function name is the short name associated with the function of interest.
Defaults
Resets all options to their default values.
option=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:     ioptsliopts int64int32nag_int array
3:     optslopts – double array

Optional Input Parameters

1:     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, liopts200.
2:     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, lopts100.

Output Parameters

1:     ioptsliopts int64int32nag_int array
2:     optslopts – double array
3:     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 optional parameter in optstr was not recognized.
   ifail=12
On entry, the expected delimiter ‘=’ was not found in optstr.
   ifail=13
On entry, could not convert the specified optval to an integer.
On entry, could not convert the specified optval to a real.
   ifail=14
On entry, attempting to initialize the optional parameter arrays but specified function name was not valid.
   ifail=15
On entry, the optval supplied for the integer optional parameter is not valid.
   ifail=16
On entry, the optval supplied for the real optional parameter is not valid.
   ifail=17
On entry, the optval supplied for the character optional parameter is not valid.
   ifail=21
On entry, either the option arrays have not been initialized or they have been corrupted.
   ifail=31
liopts is too small.
   ifail=51
lopts is too small.
   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_optset (h02zk) to initialize option arrays and set 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