pub struct Solver {
pub iterations: u64,
pub initial_temperature: f64,
pub temperature_reduction: f64,
pub max_attempts: u64,
pub max_accepts: u64,
pub max_rejects: u64,
}Expand description
A solver will take a problem and use simulated annealing to try and find an optimal state.
Fields§
§iterations: u64The maximum number of iterations to run the algorithm for.
initial_temperature: f64The initial temperature of the process.
temperature_reduction: f64The factor to multiply the temperature by each time it is lowered - this should be a number between 0.0 and 1.0.
max_attempts: u64The maximimum number of attempts to find a new state before lowering the temperature.
max_accepts: u64The maximum number of accepted new states before lowering the temperature.
max_rejects: u64The maximum number of rejected states before terminating the process.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Solver
impl RefUnwindSafe for Solver
impl Send for Solver
impl Sync for Solver
impl Unpin for Solver
impl UnwindSafe for Solver
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