XPRSwriterange

WRITERANGE


Purpose
Writes the ranging information to a CSV format ASCII file, problem_name.rsc (and .hdr). The binary range file (.rng) must already exist, created by XPRSrange (RANGE) and an associated header file.
Synopsis
int XPRS_CC XPRSwriterange(XPRSprob prob, const char *filename, const char *flags);
WRITERANGE [filename] [-flags]
Arguments
prob 
The current problem.
filename 
A string of up to 200 characters containing the file name to which the solution is to be written. If omitted, the default problem_name will be used. The extensions .hdr and .rsc will be appended to the filename.
flags 
Flags to control which optional fields are output:
sequence number;
name;
type;
basis status;
activity;
cost (column), slack (row).
If no flags are specified, all fields are output.
Related Controls
Double
Zero tolerance on print values.

String
Mask to restrict the row and column names output to file.

Example 1 (Library)
At its most basic, the usage of XPRSwriterange (WRITERANGE) is similar to that of XPRSwriteprtrange (WRITEPRTRANGE), except that the output is intended as input to another program. The following example shows its use:
XPRSreadprob(prob, "myprob", "");
XPRSminim(prob, "");
XPRSrange(prob);
XPRSwriterange(prob, "", "");
Example 2 (Console)
RANGE
WRITERANGE -nbac
This example would output just the name, basis status, activity, and cost (for columns) or slack (for rows) for each vector to the file problem_name.rsc. It would also output a number of other fields of ranging information which cannot be enabled/disabled by the user.
Further information
1. The following fields are always present in the .rsc file, in the order specified. See the description of the ASCII range files in Appendix Log and File Formats for details of their interpretation.For rows, the lower and upper cost entries are zero. If a limiting process or activity does not exist, the field is blank, delimited by double quotes.
2. The control OUTPUTMASK may be used to control which vectors are reported to the ASCII file. Only vectors whose names match OUTPUTMASK are output. This is set to "????????" by default, so that all vectors are output.
Related topics
XPRSgetlpsol, XPRSgetmipsol, XPRSwriteprtrange (WRITEPRTRANGE), XPRSrange (RANGE), XPRSwritesol (WRITESOL), ASCII Range Files.


If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.