solverforge_solver/phase/localsearch/acceptor/
traits.rs1use std::fmt::Debug;
4
5use solverforge_core::domain::PlanningSolution;
6
7use crate::heuristic::r#move::MoveTabuSignature;
8
9pub trait Acceptor<S: PlanningSolution>: Send + Debug {
14 fn requires_move_signatures(&self) -> bool {
15 false
16 }
17
18 fn is_accepted(
21 &mut self,
22 last_step_score: &S::Score,
23 move_score: &S::Score,
24 move_signature: Option<&MoveTabuSignature>,
25 ) -> bool;
26
27 fn phase_started(&mut self, _initial_score: &S::Score) {}
29
30 fn phase_ended(&mut self) {}
32
33 fn step_started(&mut self) {}
35
36 fn step_ended(
38 &mut self,
39 _step_score: &S::Score,
40 _accepted_move_signature: Option<&MoveTabuSignature>,
41 ) {
42 }
43}