XPRSwriterange (WRITERANGE)
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
MAXPROBNAMELENGTH characters containing the file name to which the ranging information 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:
If no flags are specified, all fields are output.
|
Related controls
Double
String
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", ""); XPRSlpoptimize(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.
- lower activity
- unit cost down
- upper cost (or lower profit if maximizing)
- limiting process down
- status of down limiting process
- upper activity
- unit cost up
- lower cost (or upper profit if maximizing)
- limiting process up
- status of up limiting process
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),
The Directives (.dir) File.