4.2.7.1. Annotations provided to guide the MiniZinc diversity extension.
In this section: diverse_pairwise, diversity_aggregator, diversity_combinator, diversity_incremental.
Functions and Predicates
diverse_pairwise
1. annotation diverse_pairwise(array [int] of var int: x,
string: distance_metric)
2. annotation diverse_pairwise(array [$T] of var int: x,
string: distance_metric)
3. annotation diverse_pairwise(array [int] of var int: x,
string: distance_metric,
int: min_dist,
int: max_dist,
int: weight)
4. annotation diverse_pairwise(array [$T] of var int: x,
string: distance_metric,
int: min_dist,
int: max_dist,
int: weight)
5. annotation diverse_pairwise(array [int] of var float: x,
string: distance_metric)
6. annotation diverse_pairwise(array [$T] of var float: x,
string: distance_metric)
7. annotation diverse_pairwise(array [int] of var float: x,
string: distance_metric,
float: min_dist,
float: max_dist,
float: weight)
8. annotation diverse_pairwise(array [$T] of var float: x,
string: distance_metric,
float: min_dist,
float: max_dist,
float: weight)
|
|
Annotations
diversity_aggregator
annotation diversity_aggregator(string)
|
An aggregator combines pairwise diversity measures from each pair of solutions into an overall diversity score to identify the k most diverse solutions, using an incremental approach (i.e., diversity_incremental). Currently, it supports three methods: sum, which sums up the pairwise diversity measures; min, which selects the minimum; and max, which selects the maximum. |
diversity_combinator
annotation diversity_combinator(string)
|
Use to combine distance functions to diversity of a diverse solution. Currently, it supports three methods: sum, which sums up the distance measures; min, which selects the minimum; and max, which selects the maximum. |
diversity_incremental
annotation diversity_incremental(int: k, float: gap)
|
Produce at most k number of diverse solutions with thier objective values bounded between optimal value and gap % from the optimal. Diverse solutions are obtained one after the other and distance to k-th diverse solution is sum of pairwise distance to all the previous diverse solutions |