1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! # R‑NSGA‑II – Reference‑Point‑Guided NSGA‑II
//!
//! Implementation inspired by
//! **R. Imada, H. Ishibuchi & Y. Nojima,
//! “Reference Point–Based NSGA‑II for Preference‑Based Many‑Objective
//! Optimization”, in *Proc. GECCO 2017*, pp. 1923‑1930.**
//!
//! R‑NSGA‑II biases the classic NSGA‑II ranking/crowding procedure toward
//! **user‑supplied reference points**, enabling preference‑based search without
//! altering the core fast non‑dominated sorting. At each generation it:
//!
//! 1. Performs NSGA‑II non‑dominated sorting.
//! 2. Computes a *reference‑distance* score (to the closest point in the user
//! set) **to be *minimized***.
//! 3. Uses that score—rather than crowding distance—as the secondary key
//! during survival selection.
//!
//! In *moors*, R‑NSGA‑II is wired from reusable operator bricks:
//!
//! * **Selection:** [`RankAndScoringSelection`] (`use_rank = true`, scoring **minimised**)
//! * **Survival:** [`Rnsga2ReferencePointsSurvival`] (rank + reference‑distance)
//! * **Crossover / Mutation / Sampling:** user‑provided via the builder.
//!
//! Pass your reference point matrix (`Array2<f64>`) and an `epsilon` tolerance
//! to [`Rnsga2::new`]; the survivor will treat individuals whose distance to a
//! point ≤ ε as equally preferred.
//!
use Array2;
use crate::;
define_algorithm_and_builder!;