problem.presolverow
- -3: Failed to presolve the row due to presolve dual reductions;
- -2: Failed to presolve the row due to presolve duplicate column reductions;
- -1: Failed to presolve the row due to an error. Check the Optimizer error code for the cause;
- 0: The row was successfully presolved;
- 1: The row was presolved, but may be relaxed.
drhsp, status = problem.presolverow(rowtype, origcolind, origrowcoef, origrhs, maxcoefs, colind, rowcoef)
rowtype
|
The type of the row:
|
||||
origcolind
|
Array containing the columns (i.e.
xpress.var objects, indices, or names) of the row to presolve.
|
||||
origrowcoef
|
Array containing the nonzero coefficients of the row to presolve.
|
||||
origrhs
|
The right-hand side constant of the row to presolve.
|
||||
maxcoefs
|
Maximum number of elements to return in the
colind and
rowcoef arrays.
|
||||
colind
|
Array which will be filled with the columns of the presolved row.
|
||||
rowcoef
|
Array which will be filled with the coefficients of the presolved row.
|
presind = [] prescoe = [] prhs, status = p.presolverow('L', [1,2], [2,1], 1.0, p.attributes.cols, presind, prescoe)
There are certain presolve operations that can prevent a row from being presolved exactly. If the row contains a coefficient for a column that was eliminated due to duplicate column reductions or singleton column reductions, the row might have to be relaxed to remain valid for the presolved problem. The relaxation will be done automatically by the problem.presolverow function, but a return status of +1 will be returned. If it is not possible to relax the row, a status of -2 will be returned instead. Likewise, it is possible that certain dual reductions prevents the row from being presolved. In such a case a status of -3 will be returned instead.
If problem.presolverow is used for presolving e.g. branching bounds or constraints, then dual reductions and duplicate column reductions should be disabled, by clearing the corresponding bits of PRESOLVEOPS. By clearing these bits, the default value for PRESOLVEOPS changes to 471.
If the user knows in advance which columns will have nonzero coefficients in rows that will be presolved, it is possible to protect these individual columns through the problem.loadsecurevecs function. This way the Optimizer is left free to apply all possible reductions to the remaining columns.
© 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.