Initializing help system before first use

XPRSgetinfeas

Purpose
Returns a list of infeasible primal and dual variables.
Topic areas
Synopsis
int XPRS_CC XPRSgetinfeas(XPRSprob prob, int *p_nprimalcols, int *p_nprimalrows, int *p_ndualrows, int *p_ndualcols, int x[], int slack[], int duals[], int djs[]);
Arguments
prob 
The current problem.
p_nprimalcols 
Pointer to an integer where the number of primal infeasible variables is returned.
p_nprimalrows 
Pointer to an integer where the number of primal infeasible rows is returned.
p_ndualrows 
Pointer to an integer where the number of dual infeasible rows is returned.
p_ndualcols 
Pointer to an integer where the number of dual infeasible variables is returned.
Integer array of length p_nprimalcols where the primal infeasible variables will be returned. May be NULL if not required.
slack 
Integer array of length p_nprimalrows where the primal infeasible rows will be returned. May be NULL if not required.
duals 
Integer array of length p_ndualrows where the dual infeasible rows will be returned. May be NULL if not required.
djs 
Integer array of length p_ndualcols where the dual infeasible variables will be returned. May be NULL if not required.
Error values
91 
A current problem is not available.
422 
A solution is not available.
Related controls
Double
Tolerance on RHS.
Reduced cost tolerance.

Example
In this example, XPRSgetinfeas is first called with nulled integer arrays to get the number of infeasible entries. Then space is allocated for the arrays and the function is again called to fill them in:
int nprimalcols, nprimalrows, ndualrows, ndualcols, *x, *slack, *duals, *djs;
...
XPRSgetinfeas(prob, &nprimalcols, &nprimalrows, &ndualrows, &ndualcols,
              NULL, NULL, NULL, NULL);
x = malloc(nprimalcols * sizeof(*x));
slack = malloc(nprimalrows * sizeof(*slack));
duals = malloc(ndualrows * sizeof(*duals));
djs = malloc(ndualcols * sizeof(*djs));
XPRSgetinfeas(prob, &nprimalcols, &nprimalrows, &ndualrows, &ndualcols,
              x, slack, duals, djs);
Further information
1. This function applies to linear and convex quadratic (including second order conic) problems only.
2. To find the infeasibilities in a previously saved solution, the solution must first be loaded into memory with the XPRSreadbinsol ( READBINSOL) function.
3. If any of the last four arguments are set to NULL, the corresponding number of infeasibilities is still returned.
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.