Initializing help system before first use

XPRSgetpresolvemap

Purpose
Returns the mapping of the row and column numbers from the presolve problem back to the original problem.
Topic areas
Synopsis
int XPRS_CC XPRSgetpresolvemap(XPRSprob prob, int rowmap[], int colmap[]);
Arguments
prob 
The current problem.
rowmap 
Integer array of length ROWS where the row maps will be returned.
colmap 
Integer array of length COLS where the column maps will be returned.
Example
The following reads in a (Mixed) Integer Programming problem and gets the mapping for the rows and columns back to the original problem following optimization of the linear relaxation. The elimination operations of the presolve are turned off so that a one-to-one mapping between the presolve problem and the original problem.
XPRSreadprob(prob,"MyProb","");
XPRSsetintcontrol(prob,XPRS_PRESOLVEOPS,255);
XPRSmipoptimize(prob,"l");
XPRSgetintattrib(prob,XPRS_COLS,&cols);
colmap = malloc(cols*sizeof(int));
XPRSgetintattrib(prob,XPRS_ROWS,&rows);
rowmap = malloc(rows*sizeof(int));
XPRSgetpresolvemap(prob,rowmap,colmap);
Further information
1. This function applies to linear and convex quadratic (including second order conic) problems only.
2. The presolved problem can contain rows or columns that do not map to anything in the original problem. An example of this are cuts created during the MIP solve and temporarily added to the presolved problem. It is also possible that the presolver will introduce new rows or columns. For any row or column that does not have a mapping to a row or column in the original problem, the corresponding entry in the returned rowmap and colmap arrays will be -1.
Related topics

© 2001-2025 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.