pub trait Acceptor<S: PlanningSolution>: Send + Debug {
// Required method
fn is_accepted(
&mut self,
last_step_score: &S::Score,
move_score: &S::Score,
move_signature: Option<&MoveTabuSignature>,
) -> bool;
// Provided methods
fn requires_move_signatures(&self) -> bool { ... }
fn phase_started(&mut self, _initial_score: &S::Score) { ... }
fn phase_ended(&mut self) { ... }
fn step_started(&mut self) { ... }
fn step_ended(
&mut self,
_step_score: &S::Score,
_accepted_move_signature: Option<&MoveTabuSignature>,
) { ... }
}Expand description
Trait for accepting or rejecting moves in local search.
Acceptors implement different strategies for escaping local optima, such as hill climbing, simulated annealing, or tabu search.
Required Methods§
fn is_accepted( &mut self, last_step_score: &S::Score, move_score: &S::Score, move_signature: Option<&MoveTabuSignature>, ) -> bool
Provided Methods§
fn requires_move_signatures(&self) -> bool
fn phase_started(&mut self, _initial_score: &S::Score)
fn phase_ended(&mut self)
fn step_started(&mut self)
fn step_ended( &mut self, _step_score: &S::Score, _accepted_move_signature: Option<&MoveTabuSignature>, )
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".