An S4 class to represent a genetic algorithm (extends Alg-class class).
Genetic(pop_size = 100, nb_max_gen = 20, prob_mutation = 0.25, sel_frac = 0.75)size of the solutions populations (default to 10)
maximal number of generation to produce (default to 4)
probability of mutation (default to 0.25)
fraction of best solutions selected for crossing (default to 0.75)
a Genetic-class object
Genetic: Genetic algorithm class constructor
pop_sizesize of the solutions populations (default to 10)
nb_max_genmaximal number of generation to produce (default to 4)
prob_mutationprobability of mutation (default to 0.25)
sel_fracfraction of best solutions selected for crossing (default to 0.75)
Genetic()
#> An object of class "Genetic"
#> Slot "pop_size":
#> [1] 100
#>
#> Slot "nb_max_gen":
#> [1] 20
#>
#> Slot "prob_mutation":
#> [1] 0.25
#>
#> Slot "sel_frac":
#> [1] 0.75
#>
Genetic(pop_size = 500)
#> An object of class "Genetic"
#> Slot "pop_size":
#> [1] 500
#>
#> Slot "nb_max_gen":
#> [1] 20
#>
#> Slot "prob_mutation":
#> [1] 0.25
#>
#> Slot "sel_frac":
#> [1] 0.75
#>