Overview | Group | Tree | Graph | Index | Concepts |
Solver provides the ability to explain why a particular solution
has been proposed. The class IloExplainer
defines the
abstract protocol of this explanation facility. This protocol consists of
three queries:
ct
satisfied? ct
violated? Subclasses of the class IloExplainer
may use different
deduction mechanisms for finding explanations. The subclass
IloSolverExplainer
uses the constraint propagation
mechanism of Solver as a deduction mechanism.
Attribute Summary | |
---|---|
protected IloExplainerI * | _impl |
Method Summary | |
---|---|
public void | end() |
public IloExplainerI * | getImpl() const |
public IloModel | why(IloConstraint ct) |
public IloModel | whyFail() |
public IloModel | whyNot(IloConstraint ct) |
Attribute Detail |
---|
This constructor creates a handle of an explanation object with
the implementation object impl
.
Method Detail |
---|
This member function terminates the explainer and frees internally allocated memory.
This member function returns the implementation object of the invoking explanation object.
If the constraint ct
is satisfied in the solution of the
invoking explainer, this member function returns an argument for
ct
. The argument is a minimal subset of the set of constraints
of this solution that is sufficient to deduce the constraint ct
.
The argument is represented by an instance of the class IloModel
.
If the constraint ct
is not satisfied in the solution of the
invoking explainer, an exception
IloExplainer::NoExplanationException
is raised.
If ct
is an IloExistsComponent
constraint, the
argument shows why the associated component was included in the configuration.
If the solution of the invoking explainer is inconsistent
(that is, it leads to a failure when extracted by a solver),
this member function returns a conflict. The conflict is a minimal
subset of the set of constraints of this solution that is sufficient
to produce a failure. The conflict is represented by an instance of
the class IloModel
. If the solution of the invoking
explainer is consistent, an exception
IloExplainer::NoExplanationException
is raised.
If the constraint ct
is violated in the solution of the
invoking explainer, this member function returns a counterargument for
ct
. The counterargument is a minimal subset of the set of
constraints of this solution that is sufficient to refute the constraint
ct
. The counterargument is represented by an instance of the
class IloModel
. If the constraint ct
is not
violated in the solution of the invoking explainer, an exception
IloExplainer::NoExplanationException
is raised.