You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Based on the mutation percentage in the 'mutation_percent_genes' parameter, the number of genes to mutate is calculated.
527
533
mutation_num_genes=numpy.uint32(
528
-
(mutation_percent_genes*self.num_genes)/100)
534
+
(mutation_percent_genes*self.num_genes)/100)
529
535
# Based on the mutation percentage of genes, if the number of selected genes for mutation is less than the least possible value which is 1, then the number will be set to 1.
530
536
ifmutation_num_genes==0:
531
537
ifself.mutation_probabilityisNone:
@@ -546,7 +552,7 @@ def __init__(self,
546
552
547
553
# Based on the mutation percentage in the 'mutation_percent_genes' parameter, the number of genes to mutate is calculated.
548
554
mutation_num_genes=numpy.uint32(
549
-
(mutation_percent_genes*self.num_genes) /100)
555
+
(mutation_percent_genes*self.num_genes) /100)
550
556
# Based on the mutation percentage of genes, if the number of selected genes for mutation is less than the least possible value which is 1, then the number will be set to 1.
# If the solutions are not saved (i.e. `save_solutions=False`), check if this solution is a parent from the previous generation and its fitness value is already calculated. If so, use the fitness value instead of calling the fitness function.
0 commit comments