naginterfaces.library.opt.handle_set_get_integer¶
- naginterfaces.library.opt.handle_set_get_integer(handle, cmdstr, iarr=None)[source]¶
handle_set_get_integer
is a part of the NAG optimization modelling suite. It allows an Integer piece of information to be read from or written to the problem stored in the handle. For example, it may be used to extract the current problem sizes and statistics.For full information please refer to the NAG Library document for e04rw
https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/e04/e04rwf.html
- Parameters
- handleHandle
The handle to the problem. It needs to be initialized by
handle_init()
and must not be changed between calls to the NAG optimization modelling suite.- cmdstrstr
A string which identifies the item within the handle to be read or written. The string is case insensitive and space tolerant.
- iarrNone or int, array-like, shape , optional
If is not None (write mode), must contain the information to be written to the handle.
- Returns
- liarrint
In write mode and when the size of the input does not match the item identified by , is the correct expected size. Otherwise, it is merely the actual size of the relevant .
- iarrNone or int, ndarray, shape
If was None on entry (read mode), contains the information requested by .
- Raises
- NagValueError
- (errno )
has not been initialized.
- (errno )
does not belong to the NAG optimization modelling suite, has not been initialized properly or is corrupted.
- (errno )
has not been initialized properly or is corrupted.
- (errno )
The provided is not recognised.
- (errno )
Reading mode is not supported for the given .
- (errno )
Writing mode is not supported for the given .
- (errno )
The requested information is not available.
- (errno )
The request cannot be processed at this phase.
- Notes
handle_set_get_integer
adds an additional means of communication to functions within the NAG optimization modelling suite. It allows you to either read or write a piece of information in the handle in the form of an integer array. The item is identified by and the direction of the communication is set by the presence or absence of . The functionality is limited in this release of the NAG Library to the retrieval of the problem size and statistics.General information on available is as follows.
Description
Direction of communication
BASIS
The current state of the variables and slacks of the problem. It can also be referred as WARM START BASIS.
Read and write
PINFO
The current problem sizes and statistics as defined in
handle_read_file()
Read
MCS Number Points
Used to provide a custom initialization list for the solver
glopt.handle_solve_mcs
.Write
MCS Initial Points
Used to provide a custom initialization list for the solver
glopt.handle_solve_mcs
.Write
See the E04 Introduction for more details about the NAG optimization modelling suite.