RPD#

purpose#

The rpd package reads and writes quadratic programming (and related) problem data to and from a QPLIB-format data file. Variables may be continuous, binary or integer.

Currently only the options and inform dictionaries are exposed; these are provided and used by other GALAHAD packages with Python interfaces. Please contact us if you would like full functionality!

See Section 4 of $GALAHAD/doc/rpd.pdf for additional details.

reference#

The QPBLIB format is defined in

F. Furini, E. Traversi, P. Belotti, A. Frangioni, A. Gleixner, N. Gould, L. Liberti, A. Lodi, R. Misener, H. Mittelmann, N. V. Sahinidis, S. Vigerske and A. Wiegele, ``QPLIB: a library of quadratic programming instances’’, Mathematical Programming Computation 11 (2019) 237-–265.

functions#

rpd.initialize()#

Set default option values and initialize private data.

Returns:

optionsdict
dictionary containing default control options:
errorint

error and warning diagnostics occur on stream error.

outint

general output occurs on stream out.

qplibint

QPLIB file input stream number.

errorint

error and warning diagnostics occur on stream error.

outint

general output occurs on stream out.

print_levelint

the level of output required is specified by print_level. Possible values are

  • <=0

    gives no output,

  • >=1

    gives increasingly verbose (debugging) output.

space_criticalbool

if space_critical True, every effort will be made to use as little space as possible. This may result in longer computation time.

deallocate_error_fatalbool

if deallocate_error_fatal is True, any array/pointer deallocation error will terminate execution. Otherwise, computation will continue.

[optional] rpd.information()

Provide optional output information.

Returns:

informdict
dictionary containing output information:
statusint

return status. Possible values are

  • 0

    The call was successful.

  • -1

    An allocation error occurred. A message indicating the offending array is written on unit options[‘error’], and the returned allocation status and a string containing the name of the offending array are held in inform[‘alloc_status’] and inform[‘bad_alloc’] respectively.

  • -2

    A deallocation error occurred. A message indicating the offending array is written on unit options[‘error’] and the returned allocation status and a string containing the name of the offending array are held in inform[‘alloc_status’] and inform[‘bad_alloc’] respectively.

  • -22

    An input/outpur error occurred.

  • -25

    The end of the input file was reached prematurely.

  • -5

    The problem type was not recognised.

alloc_statusint

the status of the last attempted allocation/deallocation.

bad_allocstr

the name of the array for which an allocation/deallocation error occurred.

io_statusint

status from last read attempt.

lineint

number of last line read from i/o file.

p_typestr

problem type.

rpd.finalize()#

Deallocate all internal private storage.