naginterfaces.library.opt.handle_write_file¶
- naginterfaces.library.opt.handle_write_file(handle, file, ftype)[source]¶
handle_write_file
creates a data file from an existing data structure from the NAG optimization modelling suite for problems such as, Linear Programming (LP), Quadratic Programming (QP), Second-order Cone Programming (SOCP), Nonlinear Programming (NLP), or Mixed Integer Linear Programming (MILP).For full information please refer to the NAG Library document for e04sb
https://support.nag.com/numeric/nl/nagdoc_31.1/flhtml/e04/e04sbf.html
- Parameters
- handleHandle
Holds a handle to the internal data structure.
- filestr
The name of the file to be opened.
- ftypestr
The file format of the file to be created.
or
The input file is in NAG Binary format.
- Raises
- NagValueError
- (errno )
has not been initialized.
- (errno )
On entry, .
Constraint: or .
- (errno )
Cannot open file for reading.
- (errno )
Cannot close file.
- (errno )
An error occurred when writing to file.
- Notes
handle_write_file
creates a data file from an existing data structure. Supported problem types include any problem defined using the handle interface within the NAG optimization modelling suite. The routinehandle_read_file()
can use the file created to initialize the data into the handle structure. The file has a header which contains information such as integer size, working precision size, and NAG Binary file version number (for a compatibility check). The main contents of the file is divided into sections using flags. See the E04 Introduction for more details about the NAG optimization modelling suite. Also see the E04 Introduction for more details on the standard formulations of the optimization problems (e.g., LP, QP, SOCP, NLP, and MILP).Note that semidefinite programming problems with bilinear matrix inequalities (BMI-SDP) are not supported.