NAG FL Interface
e04zmf (handle_​opt_​set)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

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.

2 Specification

Fortran Interface
Subroutine e04zmf ( handle, optstr, ifail)
Integer, Intent (Inout) :: ifail
Character (*), Intent (In) :: optstr
Type (c_ptr), Intent (In) :: handle
C Header Interface
#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.

3 Description

e04zmf can only be called on handles which have been correctly initialized (e.g., 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 ‘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 parameter. In addition all optional parameters can take an 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.

4 References

None.

5 Arguments

1: handle Type (c_ptr) Input
On entry: the handle to the problem. It needs to be initialized (e.g., by e04raf) and must not be changed between calls to the NAG optimization modelling suite.
2: optstr Character(*) Input
On entry: a string identifying the optional parameter and its value to be set.
Defaults
Resets all options to their default values.
Option=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.
Option=Default
Resets the given optional parameter 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: 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 -1 or 1 is used it is essential to test the value of ifail on exit.
On exit: ifail=0 unless the routine detects an error or a warning has been flagged (see Section 6).

6 Error Indicators and Warnings

If on entry 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:
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 properly initialized or it has been corrupted.
ifail=2
The options cannot be modified while solver is running.
ifail=11
On entry, the option supplied in optstr was not recognized: optstr=value.
ifail=12
On entry, the expected delimiter ‘=’ was not found in optstr: optstr=value.
ifail=13
On entry, could not convert the specified optval to an integer: optval=value.
On entry, could not convert the specified optval to a real: optval=value.
ifail=15
On entry, the optval supplied for the integer optional parameter is not valid.
option=value, optval=value.
Constraint: optval<value.
On entry, the optval supplied for the integer optional parameter is not valid.
option=value, optval=value.
Constraint: optval>value.
On entry, the optval supplied for the integer optional parameter is not valid.
option=value, optval=value.
Constraint: optvalvalue.
On entry, the optval supplied for the integer optional parameter is not valid.
option=value, optval=value.
Constraint: optvalvalue.
ifail=16
On entry, the optval supplied for the real optional parameter is not valid.
option=value, optval=value.
Constraint: optval<value.
On entry, the optval supplied for the real optional parameter is not valid.
option=value, optval=value.
Constraint: optval>value.
On entry, the optval supplied for the real optional parameter is not valid.
option=value, optval=value.
Constraint: optvalvalue.
On entry, the optval supplied for the real optional parameter is not valid.
option=value, optval=value.
Constraint: optvalvalue.
ifail=17
On entry, the optval supplied for the character optional parameter is not valid.
option=value, optval=value.
ifail=-99
An unexpected error has been triggered by this routine. Please contact NAG.
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
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.
ifail=-999
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.

7 Accuracy

Not applicable.

8 Parallelism and Performance

Background information to multithreading can be found in the Multithreading documentation.
e04zmf is not threaded in any implementation.

9 Further Comments

None.

10 Example

See the example programs associated with the solvers for a demonstration of how to use e04zmf, for example e04fff, e04mtf, e04ptf, e04stf and e04svf. See also e04raf for links to all the examples in this suite.