# NAG FL Interfacee04zmf (handle_​opt_​set)

## 1Purpose

e04zmf is an option setting routine for all solvers from the NAG optimization modelling suite. It can set a single optional parameter or reset all of them to their default.

## 2Specification

Fortran Interface
 Subroutine e04zmf (
 Integer, Intent (Inout) :: ifail Character (*), Intent (In) :: optstr Type (c_ptr), Intent (In) :: handle
#include <nag.h>
 void e04zmf_ (void **handle, const char *optstr, Integer *ifail, const Charlen length_optstr)
The routine may be called by the names e04zmf or nagf_opt_handle_opt_set.

## 3Description

e04zmf can only be called on handles which have been initialized by e04raf and not during the call to the solver. It has two purposes: 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.
Information relating to available option names and their corresponding valid values is given in the documentation of the particular solver. See also Section 3.1 in the E04 Chapter Introduction for more details about the NAG optimization modelling suite.

None.

## 5Arguments

1: $\mathbf{handle}$Type (c_ptr) Input
On entry: the handle to the problem. It needs to be initialized by e04raf and must not be changed before the call to e04zmf.
2: $\mathbf{optstr}$Character(*) Input
On entry: a string identifying the option and its value to be set.
$\mathbf{Defaults}$
Resets all options to their default values.
$\mathit{Option}=\mathit{optval}$
See the documentation of the particular solver for details of valid values for option and optval. The equals sign ($=$) delimiter must be used to separate the option from its optval value.
$\mathit{Option}=\mathbf{Default}$
Resets the given option back to its default value.
optstr is case insensitive. Each token in the option and optval component must be separated by at least one space.
3: $\mathbf{ifail}$Integer Input/Output
On entry: ifail must be set to $0$, $-1$ or $1$ to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of $0$ causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of $-1$ means that an error message is printed while a value of $1$ means that it is not.
If halting is not appropriate, the value $-1$ or $1$ is recommended. If message printing is undesirable, then the value $1$ is recommended. Otherwise, the value $0$ is recommended. When the value $-\mathbf{1}$ or $\mathbf{1}$ is used it is essential to test the value of ifail on exit.
On exit: ${\mathbf{ifail}}={\mathbf{0}}$ unless the routine detects an error or a warning has been flagged (see Section 6).

## 6Error Indicators and Warnings

If on entry ${\mathbf{ifail}}=0$ or $-1$, explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
${\mathbf{ifail}}=1$
The supplied handle does not define a valid handle to the data structure for the NAG optimization modelling suite. It has not been initialized by e04raf or it has been corrupted.
${\mathbf{ifail}}=2$
The options cannot be modified in this phase.
${\mathbf{ifail}}=11$
On entry, the option supplied in optstr was not recognized: ${\mathbf{optstr}}=〈\mathit{\text{value}}〉$.
${\mathbf{ifail}}=12$
On entry, the expected delimiter ‘$=$’ was not found in optstr: ${\mathbf{optstr}}=〈\mathit{\text{value}}〉$.
${\mathbf{ifail}}=13$
On entry, could not convert the specified optval to an integer: $\mathit{optval}=〈\mathit{\text{value}}〉$.
On entry, could not convert the specified optval to a real: $\mathit{optval}=〈\mathit{\text{value}}〉$.
${\mathbf{ifail}}=15$
On entry, the optval supplied for the integer optional parameter is not valid.
$\mathit{option}=〈\mathit{\text{value}}〉$, $\mathit{optval}=〈\mathit{\text{value}}〉$.
Constraint: $\mathit{optval}<〈\mathit{\text{value}}〉$.
On entry, the optval supplied for the integer optional parameter is not valid.
$\mathit{option}=〈\mathit{\text{value}}〉$, $\mathit{optval}=〈\mathit{\text{value}}〉$.
Constraint: $\mathit{optval}>〈\mathit{\text{value}}〉$.
On entry, the optval supplied for the integer optional parameter is not valid.
$\mathit{option}=〈\mathit{\text{value}}〉$, $\mathit{optval}=〈\mathit{\text{value}}〉$.
Constraint: $\mathit{optval}\le 〈\mathit{\text{value}}〉$.
On entry, the optval supplied for the integer optional parameter is not valid.
$\mathit{option}=〈\mathit{\text{value}}〉$, $\mathit{optval}=〈\mathit{\text{value}}〉$.
Constraint: $\mathit{optval}\ge 〈\mathit{\text{value}}〉$.
${\mathbf{ifail}}=16$
On entry, the optval supplied for the real optional parameter is not valid.
$\mathit{option}=〈\mathit{\text{value}}〉$, $\mathit{optval}=〈\mathit{\text{value}}〉$.
Constraint: $\mathit{optval}<〈\mathit{\text{value}}〉$.
On entry, the optval supplied for the real optional parameter is not valid.
$\mathit{option}=〈\mathit{\text{value}}〉$, $\mathit{optval}=〈\mathit{\text{value}}〉$.
Constraint: $\mathit{optval}>〈\mathit{\text{value}}〉$.
On entry, the optval supplied for the real optional parameter is not valid.
$\mathit{option}=〈\mathit{\text{value}}〉$, $\mathit{optval}=〈\mathit{\text{value}}〉$.
Constraint: $\mathit{optval}\le 〈\mathit{\text{value}}〉$.
On entry, the optval supplied for the real optional parameter is not valid.
$\mathit{option}=〈\mathit{\text{value}}〉$, $\mathit{optval}=〈\mathit{\text{value}}〉$.
Constraint: $\mathit{optval}\ge 〈\mathit{\text{value}}〉$.
${\mathbf{ifail}}=17$
On entry, the optval supplied for the character optional parameter is not valid.
$\mathit{option}=〈\mathit{\text{value}}〉$, $\mathit{optval}=〈\mathit{\text{value}}〉$.
${\mathbf{ifail}}=-99$
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
${\mathbf{ifail}}=-399$
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
${\mathbf{ifail}}=-999$
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.

Not applicable.

## 8Parallelism and Performance

e04zmf is not threaded in any implementation.