Miscellaneous examples
Provides miscellaneous examples that show a specific feature of OPL, but do not necessarily represent realistic optimization problems.
The convert example
The convert example illustrates the use of the convertAllIntVars and unconvertAllIntVars methods in the Concert API. These methods allow you to convert integer variables to floating-point values and unconvert them again. This is useful in the context of relaxation.
To access this example, go to: examples/opl/convert_example.
The warmstart example
The warmstart
example
illustrates the use of the IBM ILOG Script extension class IloOplCplexVectors to set up an initial solution
for CPLEX on a specific part of the model.
To access this example, go to: examples/opl/warmstart.
See also Setting an initial solution for the CPLEX engine in the Language User’s Manual.
The conflictIterator example
The conflictIterator example illustrates the use of the class IloOplConflictIterator to refine a conflict with user-defined preferences.
To access this example, go to: examples/opl/conflictIterator.
See also Setting preferences on the search for conflicts and relaxations in the Language User’s Manual.
The relaxationIterator example
The relaxationtIterator example illustrates the use of the class IloOplRelaxationIterator to relax a conflict with user-defined preferences.
To access this example, go to: examples/opl/relaxationIterator.
See also Setting preferences on the search for conflicts and relaxations in the Language User’s Manual.
Lagrangian relaxation for a location-transportation problem
The LagrangianRelaxation example shows a Lagrangian relaxation for a location-transportation problem. The original MIP is decomposed into two problems in order to deduce a multiplier for a particular constraint based on Lagrange relaxation.
The main aim is to show multiple optimization through modifications of different models existing in a single environment.
To access this example, go to: examples/opl/LagrangianRelaxation.