Skip to content

Commit

Permalink
Fix for population updater to take into account dublicates
Browse files Browse the repository at this point in the history
  • Loading branch information
Maslyaev committed Nov 14, 2023
1 parent cf81e1f commit db71007
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
18 changes: 11 additions & 7 deletions epde/operators/multiobjective/moeadd_specific.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,13 +363,17 @@ def apply(self, objective : ParetoLevels, arguments : dict):
arguments = subop_args['pareto_level_updater'])
break
elif attempt >= attempt_limit:
print(temp_offspring.text_form)
print('-----------------------')
for idx, individual in enumerate(objective.population):
print(f'Individual {idx}')
print(individual.text_form)
print('-----------------------')
raise Exception('Can not place individual into the population. Try decreasing population size or increasing token variety. ')
# print(temp_offspring.text_form)
# print('-----------------------')
# for idx, individual in enumerate(objective.population):
# print(f'Individual {idx}')
# print(individual.text_form)
# print('-----------------------')
# raise Exception('Can not place individual into the population. Try decreasing population size or increasing token variety. ')
print('The algorithm had issues with generating unique offsprings, allowed replication.')
self.suboperators['pareto_level_updater'].apply(objective = (temp_offspring, objective),
arguments = subop_args['pareto_level_updater'])

break
attempt += 1
return objective
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_requirements():

setup(
name = 'epde',
version = '1.2.14',
version = '1.2.15',
description = SHORT_DESCRIPTION,
long_description="PLACEHOLDER",
# long_description_content_type='text/x-rst',
Expand Down

0 comments on commit db71007

Please sign in to comment.