Diversity filters
CPLEX supports diversity filters for the solution pool.
A diversity filter allows you to control which solutions are generated and stored in the solution pool, according to their divergence from a reference solution. Only binary variables can be used to define a diversity filter.
The format of a diversity filter file lets you specify the names of the binary variables of interest, the weights to be assigned to those variables, and the reference values of those variables with which to compare all solutions. It also allows you to specify a lower bound and an upper bound on the divergence from the reference value(s).
The filter enforces the following constraint for a variable x:
lower bound <= diff(x) <= upper bound
This information is used to compute the diversity measure. The diversity measure is computed by summing the weighted absolute differences from the reference values, like this:
diff(x) = sum {weights[i] * |x[varind[i]]
- refval[i]|};
The keyword DIVFILTER designates
the beginning of a diversity filter in the file.
The name of the filter follows the keyword DIVFILTER on
the same line. For example, in the sample in Syntax of a filter file,
the name of the filter is f1 and follows
the keyword DIVFILTER.
The lower and upper bounds on the diversity function
follow the name of the filter on the same line as the keyword DIVFILTER.
In this example, the lower bound on diversity is 2, and the upper
bound is infinity (that is, there is no limit).
Each successive line shows the name of a variable followed by the weight and the reference value for that variable.
In the example, equal weight (1.0) is given to the diversity of the four specified variables. The reference values are:
1 (one) for
x1andx20 (zero) for
x3andx4