File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -476,6 +476,9 @@ def adaptive_mutation_population_fitness(self, offspring):
476
476
if self .fitness_batch_size in [1 , None ]:
477
477
# Calculate the fitness for each individual solution.
478
478
for idx in range (first_idx , last_idx ):
479
+ # We cannot return the index of the solution within the population.
480
+ # Because the new solution (offspring) does not yet exist in the population.
481
+ # The user should handle this situation if the solution index is used anywhere.
479
482
fitness [idx ] = self .fitness_func (self ,
480
483
temp_population [idx ],
481
484
None )
@@ -495,6 +498,9 @@ def adaptive_mutation_population_fitness(self, offspring):
495
498
batch_last_index = first_idx + (batch_idx + 1 ) * self .fitness_batch_size
496
499
497
500
# Calculate the fitness values for the batch.
501
+ # We cannot return the index/indices of the solution(s) within the population.
502
+ # Because the new solution(s) (offspring) do(es) not yet exist in the population.
503
+ # The user should handle this situation if the solution index is used anywhere.
498
504
fitness_temp = self .fitness_func (self ,
499
505
temp_population [batch_first_index :batch_last_index ],
500
506
None )
You can’t perform that action at this time.
0 commit comments