# NAG CL Interfacee05zkc (optset)

Settings help

CL Name Style:

## 1Purpose

e05zkc either initializes or resets the optional parameter arrays or sets a single optional parameter for supported problem solving functions in Chapter E05. The following functions are supported:

## 2Specification

 #include
 void e05zkc (const char *optstr, Integer iopts[], Integer liopts, double opts[], Integer lopts, NagError *fail)
The function may be called by the names: e05zkc, nag_glopt_optset or nag_glopt_opt_set.

## 3Description

e05zkc 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 ‘$\mathit{option}=\mathit{optval}$’; alphabetic characters can be supplied in either upper or lower case. Both $\mathit{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 e05zlc. To initialize the optional parameter arrays iopts and opts for a specific problem solving function, the option Initialize is used with $\mathit{optval}$ identifying the problem solving function to be called. For example, to initialize optional parameter arrays to be passed to e05sac, e05zkc is called as follows:
`nag_glopt_optset("Initialize = e05sac", iopts, liopts, opts, lopts, &fail)`
Information relating to available option names and their corresponding valid values is given in Section 12 in e05sac, e05sbc, e05ucc and e05usc.

None.

## 5Arguments

1: $\mathbf{optstr}$const char * Input
On entry: 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 name associated with the function of interest.
$\mathbf{Defaults}$
Resets all options to their default values.
$\mathit{option}=\mathit{optval}$
See Section 12 in e05sac, e05sbc, e05ucc and e05usc for details of valid values for $\mathit{option}$ and $\mathit{optval}$. The equals sign ($=$) delimiter must be used to separate the $\mathit{option}$ from its $\mathit{optval}$ value.
optstr is case insensitive. Each token in the $\mathit{option}$ and $\mathit{optval}$ component must be separated by at least one space.
2: $\mathbf{iopts}\left[{\mathbf{liopts}}\right]$Integer Communication Array
On entry: optional parameter array.
If optstr has the form ${\mathbf{Initialize}}=\mathit{function name}$, the contents of iopts need not be set.
Otherwise, iopts MUST NOT have been altered since the last call to e05zkc, e05zlc or the selected problem solving function.
On exit: dependent on the contents of optstr, either an initialized, reset or updated version of the optional parameter array.
3: $\mathbf{liopts}$Integer Input
On entry: the length of the array iopts.
Constraint: unless otherwise stated in the documentation for a specific, supported, problem solving function,${\mathbf{liopts}}\ge 100$.
4: $\mathbf{opts}\left[{\mathbf{lopts}}\right]$double Communication Array
On entry: optional parameter array.
If optstr has the form ${\mathbf{Initialize}}=\mathit{function name}$, the contents of opts need not be set.
Otherwise, opts MUST NOT have been altered since the last call to e05zkc, e05zlc or the selected problem solving function.
On exit: dependent on the contents of optstr, either an initialized, reset or updated version of the optional parameter array.
5: $\mathbf{lopts}$Integer Input
On entry: the length of the array opts.
Constraint: unless otherwise stated in the documentation for a specific, supported, problem solving function,${\mathbf{lopts}}\ge 100$.
6: $\mathbf{fail}$NagError * Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).

## 6Error 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.
On entry, argument $⟨\mathit{\text{value}}⟩$ had an illegal value.
NE_INT
On entry, ${\mathbf{liopts}}=⟨\mathit{\text{value}}⟩$.
Constraint: ${\mathbf{liopts}}\ge ⟨\mathit{\text{value}}⟩$.
On entry, ${\mathbf{lopts}}=⟨\mathit{\text{value}}⟩$.
Constraint: ${\mathbf{lopts}}\ge ⟨\mathit{\text{value}}⟩$.
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_INVALID_FORMAT
On entry, could not convert the specified $\mathit{optval}$ to an integer: ${\mathbf{optstr}}=⟨\mathit{\text{value}}⟩$.
On entry, could not convert the specified $\mathit{optval}$ to a real: ${\mathbf{optstr}}=⟨\mathit{\text{value}}⟩$.
On entry, the expected delimiter ‘$=$’ was not found in optstr: ${\mathbf{optstr}}=⟨\mathit{\text{value}}⟩$.
The $\mathit{option}$ in optstr is associated with a numerical value. However, the $\mathit{optval}$, $⟨\mathit{\text{value}}⟩$, present in optstr could not be fully interpreted.
NE_INVALID_OPTION
On entry, either the option arrays have not been initialized or they have been corrupted.
On entry, the optional parameter in optstr was not recognized: ${\mathbf{optstr}}=⟨\mathit{\text{value}}⟩$.
NE_INVALID_VALUE
On entry, the $\mathit{optval}$ supplied for the character optional parameter is not valid.
${\mathbf{optstr}}=⟨\mathit{\text{value}}⟩$.
On entry, the $\mathit{optval}$ supplied for the integer optional parameter is not valid.
${\mathbf{optstr}}=⟨\mathit{\text{value}}⟩$.
On entry, the $\mathit{optval}$ supplied for the real optional parameter is not valid.
${\mathbf{optstr}}=⟨\mathit{\text{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_NOT_FUN_NAME
On entry, the $\mathit{option}$ in optstr has been detected as Initialize, however the $\mathit{optval}$, $⟨\mathit{\text{value}}⟩$, associated with optstr has not been recognized as a valid function name.

Not applicable.

## 8Parallelism and Performance

Some options have default values which are problem dependent. For example the option ${\mathbf{Maximum Iterations Completed}}$ for e05sac has the default value $1000×{\mathbf{ndim}}$. If options such as this are set, they may only be set to constant values. If such an option is reset to its DEFAULT value its dependence on the specific problem will be restored.