QSopt QSread_basis QSopt > Callable Library > Function List
  QSopt
  Downloads
  LP Info
  Software
  Problem Formats
  Callable Library
  Overview
Function List
  Rational Solver
  Beta
  Contact Info
Purpose
Read a basis from a file.
Synopsis
QSbas QSread_basis (QSprob p, const char *filename)
Arguments
p a handle to an initialized problem.
filename a string specifying the name of the file containing the basis.
Returns
An initialized QSbas object, providing a handle to the basis described in the file. If an error occurred, the QSbas object is set to NULL.
Description

This function returns the basis in the QSbas data structure. The function can be used if an application has stored the basis information and may need to load it several times (for example, when the LP problem is solved in several different ways, or after several different types of modifications). If the application only needs to solve the LP problem a single time and the QSbas data structure is being passed directly to the QSprob p via a call to QSload_basis, then it may be easier to use the function QSread_and_load_basis to read and load the basis in a single stroke.

When a application no longer requires the QSbas data structure, the function QSfree_basis should be call to free the associated memory.

The basis file should contain a description of the basis in the industry standard MPS Basis format. (This is the format that is used by QSwrite_basis.)

Example
/* p is an initialized QSprob, a handle to an existing LP problem  */

QSbas B;

B = QSread_basis (p, "binky.bas");
if (B == (QSbas) NULL) {
    fprintf (stderr, "Could not read the basis\n");
}
 
QSopt | Problem Formats | Downloads Back
Last Updated: November 2003