File tree 1 file changed +7
-3
lines changed 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1803,9 +1803,13 @@ def cal_pop_fitness(self):
1803
1803
solutions_to_submit = []
1804
1804
for sol_idx , sol in enumerate (self .population ):
1805
1805
# The "undefined" value means that the fitness of this solution must be calculated.
1806
- if pop_fitness [sol_idx ] == "undefined" :
1807
- solutions_to_submit .append (sol .copy ())
1808
- solutions_to_submit_indices .append (sol_idx )
1806
+ if type (pop_fitness [sol_idx ]) is str :
1807
+ if pop_fitness [sol_idx ] == "undefined" :
1808
+ solutions_to_submit .append (sol .copy ())
1809
+ solutions_to_submit_indices .append (sol_idx )
1810
+ elif type (pop_fitness [sol_idx ]) in [list , tuple , numpy .ndarray ]:
1811
+ # This is a multi-objective problem.
1812
+ pass
1809
1813
1810
1814
# Check if batch processing is used. If not, then calculate the fitness value for individual solutions.
1811
1815
if self .fitness_batch_size in [1 , None ]:
You can’t perform that action at this time.
0 commit comments