Overview | Group | Index | Concepts |
The routine CPXaddsolnpooldivfilter
adds
a new diversity filter to the solution pool.
A diversity filter drives the search for multiple solutions toward new solutions that satisfy a measure of diversity specified in the filter.
This diversity measure applies only to binary variables.
Potential new solutions are compared to a reference set.
You must specify which variables are to be compared.
You do so with the argument ind
designating
the indices of variables to include in the diversity measure.
A reference set
is the set of values specified by the argument refval
.
You may optionally specify weights (that is, coefficients to form a linear expression in terms of the variables) in the diversity measure; if you do not specify weights, all differences between the reference set and potential new solutions will be weighted by the value 1.0 (one). The diversity measure is computed by summing the pair-wise weighted absolute differences from the reference values, like this:
differences(x) = sum {weight[i] times |x[ind[i]] - refval[i]|}.
If you specify an upper bound on diversity with the argument
upper_cutoff
,
CPLEX will look for solutions similar to the reference values.
In other words, you can say, Give me solutions that are
close to this one, within this set of variables.
If you specify a lower bound on the diversity with the argument
lower_cutoff
,
CPLEX will look for solutions that are different from the reference values.
In other words, you can say, Give me solutions that differ by at least
this amount in this set of variables.
You may specify both a lower and upper bound on diversity.
env | A pointer to the CPLEX environment as returned by |
lp | A pointer to a CPLEX problem object as returned by |
lower_cutoff | Lower bound on the diversity measure for new solutions allowed in the pool. |
upper_cutoff | Upper bound on the diversity measure for new solutions allowed in the pool. |
nzcnt | Number of variables used to define diversity measure. |
ind | An array of variable indices of variables in the diversity measure. |
weight | An array of weights to be used in the diversity measure. The indices and corresponding weights must be stored in sequential locations in the arrays |
refval | An array of reference values for the the variable with indices in |
lname_str | The name of the filter. May be NULL. |