We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d973bf commit 97b3f25Copy full SHA for 97b3f25
optimizer/mopso.py
@@ -383,9 +383,9 @@ def update_pareto_front(self):
383
dominanted = get_dominated(particle_fitnesses, pareto_lenght)
384
385
if self.incremental_pareto:
386
- self.pareto_front = [copy.deepcopy(particles[i]) for i in range(len(particles)) if not dominanted[i]]
+ self.pareto_front = [copy.copy(particles[i]) for i in range(len(particles)) if not dominanted[i]]
387
else:
388
- self.pareto_front = [copy.deepcopy(particles[i]) for i in range(pareto_lenght, len(particles)) if not dominanted[i]]
+ self.pareto_front = [copy.copy(particles[i]) for i in range(pareto_lenght, len(particles)) if not dominanted[i]]
389
390
crowding_distances = self.calculate_crowding_distance(
391
self.pareto_front)
0 commit comments