NO FRAMES

CPXgetconflict

public int CPXgetconflict(CPXCENVptr env, CPXCLPptr lp, int * confstat_p, int * rowind, int * rowbdstat, int * confnumrows_p, int * colind, int * colbdstat, int * confnumcols_p)
Definition file: cplex.h

This routine returns the linear constraints and variables belonging to a conflict previously computed by the routine CPXrefineconflict. The conflict is a subset of constraints and variables from the original, infeasible model that is still infeasible. It is generally minimal, in the sense that removal of any of the constraints or variable bounds in the conflict will make the conflict set become feasible. However, the computed conflict will not be minimal if the previous call to CPXrefineconflict was not allowed to run to completion.

Conflict Status

The status of the currently available conflict is returned in confstat_p. If CPXrefineconflict was called previously, the status will be one of the following values:

When the status of a conflict is CPX_STAT_CONFLICT_FEASIBLE, the routine CPXrefineconflict determined that the model was feasible, and thus no conflict is available. Otherwise, a conflict is returned. The returned conflict is minimal if the status is CPX_STAT_CONFLICT_MINIMAL.

The conflict status can also be queried with the routine CPXgetstat.

Row and Column Status

In the array rowbdstat, integer values are returned specifying the status of the corresponding row in the conflict. For row rowind[i], rowbdstat[i] can assume the value CPX_CONFLICT_MEMBER for constraints that participate in a minimal conflict. When the computed conflict is not minimal, rowbdstat[i] can assume the value CPX_CONFLICT_POSSIBLE_MEMBER, to indicate that row i has not been proven to be part of the conflict. If a row has been proven not to belong to the conflict, its index will not be listed in rowind.

Similarly, the array colbdstat contains integers indicating the status of the variable bounds in the conflict. The value specified in colbdstat[i] is the conflict status for variable colind[i]. If colind[i] has been proven to be part of the conflict, colbdstat[i] will take one of the following values:

When variable colind[i] has neither been proven to belong nor been proven not to belong to the conflict, the status colbdstat[i] will be one of the following values:

In both cases, the _LB status indicates that only the lower bound is part of the conflict. Similarly, the _UB status indicates that the upper bound is part of the conflict. Finally, if both bounds are required in the conflict, a _MEMBER status is assigned to that variable.

The status values marked POSSIBLE specify that the corresponding constraints and variables in the conflict are possibly not required to produce a minimal conflict, but the conflict refinement algorithm was not able to remove them before it terminated (for example, because it reached a time limit set by the user).

See Also:

Parameters:

env

A pointer to the CPLEX environment as returned by the routine CPXopenCPLEX.

lp

A pointer to a CPLEX problem object as returned by CPXcreateprob.

confstat_p

A pointer to an integer used to return the status of the conflict.

rowind

An array to receive the list of the indices of the constraints that participate in the conflict. The length of the array must not be less than the number of rows in the conflict. If that number is not known, use the total number of rows in the problem object instead.

rowbdstat

An array to receive the conflict status of the rows. Entry rowbdstat[i] gives the status of row rowind[i]. The length of the array must not be less than the number of rows in the conflict. If that number is not known, use the number of rows in the problem object instead.

confnumrows_p

A pointer to an integer where the number of rows in the conflict is returned.

colind

An array to receive the list of the indices of the variables that participate in the conflict. The length of the array must not be less than the number of columns in the conflict. If that number is not known, use the number of columns in the problem object instead.

colbdstat

An array to receive the conflict status of the columns. Entry colbdstat[i] gives the status of column colind[i]. The length of the array must not be less than the number of columns in the conflict. If that number is not known, use the number of columns in the problem object instead.

confnumcols_p

A pointer to an integer where the number of columns in the conflict is returned.

Returns:

The routine returns zero if successful and nonzero if an error occurs.