pub struct SimulatedAnnealing<T, N>where
T: Clone,
N: NeighborhoodOperator<T>,{ /* private fields */ }Trait Implementations§
Source§impl<T, N> Algorithm<T> for SimulatedAnnealing<T, N>
impl<T, N> Algorithm<T> for SimulatedAnnealing<T, N>
type SolutionSet = VectorSolutionSet<T>
type Parameters = SimulatedAnnealingParameters<T, N>
type StepState = SimulatedAnnealingState<T>
fn new(parameters: Self::Parameters) -> Self
Source§fn algorithm_name(&self) -> &str
fn algorithm_name(&self) -> &str
Human-readable algorithm name used by observers and runtime reports.
Source§fn termination_criteria(&self) -> TerminationCriteria
fn termination_criteria(&self) -> TerminationCriteria
Termination criteria configured for this algorithm instance.
Source§fn observers_mut(&mut self) -> &mut Vec<Box<dyn AlgorithmObserver<T>>>
fn observers_mut(&mut self) -> &mut Vec<Box<dyn AlgorithmObserver<T>>>
Mutable access to registered observers.
Source§fn set_solution_set(&mut self, solution_set: Self::SolutionSet)
fn set_solution_set(&mut self, solution_set: Self::SolutionSet)
Stores the last solution set produced by
run.Source§fn validate_parameters(&self) -> Result<(), String>
fn validate_parameters(&self) -> Result<(), String>
Returns
Ok(()) when parameters are valid, or Err(message) otherwise.fn get_solution_set(&self) -> Option<&Self::SolutionSet>
fn initialize_step_state( &self, problem: &(impl Problem<T> + Sync), ) -> Self::StepState
fn step(&self, problem: &(impl Problem<T> + Sync), state: &mut Self::StepState)
fn build_snapshot( &self, problem: &(impl Problem<T> + Sync), state: &Self::StepState, ) -> ExecutionStateSnapshot
fn finalize_step_state(&self, state: Self::StepState) -> Self::SolutionSet
Source§fn checkpoint_algorithm_parameters(&self) -> String
fn checkpoint_algorithm_parameters(&self) -> String
Returns a string used to fingerprint algorithm checkpoint compatibility.
Source§fn run<P>(&mut self, problem: &P) -> Result<Self::SolutionSet, String>
fn run<P>(&mut self, problem: &P) -> Result<Self::SolutionSet, String>
Runs the optimization algorithm on the given problem. Read more
Source§fn get_resume_checkpoint(
&self,
runtime_metadata: &CheckpointRuntimeMetadata<'_>,
checkpoint_policy: &CheckpointPolicy,
) -> Option<CheckpointRecord>
fn get_resume_checkpoint( &self, runtime_metadata: &CheckpointRuntimeMetadata<'_>, checkpoint_policy: &CheckpointPolicy, ) -> Option<CheckpointRecord>
Resolves a resumable checkpoint when
--resume is present.Source§impl<T, N> Observable<T> for SimulatedAnnealing<T, N>
impl<T, N> Observable<T> for SimulatedAnnealing<T, N>
Source§fn add_observer(&mut self, observer: Box<dyn AlgorithmObserver<T>>)
fn add_observer(&mut self, observer: Box<dyn AlgorithmObserver<T>>)
Adds an observer to this observable
Source§fn clear_observers(&mut self)
fn clear_observers(&mut self)
Removes all observers
Auto Trait Implementations§
impl<T, N> Freeze for SimulatedAnnealing<T, N>where
N: Freeze,
impl<T, N> !RefUnwindSafe for SimulatedAnnealing<T, N>
impl<T, N> Send for SimulatedAnnealing<T, N>
impl<T, N> !Sync for SimulatedAnnealing<T, N>
impl<T, N> Unpin for SimulatedAnnealing<T, N>
impl<T, N> UnsafeUnpin for SimulatedAnnealing<T, N>where
N: UnsafeUnpin,
impl<T, N> !UnwindSafe for SimulatedAnnealing<T, N>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more