NAG CPP Interface
nagcpp::opt::handle_opt_set (e04zm)

1 Purpose

handle_opt_set is an option setting function 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

#include "e04/nagcpp_e04zm.hpp"
#include "e04/nagcpp_class_CommE04RA.hpp"
template <typename COMM>

void function handle_opt_set(COMM &comm, const string optstr, OptionalE04ZM opt)
template <typename COMM>

void function handle_opt_set(COMM &comm, const string optstr)

3 Description

handle_opt_set can only be called on handles which have been initialized by handle_​init 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 argument. 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: comm CommE04RA Input/Output
Communication structure. An object of either the derived class CommE04RA or its base class NoneCopyableComm can be supplied. It is recommended that the derived class is used. If the base class is supplied it must first be initialized via a call to opt::handle_init (e04ra).
2: optstr string Input
On entry: a string identifying the option 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 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: opt OptionalE04ZM Input/Output
Optional parameter container, derived from Optional.

6 Exceptions and Warnings

Errors or warnings detected by the function:
All errors and warnings have an associated numeric error code field, errorid, stored either as a member of the thrown exception object (see errorid), or as a member of opt.ifail, depending on how errors and warnings are being handled (see Error Handling for more details).
Raises: ErrorException
errorid=1
comm::handle has not been initialized.
errorid=1
comm::handle does not belong to the NAG optimization modelling suite,
has not been initialized properly or is corrupted.
errorid=1
comm::handle has not been initialized properly or is corrupted.
errorid=2
The options cannot be modified in this phase.
errorid=11
On entry, the option supplied in optstr was not recognized:
optstr=value.
errorid=12
On entry, the expected delimiter ‘=’ was not found in optstr:
optstr=value.
errorid=13
On entry, could not convert the specified optval to an integer:
optval=value.
errorid=13
On entry, could not convert the specified optval to a real:
optval=value.
errorid=15
On entry, the optval supplied for the integer option is not
valid.
option=value,
optval=value.
Constraint: optvalvalue.
errorid=15
On entry, the optval supplied for the integer option is not
valid.
option=value,
optval=value.
Constraint: optval>value.
errorid=15
On entry, the optval supplied for the integer option is not
valid.
option=value,
optval=value.
Constraint: optvalvalue.
errorid=15
On entry, the optval supplied for the integer option is not
valid.
option=value,
optval=value.
Constraint: optval<value.
errorid=16
On entry, the optval supplied for the real option is not valid.
option=value,
optval=value.
Constraint: optvalvalue.
errorid=16
On entry, the optval supplied for the real option is not valid.
option=value,
optval=value.
Constraint: optval>value.
errorid=16
On entry, the optval supplied for the real option is not valid.
option=value,
optval=value.
Constraint: optvalvalue.
errorid=16
On entry, the optval supplied for the real option is not valid.
option=value,
optval=value.
Constraint: optval<value.
errorid=17
On entry, the optval supplied for the character option is not
valid.
option=value,
optval=value.
errorid=10605
On entry, the communication class value has not been initialized correctly.
errorid=10703
An exception was thrown during IO (writing).
errorid=-99
An unexpected error has been triggered by this routine.
errorid=-399
Your licence key may have expired or may not have been installed correctly.
errorid=-999
Dynamic memory allocation failed.

7 Accuracy

Not applicable.

8 Parallelism and Performance

Please see the description for the underlying computational routine in this section of the FL Interface documentation.

9 Further Comments

None.

10 Example

Examples for the NAG CPP Interface are not currently available.