QSopt QSwrite_prob QSopt > Callable Library > Function List
  QSopt
  Downloads
  LP Info
  Software
  Problem Formats
  Callable Library
  Overview
Function List
  Rational Solver
  Beta
  Contact Info
Purpose
Write the problem to a named file.
Synopsis
int QSwrite_prob (QSprob p, const char *filename, const char *filetype)
Arguments
p a handle to an initialized problem.
filename a string containing the name of the file to store the problem.
filetype use "LP" to write a file in LP format or "MPS" to write a file in MPS format
Returns
A zero value if the function terminated correctly, and a non-zero value if an error occurred.
Description

Writes problem p to a file in LP format or MPS format. The name of the file is specified by filename. If filetype is specified as "LP" (the letters in the string can be any mix of uppercase and lowercase), then the problem is written in LP format; if filetype is specified as "MPS" (again, the letters in the string can be any mix of uppercase and lowercase), then the problem is written in MPS format. If filetype is specified as something other than "LP" or "MPS", then an error code will be returned.

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

int rval;

rval = QSwrite_prob (p, "binky.mps", "MPS");
if (rval) {
    fprintf (stderr,
             "Could not write the MPS file, error code %d\n", rval);
}
 
QSopt | Problem Formats | Downloads Back
Last Updated: November 2003