Initializing help system before first use

XPRSreadprob (READPROB)

XPRSreadprob

READPROB


Purpose
Reads an (X)MPS or LP format matrix from file.
Synopsis
int XPRS_CC XPRSreadprob(XPRSprob prob, const char *probname, const char *flags);
READPROB [-flags] [probname]
Arguments
prob 
The current problem.
probname 
The path and file name from which the problem is to be read. Limited to MAXPROBNAMELENGTH characters. If omitted (console users only), the default problem_name is used with various extensions - see below.
flags 
Flags to be passed:
only probname.lp is searched for;
read input file in gzip format from a .gz file [ Console only ]
Related controls
Integer
Number of extra columns to be allowed for.
Number of extra matrix elements to be allowed for.
Number of extra global entities to be allowed for.
Number of extra elements to allow for in presolve.
Number of extra rows to be allowed for.
Status for nonbinding rows.
Whether MPS comments are to be echoed.
Specifies format of MPS files.
Type of scaling.

Double
Tolerance on matrix elements.
Minimum gap between reference row entries.

String
The active bound name.
Name of objective function row.
Name of range.
Name of right hand side.

Example 1 (Library)
XPRSreadprob(prob,"myprob","");
This instructs the Optimizer to read an MPS format matrix from the first file found out of myprob.mat, myprob.mps or (in LP format) myprob.lp.
Example 2 (Console)
READPROB -l
This instructs the Optimizer to read an LP format matrix from the file problem_name .lp.
Further information
1. If no flags are given, file types are searched for in the order: .mat, .mps, .lp. Matrix files are assumed to be in XMPS or MPS format unless their file extension is .lp in which case they must be LP files.
2. If probname has been specified, the problem name is changed to probname, ignoring any extension.
3. XPRSreadprob ( READPROB) will take as the objective function the first N type row in the matrix, unless the string parameter MPSOBJNAME has been set, in which case the objective row sought will be the one named by MPSOBJNAME. Similarly, if non-blank, the string parameters MPSRHSNAME, MPSBOUNDNAME and MPSRANGENAME specify the right hand side, bound and range sets to be taken. For example:
MPSOBJNAME="Cost"
MPSRHSNAME="RHS 1"
READPROB

The treatment of N type rows other than the objective function depends on the KEEPNROWS control. If KEEPNROWS is 1 the rows and their elements are kept in memory; if it is 0 the rows are retained, but their elements are removed; and if it is -1 the rows are deleted entirely. The performance impact of retaining such N type rows will be small unless the presolve has been disabled by setting PRESOLVE to 0 prior to optimization.
4. The Optimizer checks that the matrix file is in a legal format and displays error messages if it detects errors. When the Optimizer has read and verified the problem, it will display summary problem statistics.
5. By default, the MPSFORMAT control is set to -1 and XPRSreadprob ( READPROB) determines automatically whether the MPS files are in free or fixed format. If MPSFORMAT is set to 0, fixed format is assumed and if it is set to 1, free format is assumed. Fields in free format MPS files are delimited by one or more blank characters. The keywords NAME, ROWS, COLUMNS, QUADOBJ / QMATRIX, QCMATRIX, DELAYEDROWS, MODELCUTS, SETS, RHS, RANGES, BOUNDS and ENDATAmust start in column one and no vector name may contain blanks. If a special ordered set is specified with a reference row, its name may not be the same as that of a column. Note that numeric values which contain embedded spaces (for example after unary minus sign) will not be read correctly unless MPSFORMAT is set to 0.
6. If the problem is not to be scaled automatically, set the parameter SCALING to 0 before issuing the XPRSreadprob ( READPROB) command.
Related topics

© 2001-2020 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.