Skip to main content
PREV CLASS NEXT CLASS FRAMES NO FRAMES

 

Class IloOplConflictIterator

IloObject
   |
   +--IloOplConflictIterator

Description:
This is an OPL service class provided to support the CPLEX conflict refinement functionality.

There are two important things to be noted about conflict iterators: The first thing is that conflicts are computed in a lazy way. This means that a conflict is only computed once you try to print it or iterate over it.

The second thing is that conflicts are cached. If you modify the model for which a conflict was computed then the cached conflict is not deleted. In order to delete a cached conflict you should call recalculate.

Example:
An example of refining a conflict is provided with your installation. See:
<Install_dir>\opl\examples\opl\conflictIterator\conflictIterator.mod
Iterating properties:
Default behavior.
Index resolution:
Default behavior.
Available for:
flow control and preprocessing

Property Summary
Field Attributes Field Name and Description
flow control (read only)
ct
Provides access to the conflicting IloConstraint if it is a constraint.
flow control (read only)
Provides access to the conflict status property of the current conflict, either ConflictPossibleMember or ConflictMember.
Method Summary
Method Attributes Method Name and Description
flow control
attach(cts, prefs)
Attaches a constraint array to a preference array.
flow control
Clears previously attached constraints.
flow control
Excludes the current conflict and finds the next one.
flow control
Prints the conflicting constraints found in an infeasible model to a string.
flow control
Clears any cached conflict and forces recomputation of the conflict.
Methods inherited from class IloObject
end
Property Detail
ct
{IloConstraint} ct
Provides access to the conflicting IloConstraint if it is a constraint.
Available for:
flow control (read only)

status
{string} status
Provides access to the conflict status property of the current conflict, either ConflictPossibleMember or ConflictMember.
Available for:
flow control (read only)
Method Detail
attach
attach(cts, prefs)
Attaches a constraint array to a preference array. Once attachments exist, only the elements with attachments are taken into account for conflict refinement.
Parameters:
cts - The array of constraints.
prefs - The array of preferences.
Available for:
flow control

clearAttachments
clearAttachments()
Clears previously attached constraints.
Available for:
flow control

excludeConflict
excludeConflict()
Excludes the current conflict and finds the next one.

Allows iteration over more conflicts. The currently conflicting constraints will be excluded from the next conflict refinement.

Available for:
flow control

printConflict
{string} printConflict()
Prints the conflicting constraints found in an infeasible model to a string.
Returns:
The string containing the conflicting constraints in an infeasible model.
Available for:
flow control

recalculate
recalculate()
Clears any cached conflict and forces recomputation of the conflict.
Available for:
flow control

©Copyright IBM Corp. 1987-2011.