diff --git a/examples/algorithms/moo/nsga2/nsga2_pcx.py b/examples/algorithms/moo/nsga2/nsga2_pcx.py index 10d0dd258..b5fa37f14 100644 --- a/examples/algorithms/moo/nsga2/nsga2_pcx.py +++ b/examples/algorithms/moo/nsga2/nsga2_pcx.py @@ -14,7 +14,7 @@ algorithm, ('n_gen', 200), seed=1, - verbose=False) + verbose=True) plot = Scatter() plot.add(problem.pareto_front(), plot_type="line", color="black", alpha=0.7) diff --git a/pymoo/util/display/single.py b/pymoo/util/display/single.py index 06bb31d17..e178af672 100644 --- a/pymoo/util/display/single.py +++ b/pymoo/util/display/single.py @@ -60,9 +60,8 @@ def update(self, algorithm): if opt.feas: self.f_min.set(opt.f) - if self.best: + if self.best is not None: self.f_gap.set(opt.f - self.best) - else: self.f_min.set(None) self.f_gap.set(None)