1 parent 96fe8f5 commit aae6ff9Copy full SHA for aae6ff9
1 file changed
mealpy/swarm_based/PSO.py
@@ -706,6 +706,7 @@ def evolve(self, epoch):
706
pop_new.append(agent)
707
if self.mode not in self.AVAILABLE_MODES:
708
agent.target = self.get_target(pos_new)
709
+ agent.local_target = agent.target.copy()
710
self.pop[idx] = self.get_better_agent(self.pop[idx], agent, self.problem.minmax)
711
if self.compare_target(agent.target, self.pop[idx].local_target, self.problem.minmax):
712
self.pop[idx].update(local_solution=agent.solution.copy(), local_target=agent.target.copy())
0 commit comments