NAG CL Interface
e04zpc (handle_​opt_​set_​file)

Settings help

CL Name Style:


1 Purpose

e04zpc is an option setting function for all solvers from the NAG optimization modelling suite. It can set one or more optional parameters from an external file.

2 Specification

#include <nag.h>
void  e04zpc (void *handle, Nag_FileID fileid, NagError *fail)
The function may be called by the names: e04zpc or nag_opt_handle_opt_set_file.

3 Description

e04zpc may be used to supply values for optional parameters to the solver from an external file. It can only be called on handles which have been correctly initialized (e.g., by e04rac) and before the call to the solver. e04zpc looks in the file for a specific section containing the optional parameters. The section must start with a line Begin and must finish with a line End. Anything outside the section is ignored. If there is more than one section like this, only the first one is processed. Any line within the section is either blank or a comment which is ignored or defines a single optional parameter as if it had been set by e04zmc. The implied data type (character, integer or real) of each value to be set must match that expected by the corresponding optional parameter. It is only necessary to supply values for those arguments whose values are to be different from their default values. A comment begins with an asterisk (*) and all subsequent characters to the end of the line are ignored. Comments can also be placed after the optional parameter. The file is case insensitive.
Note that the optional parameters printed by the solver or by e04ryc are in the compatible format. An example of a valid options file is:
Begin * Example options file
   Print Level = 3 
   Monitoring Level = 5 * output all details
   Monitoring File = 42 * to this file
End
See 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: fileid Nag_FileID Input
On entry: the file identifier associated with the argument data file. Note:  that the file needs to be opened in read mode by x04acc with mode=0.
3: 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_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_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
The expected delimiter ‘=’ was not found on line value.
The optval provided on line value could not be converted to the expected numerical type.
NE_INVALID_OPTION
The option provided on line value was not recognized.
NE_INVALID_VALUE
The optval provided on line value for the character optional parameter is not valid.
The optval provided on line value for the integer optional parameter is out of bounds.
The optval provided on line value for the real optional parameter is out of bounds.
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_READ_FILE
BEGIN found, but end-of-file found before END. All optional parameters that were set from the file before this error was encountered will remain set on exit.
End-of-file or read error detected before BEGIN was found.
NE_PHASE
The options cannot be modified while solver is running.

7 Accuracy

Not applicable.

8 Parallelism and Performance

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

9 Further Comments

None.

10 Example

See e04rac for links to all the examples in the suite.