Struct neil::Solver
[−]
[src]
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, }
A solver will take a problem and use simulated annealing to try and find an optimal state.
Fields
iterations: u64
The maximum number of iterations to run the algorithm for.
initial_temperature: f64
The initial temperature of the process.
temperature_reduction: f64
The factor to multiply the temperature by each time it is lowered - this should be a number between 0.0 and 1.0.
max_attempts: u64
The maximimum number of attempts to find a new state before lowering the temperature.
max_accepts: u64
The maximum number of accepted new states before lowering the temperature.
max_rejects: u64
The maximum number of rejected states before terminating the process.
Methods
impl Solver
[src]
fn new() -> Solver
Construct the new default solver.
fn build_new<F>(builder: F) -> Solver where F: FnOnce(&mut Solver)
Construct a new solver with a given builder function.
fn solve<P>(&self, problem: &P, initial: P::State) -> P::State where P: Problem
Run the solver on the given problem with the given initial state.
Trait Implementations
impl Clone for Solver
[src]
fn clone(&self) -> Solver
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more