Skip to main content
PREV CLASS NEXT CLASS FRAMES NO FRAMES

 

Class IloOplRelaxationIterator

IloObject
   |
   +--IloOplRelaxationIterator

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

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

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

Example:
An example of relaxing a conflict is provided with your installation. See
<Install_dir>\opl\examples\opl\relaxationIterator\relaxationIterator.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 relaxed IloConstraint of the current relaxation.
flow control (read only)
LB
Provides access to the LB property of the current relaxation.
flow control (read only)
Provides access to the relaxed LB property of the current relaxation.
flow control (read only)
Provides access to the relaxed UB property of the current relaxation.
flow control (read only)
UB
Provides access to the UB property of the current relaxation.
Method Summary
Method Attributes Method Name and Description
flow control
attach(cts, prefs)
Attaches a constraint array to a preference array.
flow control
Prints the relaxations proposed to obtain a feasible model.
flow control
Clears any cached relaxation and forces recomputation of the relaxation.
Methods inherited from class IloObject
end
Property Detail
ct
{IloConstraint} ct
Provides access to the relaxed IloConstraint of the current relaxation.
Available for:
flow control (read only)

LB
{float} LB
Provides access to the LB property of the current relaxation.
Available for:
flow control (read only)

relaxedLB
{float} relaxedLB
Provides access to the relaxed LB property of the current relaxation.
Available for:
flow control (read only)

relaxedUB
{float} relaxedUB
Provides access to the relaxed UB property of the current relaxation.
Available for:
flow control (read only)

UB
{float} UB
Provides access to the UB property of the current relaxation.
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 relaxations.
Parameters:
{constraints|array of constraints} cts
{preference|array of preferences} prefs
Available for:
flow control

printRelaxation
{string} printRelaxation()
Prints the relaxations proposed to obtain a feasible model.
Returns:
A string containing the relaxations proposed to obtain a feasible model and changes the state of the invoking object to relaxation mode.
Available for:
flow control

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

©Copyright IBM Corp. 1987-2011.