Search examples
Describes examples that illustrate the default solution search in OPL and ways of changing the search behavior.
When nothing specific is indicated to the CP engine, it will use a powerful default search to find solutions. This default search is a mix of different CP techniques that are tuned to find good solutions on a wide range of models. However, sometimes it is useful to modify the way search is executed. This is usually because some knowledge of the model can aid in the search for solutions. There are several different ways to change the search behavior. They are illustrated in the following examples.
The vellino problem
Not only can a CP model be used in a standalone manner, it can also be used as a component in a more complex multi-model problem. In these cases, what is needed from the CP engine is not to find an optimal or even a good solution but to provide a set of various possible solutions. Then it is possible to use a different syntax to access a series of different solutions to a problem.
This example is a kind of column generation example where CP is used to generate different possible configurations of bins that respect a set of internal constraints. Then a CPLEX-based model is used to select, from among the different possible bin configurations, which one to choose to fulfill a certain demand.
The examples are:
The basic model: examples/opl/vellino. This is accessed using the default run configuration Vellino.
Another version of the same model: examples/opl/vellino/vellinochooseBin.mod. This is accessed using the run configuration Bin generation.
Another version: examples/opl/vellino/vellinogenBin.mod. This is accessed using the run configuration Bin selection.
See also The vellino example (column generation) in the Language User’s Manual.