CPXXrefineconflictext and CPXrefineconflictext
The routine CPXXrefineconflictext/CPXrefineconflictext extends
CPXXrefineconflict/CPXrefineconflict
to problems with indicator constraints,
quadratic constraints (except for explicit second order cone constraints),
special ordered sets (SOSs), or piecewise linear constraints and to
situations where groups of constraints should be considered
as a single constraint.
int CPXXrefineconflictext( CPXCENVptr env, CPXLPptr lp, CPXNNZ grpcnt, CPXNNZ concnt, double const * grppref, CPXNNZ const * grpbeg, CPXDIM const * grpind, char const * grptype )
int CPXrefineconflictext( CPXCENVptr env, CPXLPptr lp, int grpcnt, int concnt, double const * grppref, int const * grpbeg, int const * grpind, char const * grptype )
Description
The routine CPXXrefineconflictext/CPXrefineconflictext extends
CPXXrefineconflict/CPXrefineconflict
to problems with indicator constraints,
quadratic constraints (except for explicit second order cone constraints),
special ordered sets (SOSs), or piecewise linear constraints and to
situations where groups of constraints should be considered
as a single constraint.
The routine CPXXrefineconflictext/CPXrefineconflictext identifies a minimal
conflict for the infeasibility of the current
problem or a subset of constraints of the current problem.
Since the conflict is minimal, removal of any group of
constraints that is a member of the conflict will remove that
particular source of infeasibility.
However, there may be other conflicts in the problem; consequently,
that repair of one conflict does not guarantee feasibility of the
solution of the remaining problem.
Constraints are considered in groups in this routine. If any constraint in a group participates in the conflict, the entire group is determined to do so. No further detail about the constraints within that group is returned. A group may consist of a single constraint.
A group may be assigned a preference; that is, a value specifying how much the user wants the group to be part of a conflict. A group with a higher preference is more likely to be included in the conflict. However, no guarantee is made when a minimal conflict is returned that other conflicts containing groups with a greater preference do not exist.
To retrieve information about the conflict computed by
CPXXrefineconflictext/CPXrefineconflictext, call the routine
CPXXgetconflictext/CPXgetconflictext.
To write the conflict to a file,
use the routine CPXXclpwrite/CPXclpwrite.
If grpcnt == 0, concnt == 0,
grppref == NULL, grpbeg == NULL,
grpind == NULL, and grptype == NULL then constraint groups will be automatically created.
To retrieve information about the constraint groups that were
automatically created as a result of this routine, call the routines
CPXXgetconflictnumgroups/CPXgetconflictnumgroups
and
CPXXgetconflictgroups/CPXgetconflictgroups.
CPX_CON_LOWER_BOUND |
1 |
variable lower bound |
CPX_CON_UPPER_BOUND |
2 |
variable upper bound |
CPX_CON_LINEAR |
3 |
linear constraint |
CPX_CON_QUADRATIC |
4 |
quadratic constraint |
CPX_CON_SOS |
5 |
special ordered set |
CPX_CON_INDICATOR |
6 |
indicator constraint |
CPX_CON_PWL |
7 |
piecewise linear constraint |
-
upper cutoff
CPXPARAM_MIP_Tolerances_UpperCutoff -
lower cutoff
CPXPARAM_MIP_Tolerances_LowerCutoff -
upper objective value limit
CPXPARAM_Simplex_Limits_UpperObj -
lower objective value limit
CPXPARAM_Simplex_Limits_LowerObj
Arguments
- env
-
A pointer to the CPLEX environment as returned by the routine
CPXXopenCPLEX/CPXopenCPLEX. - lp
-
A pointer to a CPLEX problem object as returned by
CPXXcreateprob/CPXcreateprob. - grpcnt
- The number of constraint groups to be considered.
- concnt
-
An integer specifying the total number of elements passed in the arrays
grpindandgrptype, or, equivalently, the end of the last group ingrpind. - grppref
-
An array of preferences for the groups. The value
grppref[i]specifies the preference for the group designated by the indexi. A negative value specifies that the corresponding group should not be considered in the computation of a conflict. In other words, such groups are not considered part of the problem. Groups with a preference of 0 (zero) are always considered to be part of the conflict. No further checking is performed on such groups. - grpbeg
-
An array of integers specifying where the constraint indices for each group begin in the array
grpind. Its length must be at leastgrpcnt. - grpind
-
An array of integers containing the indices for the constraints in each group. For each of the various types of constraints listed in the table, the constraint indices range from 0 (zero) to the number of constraints of that type minus one. Group
icontains the constraints with the indicesgrpind[grpbeg[i]], ..., grpind[grpbeg[i+1]-1]foriless thangrpcnt-1, andgrpind[grpbeg[i]], ..., grpind[concnt-1]fori == grpcnt-1. Its length must be at leastconcnt. A constraint must not be referenced more than once in this array. For any constraint in the problem that is not a member of a group and thus does not appear in this array, the constraint is assigned a default preference of 0 (zero). Thus such constraints are included in the conflict without any analysis. - grptype
-
An array of characters containing the constraint types for the constraints as they appear in groups. The types of the constraints in group
iare specified ingrptype[grpbeg[i]], ..., grptype[grpbeg[i+1]-1]foriless thangrpcnt-1andgrptype[grpbeg[i]], ..., grptype[concnt-1]fori == grpcnt-1. Its length must be at leastconcnt, and every constraint must appear at most once in this array. Possible values appear in Table 1.
Return
The routine returns 0 (zero) if successful and nonzero if an error occurs.Example
status = CPXrefineconflictext (env, lp, ngrp, ngrp, pri, beg, ind, type);