custom_implementation/
custom_implementation.rs

1use cisat::{AgentMethods, Cohort, Parameters, Solution, TeamMethods};
2use std::cmp::{Eq, Ord, Ordering, PartialOrd};
3use std::ops::Sub;
4
5#[derive(Debug, Clone)]
6struct CustomProblem {}
7
8impl Solution for CustomProblem {
9    const NUMBER_OF_MOVE_OPERATORS: usize = 0;
10    const NUMBER_OF_OBJECTIVES: usize = 0;
11
12    fn new() -> Self {
13        unimplemented!()
14    }
15
16    fn apply_move_operator(&mut self, move_index: usize, temperature: f64) {
17        unimplemented!()
18    }
19
20    fn get_quality_scalar(&self) -> f64 {
21        unimplemented!()
22    }
23}
24
25impl Sub for CustomProblem {
26    type Output = f64;
27
28    fn sub(self, rhs: Self) -> Self::Output {
29        unimplemented!()
30    }
31}
32
33impl PartialEq for CustomProblem {
34    fn eq(&self, other: &Self) -> bool {
35        unimplemented!()
36    }
37}
38
39impl PartialOrd for CustomProblem {
40    fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
41        unimplemented!()
42    }
43}
44
45impl Eq for CustomProblem {}
46
47impl Ord for CustomProblem {
48    fn cmp(&self, other: &Self) -> Ordering {
49        unimplemented!()
50    }
51}
52
53struct CustomAgent {
54    current_solution: CustomProblem,
55    best_solution_so_far: CustomProblem,
56}
57
58impl AgentMethods<CustomProblem> for CustomAgent {
59    fn new(id: usize, parameters: Parameters) -> Self {
60        unimplemented!()
61    }
62
63    fn iterate(&mut self) {
64        unimplemented!()
65    }
66
67    fn get_best_solution_so_far(&mut self) -> CustomProblem {
68        unimplemented!()
69    }
70
71    fn get_current_solution(&mut self) -> CustomProblem {
72        unimplemented!()
73    }
74
75    fn communicate(&mut self, solutions: Vec<CustomProblem>) {
76        unimplemented!()
77    }
78}
79
80struct CustomTeam {}
81
82impl TeamMethods<CustomProblem, CustomAgent> for CustomTeam {
83    fn new(parameters: Parameters) -> Self {
84        unimplemented!()
85    }
86
87    fn iterate(&mut self) {
88        unimplemented!()
89    }
90
91    fn communicate(&mut self) {
92        unimplemented!()
93    }
94
95    fn solve(&mut self) {
96        unimplemented!()
97    }
98
99    fn get_best_solution_so_far(&mut self) -> CustomProblem {
100        unimplemented!()
101    }
102}
103
104fn main() {
105    let mut x = Cohort::<CustomProblem, CustomAgent, CustomTeam>::new(Parameters::default());
106    x.solve();
107}