Trait genevo::simulation::SimulationBuilder
source · [−]pub trait SimulationBuilder<S, A> where
S: Simulation<A>,
A: Algorithm, {
fn build(self) -> S;
fn build_with_seed(self, seed: Seed) -> S;
}
Expand description
The SimulationBuilder
creates a new Simulation
with given parameters
and options. It forms the initialization stage of the algorithm.
Required methods
fn build_with_seed(self, seed: Seed) -> S
fn build_with_seed(self, seed: Seed) -> S
Finally build the simulation and initialize the RNG with the given seed.
A simulation run can be repeated with the exact same sequence of iterations/generations, by providing the same seed as for a previous run.