From 67f0c46b25646ee91148126d2c19ce2bbab9c512 Mon Sep 17 00:00:00 2001 From: Julian Blank Date: Sun, 17 Dec 2023 13:07:27 -0800 Subject: [PATCH] SMSEMOA: variable 'pop' referenced before assignment in _advance function #513 --- pymoo/algorithms/moo/sms.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pymoo/algorithms/moo/sms.py b/pymoo/algorithms/moo/sms.py index 03e7d9c1..147cd8cc 100644 --- a/pymoo/algorithms/moo/sms.py +++ b/pymoo/algorithms/moo/sms.py @@ -184,6 +184,9 @@ def _advance(self, infills=None, **kwargs): # merge the offsprings with the current population if infills is not None: pop = Population.merge(self.pop, infills) + else: + pop = self.pop + self.pop = self.survival.do(self.problem, pop, n_survive=self.pop_size, algorithm=self, ideal=ideal, nadir=nadir, **kwargs)