solverforge_solver/phase/localsearch/acceptor/
mod.rs1mod diversified_late_acceptance;
7mod entity_tabu;
8mod great_deluge;
9mod hill_climbing;
10mod late_acceptance;
11mod move_tabu;
12mod simulated_annealing;
13mod step_counting;
14mod tabu_search;
15mod value_tabu;
16
17use std::fmt::Debug;
18
19use solverforge_core::domain::PlanningSolution;
20
21pub use diversified_late_acceptance::DiversifiedLateAcceptanceAcceptor;
22pub use entity_tabu::EntityTabuAcceptor;
23pub use great_deluge::GreatDelugeAcceptor;
24pub use hill_climbing::HillClimbingAcceptor;
25pub use late_acceptance::LateAcceptanceAcceptor;
26pub use move_tabu::MoveTabuAcceptor;
27pub use simulated_annealing::SimulatedAnnealingAcceptor;
28pub use step_counting::StepCountingHillClimbingAcceptor;
29pub use tabu_search::TabuSearchAcceptor;
30pub use value_tabu::ValueTabuAcceptor;
31
32pub trait Acceptor<S: PlanningSolution>: Send + Debug {
37 fn is_accepted(&self, last_step_score: &S::Score, move_score: &S::Score) -> bool;
40
41 fn phase_started(&mut self, _initial_score: &S::Score) {}
43
44 fn phase_ended(&mut self) {}
46
47 fn step_started(&mut self) {}
49
50 fn step_ended(&mut self, _step_score: &S::Score) {}
52}
53
54#[cfg(test)]
55mod tests;