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>; }
Expand description

A Simulation is the execution of an algorithm.

Associated Types

Required methods

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

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

Stops the simulation after the current loop is finished.

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.

Implementors