XPRSgetinfeas
XPRSgetinfeas |
Purpose
Synopsis
int XPRS_CC XPRSgetinfeas(XPRSprob prob, int *npv, int *nps, int *nds, int *ndv, int mx[], int mslack[], int mdual[], int mdj[]);
Arguments
prob
|
The current problem.
|
npv
|
Pointer to an integer where the number of primal infeasible variables is returned.
|
nps
|
Pointer to an integer where the number of primal infeasible rows is returned.
|
nds
|
Pointer to an integer where the number of dual infeasible rows is returned.
|
ndv
|
Pointer to an integer where the number of dual infeasible variables is returned.
|
mx
|
Integer array of length
npv where the primal infeasible variables will be returned. May be
NULL if not required.
|
mslack
|
Integer array of length
nps where the primal infeasible rows will be returned. May be
NULL if not required.
|
mdual
|
Integer array of length
nds where the dual infeasible rows will be returned. May be
NULL if not required.
|
mdj
|
Integer array of length
ndv where the dual infeasible variables will be returned. May be
NULL if not required.
|
Error values
A current problem is not available.
|
|
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 npv, nps, nds, ndv, *mx, *mslack, *mdual, *mdj; ... XPRSgetinfeas(prob, &npv, &nps, &nds, &ndv, NULL, NULL, NULL, NULL); mx = malloc(npv * sizeof(*mx)); mslack = malloc(nps * sizeof(*mslack)); mdual = malloc(nds * sizeof(*mdual)); mdj = malloc(ndv * sizeof(*mdj)); XPRSgetinfeas(prob, &npv, &nps, &nds, &ndv, mx, mslack, mdual, mdj);
Further information
1. To find the infeasibilities in a previously saved solution, the solution must first be loaded into memory with the
XPRSreadbinsol (
READBINSOL) function.
2. If any of the last four arguments are set to
NULL, the corresponding number of infeasibilities is still returned.
Related topics
XPRSgetscaledinfeas,
XPRSgetiisdata,
XPRSiisall,
XPRSiisclear,
XPRSiisfirst,
XPRSiisisolations,
XPRSiisnext,
XPRSiisstatus,
XPRSiiswrite,
IIS.