[][src]Trait genevo::simulation::Simulation

pub trait Simulation<A> where
    A: Algorithm
{ type Error; fn run(&mut self) -> Result<SimResult<A>, Self::Error>;
fn step(&mut self) -> Result<SimResult<A>, Self::Error>;
fn stop(&mut self) -> Result<bool, Self::Error>;
fn reset(&mut self) -> Result<bool, Self::Error>; }

A Simulation is the execution of an algorithm.

Associated Types

type Error

Loading content...

Required methods

fn run(&mut self) -> Result<SimResult<A>, Self::Error>

Runs this simulation completely. The simulation ends when the termination criteria are met.

fn step(&mut self) -> Result<SimResult<A>, Self::Error>

Makes one step in this simulation. One step in the simulation performs one time the complete loop of the genetic algorithm.

fn stop(&mut self) -> Result<bool, Self::Error>

Stops the simulation after the current loop is finished.

fn reset(&mut self) -> Result<bool, Self::Error>

Resets the simulation in order to be able to rerun it again. This method resets the simulation in its initial state, as if it's just newly created.

Loading content...

Implementors

impl<A, T> Simulation<A> for Simulator<A, T> where
    A: Algorithm + TrackProcessingTime + Debug,
    <A as Algorithm>::Error: Eq + Hash + Display + Send + Sync,
    T: Termination<A>, 
[src]

type Error = SimError<A>

Loading content...