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
use crate::construction::heuristics::InsertionContext;
use crate::solver::RefinementContext;
mod recreate;
pub use self::recreate::*;
mod ruin;
pub use self::ruin::*;
mod naive_branching;
pub use self::naive_branching::NaiveBranching;
mod ruin_recreate;
pub use self::ruin_recreate::RuinAndRecreate;
mod weighted_composite;
pub use self::weighted_composite::WeightedComposite;
use crate::models::Problem;
use std::sync::Arc;
pub trait Mutation {
fn mutate_one(&self, refinement_ctx: &RefinementContext, insertion_ctx: InsertionContext) -> InsertionContext;
fn mutate_all(
&self,
refinement_ctx: &RefinementContext,
individuals: Vec<InsertionContext>,
) -> Vec<InsertionContext>;
}