ExactMaxMin() finds the optimal solution to the Max-Min Diversity Problem
(discrete p-dispersion) by iterated node-packing
(Sayyady and Fathi 2016)
.
As this problem is NP-hard, it is feasible only for small sets.
Arguments
- k
Integer: target subset size, between 2 and
nrow(d).- d
distobject or a square symmetric numeric distance matrix.- maxSeconds
Numeric: search terminates after this many seconds have elapsed, returning largest threshold proven feasible.
- warmStart
Integer vector giving indices of a candidate subset to add to the heuristic warm-start pool, e.g. a selection computed by another solver.
Value
ExactMaxMin() returns an integer vector of length k (sorted
ascending) with class "MaxMinSelection", carrying attributes:
- score
Achieved
T_k– the minimum pairwise distance within the selection. WhenprovenisTRUEthis is the true optimum; otherwise a lower bound.- proven
Logical:
TRUEif the search certified optimality within the budget,FALSEif it returned an unproven incumbent.- time_s
Wall-clock seconds elapsed.
- N, k
Instance size and target subset size.
Prints as a terse summary via print.MaxMinSelection().
Details
The search is warm-started from a heuristic lower bound (the best of several
Grasp() restarts and a DropAdd() pass), then gallops upward from that
bound to the first infeasible threshold and bisects the resulting bracket.
When a heuristic already attains the optimum, a single infeasibility solve
certifies it. The indices chosen may vary based on the value of the random
seed when several subsets attain the optimum.
Progress bar
In interactive sessions, a progress indicator is shown.
To toggle, set options("MaxMin.progress" = FALSE) (or TRUE).
References
Sayyady F, Fathi Y (2016). “An integer programming approach for solving the p-dispersion problem.” European Journal of Operational Research, 253(1), 216–225. doi:10.1016/j.ejor.2016.02.026 .