naginterfaces.library.glopt.bnd_mcs_optset_file¶
- naginterfaces.library.glopt.bnd_mcs_optset_file(iopts, comm, io_manager=None)[source]¶
bnd_mcs_optset_file
may be used to supply options tobnd_mcs_solve()
from an external file. The initialization functionbnd_mcs_init()
must have been called before callingbnd_mcs_optset_file
.Deprecated since version 28.3.0.0:
bnd_mcs_optset_file
is deprecated. There is no suggested replacement for this routine.For full information please refer to the NAG Library document for e05jc
https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/e05/e05jcf.html
- Parameters
- ioptsint
The unit number (see
unit_from_fileobj()
) of the option file to be read.- commdict, communication object, modified in place
Communication structure.
This argument must have been initialized by a prior call to
bnd_mcs_init()
.- io_managerFileObjManager, optional
Manager for I/O in this routine.
- Raises
- NagValueError
- (errno )
Initialization function
bnd_mcs_init()
has not been called.- (errno )
Could not read options file.
- (errno )
At least one option from the options file could not be recognized.
- (errno )
End-of-file found before BEGIN.
- (errno )
BEGIN found, but end-of-file found before END.
- (errno )
Attempt to assign a non-positive value of ‘Function Evaluations Limit’ (): .
- (errno )
Attempt to assign an out-of-bounds value of ‘Infinite Bound Size’ (): .
- (errno )
Attempt to assign a non-positive value of ‘Static Limit’ (): .
- (errno )
Attempt to assign too small a value of ‘Target Objective Error’ (): .
- (errno )
Attempt to assign too small a value of ‘Target Objective Safeguard’ (): .
- (errno )
Attempt to assign a non-positive value of ‘Local Searches Limit’ (): .
- (errno )
Attempt to assign too small a value of ‘Local Searches Tolerance’ (): .
- (errno )
Attempt to assign an illegal value of ‘Local Searches’ (): .
- (errno )
Attempt to assign an illegal value of ‘Repeatability’ (): .
- (errno )
One of the numeric values to be set could not be parsed. Check that all such strings specify valid integer or real values.
- Notes
bnd_mcs_optset_file
may be used to supply values for options tobnd_mcs_solve()
.bnd_mcs_optset_file
reads an external file and each line of the file defines a single option. It is only necessary to supply values for those arguments whose values are to be different from their default values.Each option is defined by a single character string, of up to characters, consisting of one or more items. The items associated with a given option must be separated by spaces, or equals signs . Alphabetic characters may be upper or lower case. The string
Static Limit = 100
is an example of a string used to set an option. For each option the string contains one or more of the following items:
a mandatory keyword;
a phrase that qualifies the keyword;
a number that specifies an integer or real value. Such numbers may be up to contiguous characters.
Blank strings and comments are ignored. A comment begins with an asterisk (*) and all subsequent characters in the string are regarded as part of the comment.
The implied data type (character, integer or real) of each value to set must match that expected by the corresponding option.
The file containing the options must start with
Begin
and must finish withEnd
. An example of a valid options file is:Begin * Example options file Static Limit = 500 End
Option settings are preserved following a call to
bnd_mcs_solve()
and so the keyword ‘Defaults’ is provided to allow you to reset all the options to their default values before a subsequent call tobnd_mcs_solve()
.A complete list of options, their symbolic names and default values is given in Other Parameters for bnd_mcs_solve.