strong

For constraint programming: gives a strengthening indication on a set of variables.

context type
Model files (.mod) - Not allowed in a CPLEX constraint block. Boolean (1 if the constraint is true, 0 otherwise)

Syntax

strong(dvar int[ ])
strong(dvar int, dvar int, ...)

Description

An instance of a strong constraint strengthens the model on the variables of the array given as an argument to the function. This is done by creating an allowed assignment constraint in place of the strong constraint. The replacing constraint contains the solution tuples of the model on the variables of the array given as argument. It achieves the strongest domain reduction algorithm for these variables. Constraints that can be identified as redundant when taken together with this new constraint are removed. This is the case for constraints that are only over the variables of the array given as argument.

Note: This constraint cannot be used in a meta-constraint.

The OPL keyword all

As in most cases in OPL when the code contains an array, you can also use the OPL keyword all with strong. For example: strong(all(i in 3..12) x[i]);

Example

You can find an example of a model that uses the strong function in the product distribution.

<Install_dir>/opl/examples/opl/sports_strong/sports_strong.mod