| Overview | Group | Tree | Graph | Deprecated | Index | Concepts |
Given an infeasible model, the conflict refiner can identify conflicting constraints and variable domains within the model to help you identify the causes of the infeasibility. In this context, a conflict is a subset of the constraints and/or variable domains of the model which are mutually contradictory. The conflict refiner first examines the full infeasible model to identify portions of the conflict that it can remove. By this process of refinement, the conflict refiner arrives at a minimal conflict. A minimal conflict is usually smaller than the full infeasible model and thus makes infeasibility analysis easier. Since the conflict is minimal, removal of any one of these constraints will remove that particular cause for infeasibility. There may be other conflicts in the model; consequently, repair of a given conflict does not guarantee feasibility of the remaining model. If a model happens to include multiple independent causes of infeasibility, then it may be necessary for the user to repair one such cause and then repeat the diagnosis with further conflict analysis.
Consider for instance the following model:
x, y, z in { 1, 2, 3 }
constraint C1: AllDiff(x,y,z)
constraint C2: z == x + 2y
constraint C3: y < x
constraint C4: z == 2x
This model is clearly infeasible. Given the domain of variable, subset {C1,C2} is a
minimal conflict:
C2 implies y=1 and x=1
which violates C1{C1} and {C2} are feasible with possible
respective solutions (x=1,y-2,z=3) and (x=1,y=1,z=3).Note that in this example, {C1,C2} is not the only minimal conflict. For instance
{C2,C4} is also a minimal one.
To invoke the conflict refiner, call one of the IloCP::refineconflict methods.
For instance:
IloModel model = ...;
IloCP cp(model);
if (cp.refineConflict()) {
// Model is infeasible
cp.writeConflict(cp.out());
}
A user may organize constraints into one or more groups for a conflict. When
a user specifies a group, the conflict refiner will make sure that either the group
as a whole will be present in a conflict (that is, all its members will participate
in the conflict, and removal of one will result in a feasible subproblem) or
that the group will not participate in the conflict at all. See the member function
refineConflict(IloConstraintArray csts).
A user may also assign a numeric preference to constraints or groups of
constraints. In the case of an infeasible model having more than one possible conflict,
preferences guide the conflict refiner towards identifying constraints in a conflict
as the user prefers. See the member function
refineConflict(IloConstraintArray csts, IloNumArray prefs).
By default, the conflict refiner works only on the constraints of the model.
If parameter IloCP::ConflictRefinerOnVariables is set to IloCP::On, the
conflict refiner will consider variable domains as additional (unary) constraints to be
refined. in this case, it will first identify a minimal conflicting set of
constraints. Then it will refine this conflict further by identifying a minimal subset
of variables whose initial domain is responsible for the infeasibility from amongst
the decision variables involved in the constraints of the conflict.
For instance, on the above example for the minimal conflict {C2,C4},
the conflict refiner would
additionally identify initial domain of variable z to be sufficient to explain the
infeasibility when used in conjunction with {C2,C4}.
some parameters are available to limit the effort of the conflict refiner:
IloCP::ConflictRefinerIterationLimit,IloCP::ConflictRefinerBranchLimit,IloCP::ConflictRefinerFailLimit, and IloCP::ConflictRefinerOnVariables.Once computed, the conflict can be queried with the methods getConflict
and displayed with method writeConflict.