pub struct MultiObjectiveAlgorithm<S, Sel, Sur, Cross, Mut, F, G, DC>where
S: SamplingOperator,
Sel: SelectionOperator,
Sur: SurvivalOperator,
Cross: CrossoverOperator,
Mut: MutationOperator,
F: Fn(&PopulationGenes) -> PopulationFitness,
G: Fn(&PopulationGenes) -> PopulationConstraints,
DC: PopulationCleaner,{
pub population: Option<Population>,
pub context: AlgorithmContext,
/* private fields */
}
Fields§
§population: Option<Population>
§context: AlgorithmContext
Implementations§
Source§impl<S, Sel, Sur, Cross, Mut, F, G, DC> MultiObjectiveAlgorithm<S, Sel, Sur, Cross, Mut, F, G, DC>where
S: SamplingOperator,
Sel: SelectionOperator,
Sur: SurvivalOperator,
Cross: CrossoverOperator,
Mut: MutationOperator,
F: Fn(&PopulationGenes) -> PopulationFitness,
G: Fn(&PopulationGenes) -> PopulationConstraints,
DC: PopulationCleaner,
impl<S, Sel, Sur, Cross, Mut, F, G, DC> MultiObjectiveAlgorithm<S, Sel, Sur, Cross, Mut, F, G, DC>where
S: SamplingOperator,
Sel: SelectionOperator,
Sur: SurvivalOperator,
Cross: CrossoverOperator,
Mut: MutationOperator,
F: Fn(&PopulationGenes) -> PopulationFitness,
G: Fn(&PopulationGenes) -> PopulationConstraints,
DC: PopulationCleaner,
pub fn new( sampler: S, selector: Sel, survivor: Sur, crossover: Cross, mutation: Mut, duplicates_cleaner: Option<DC>, fitness_fn: F, num_vars: usize, num_objectives: usize, num_constraints: usize, population_size: usize, num_offsprings: usize, num_iterations: usize, mutation_rate: f64, crossover_rate: f64, keep_infeasible: bool, verbose: bool, constraints_fn: Option<G>, lower_bound: Option<f64>, upper_bound: Option<f64>, seed: Option<u64>, ) -> Result<Self, MultiObjectiveAlgorithmError>
pub fn run(&mut self) -> Result<(), MultiObjectiveAlgorithmError>
Trait Implementations§
Source§impl<S, Sel, Sur, Cross, Mut, F, G, DC> Debug for MultiObjectiveAlgorithm<S, Sel, Sur, Cross, Mut, F, G, DC>where
S: SamplingOperator + Debug,
Sel: SelectionOperator + Debug,
Sur: SurvivalOperator + Debug,
Cross: CrossoverOperator + Debug,
Mut: MutationOperator + Debug,
F: Fn(&PopulationGenes) -> PopulationFitness + Debug,
G: Fn(&PopulationGenes) -> PopulationConstraints + Debug,
DC: PopulationCleaner + Debug,
impl<S, Sel, Sur, Cross, Mut, F, G, DC> Debug for MultiObjectiveAlgorithm<S, Sel, Sur, Cross, Mut, F, G, DC>where
S: SamplingOperator + Debug,
Sel: SelectionOperator + Debug,
Sur: SurvivalOperator + Debug,
Cross: CrossoverOperator + Debug,
Mut: MutationOperator + Debug,
F: Fn(&PopulationGenes) -> PopulationFitness + Debug,
G: Fn(&PopulationGenes) -> PopulationConstraints + Debug,
DC: PopulationCleaner + Debug,
Auto Trait Implementations§
impl<S, Sel, Sur, Cross, Mut, F, G, DC> Freeze for MultiObjectiveAlgorithm<S, Sel, Sur, Cross, Mut, F, G, DC>
impl<S, Sel, Sur, Cross, Mut, F, G, DC> RefUnwindSafe for MultiObjectiveAlgorithm<S, Sel, Sur, Cross, Mut, F, G, DC>where
S: RefUnwindSafe,
Sur: RefUnwindSafe,
Sel: RefUnwindSafe,
Cross: RefUnwindSafe,
Mut: RefUnwindSafe,
F: RefUnwindSafe,
DC: RefUnwindSafe,
G: RefUnwindSafe,
impl<S, Sel, Sur, Cross, Mut, F, G, DC> Send for MultiObjectiveAlgorithm<S, Sel, Sur, Cross, Mut, F, G, DC>
impl<S, Sel, Sur, Cross, Mut, F, G, DC> Sync for MultiObjectiveAlgorithm<S, Sel, Sur, Cross, Mut, F, G, DC>
impl<S, Sel, Sur, Cross, Mut, F, G, DC> Unpin for MultiObjectiveAlgorithm<S, Sel, Sur, Cross, Mut, F, G, DC>
impl<S, Sel, Sur, Cross, Mut, F, G, DC> UnwindSafe for MultiObjectiveAlgorithm<S, Sel, Sur, Cross, Mut, F, G, DC>where
S: UnwindSafe,
Sur: UnwindSafe,
Sel: UnwindSafe,
Cross: UnwindSafe,
Mut: UnwindSafe,
F: UnwindSafe,
DC: UnwindSafe,
G: UnwindSafe,
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
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more