NAG CL Interface
e04znc (handle_​opt_​get)

Settings help

CL Name Style:


1 Purpose

e04znc is an option getting function for all solvers from the NAG optimization modelling suite. It is used to query the value of optional parameters.

2 Specification

#include <nag.h>
void  e04znc (void *handle, const char *optstr, Integer *ivalue, double *rvalue, char *cvalue, Integer lcvalue, Nag_VariableType *optype, NagError *fail)
The function may be called by the names: e04znc or nag_opt_handle_opt_get.

3 Description

e04znc is used to query the current values of optional parameters. It can be especially useful to retrieve the optional parameters left for automatic choice by the solver.
This function will normally return either an integer, real or character value dependent upon the type associated with the optional parameter being queried. This is indicated by the returned value of optype.
Information relating to available option names is given in the documentation of the particular solver. See also Section 4.1 in the E04 Chapter Introduction for more details about the NAG optimization modelling suite.

4 References

None.

5 Arguments

1: handle void * Input
On entry: the handle to the problem. It needs to be initialized (e.g., by e04rac) and must not be changed between calls to the NAG optimization modelling suite.
2: optstr const char * Input
On entry: a string identifying the optional parameter whose current value is required. See the documentation of the particular solver for information on valid optional parameters.
3: ivalue Integer * Output
On exit: if the optional parameter supplied in optstr is an integer-valued parameter, ivalue will hold its current value.
4: rvalue double * Output
On exit: if the optional parameter supplied in optstr is a real-valued parameter, rvalue will hold its current value.
5: cvalue char * Output
Note: the string returned in cvalue will never exceed min(lcvalue,41) characters in length, including the terminating NULL character.
On exit: if the optional parameter supplied in optstr is a character-valued parameter, cvalue will hold its current value.
6: lcvalue Integer Input
On entry: length of the string cvalue. At most lcvalue-1 non-null characters will be written into cvalue.
Constraint: lcvalue>1.
7: optype Nag_VariableType * Output
On exit: indicates whether the optional parameter supplied in optstr is an integer-, real- or character-valued parameter and hence which of ivalue, rvalue or cvalue holds the current value.
optype=Nag_Integer
optstr is an integer-valued optional parameter; its current value has been returned in ivalue.
optype=Nag_Real
optstr is a real-valued optional parameter; its current value has been returned in rvalue.
optype=Nag_Character
optstr is a character-valued optional parameter; its current value has been returned in cvalue.
8: fail NagError * Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).

6 Error 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.
NE_BAD_PARAM
On entry, argument value had an illegal value.
NE_HANDLE
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.
NE_INT
On entry, lcvalue=value.
Constraint: lcvalue>1.
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_OPTION
On entry, the option supplied in optstr was not recognized: optstr=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.
NW_TRUNCATED
On entry, optstr indicates a character optional parameter, but cvalue is too short to hold the stored value. The returned value will be truncated.

7 Accuracy

Not applicable.

8 Parallelism and Performance

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

9 Further Comments

None.

10 Example

See the example program associated with the solver e04svc for a demonstration of how to use e04znc to query options. See also e04rac for links to all the examples in the suite.