@@ -122,7 +122,7 @@ def locate_pareto_worst(levels, weights, best_obj, penalty_factor = 1.):
122122 domain_solution_NDL_idxs = np .empty (most_crowded_count )
123123 for solution_idx , solution in enumerate (domain_solutions [most_crowded_domain ]):
124124 domain_solution_NDL_idxs [solution_idx ] = [level_idx for level_idx in np .arange (len (levels .levels ))
125- if any ([solution == level_solution for level_solution in levels .levels [level_idx ]])][0 ]
125+ if any ([np . allclose ( solution . obj_fun , level_solution . obj_fun ) for level_solution in levels .levels [level_idx ]])][0 ]
126126
127127 max_level = np .max (domain_solution_NDL_idxs )
128128 worst_NDL_section = [domain_solutions [most_crowded_domain ][sol_idx ] for sol_idx in np .arange (len (domain_solutions [most_crowded_domain ]))
@@ -364,11 +364,11 @@ def apply(self, objective: ParetoLevels, arguments: dict):
364364 self .suboperators ['pareto_level_updater' ].apply (objective = (temp_offspring , objective ),
365365 arguments = subop_args ['pareto_level_updater' ])
366366 break
367- elif attempt >= attempt_limit and replaced :
368- print ("Allowed replication" )
369- self .suboperators ['pareto_level_updater' ].apply (objective = (temp_offspring , objective ),
370- arguments = subop_args ['pareto_level_updater' ])
371- break
367+ # elif attempt >= attempt_limit and replaced:
368+ # print("Allowed replication")
369+ # self.suboperators['pareto_level_updater'].apply(objective=(temp_offspring, objective),
370+ # arguments=subop_args['pareto_level_updater'])
371+ # break
372372 elif attempt >= attempt_limit :
373373 temp_offspring .create ()
374374 replaced = True
0 commit comments