Skip to content

Commit ac5ae79

Browse files
author
Julian Blank
committed
Improved Documentation
1 parent 605b6b2 commit ac5ae79

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

pymoo/operators/repair/inverse_penalty.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import numpy as np
22

33
from pymoo.operators.repair.bounds_repair import BoundsRepair
4-
from pymoo.operators.repair.to_bound import set_to_bounds_if_outside, set_to_bounds_if_outside_by_problem
54

65

76
def inverse_penality(x, p, xl, xu, alpha=None):
@@ -72,8 +71,8 @@ def repair_out_of_bounds(self, problem, X, P=None, **kwargs):
7271
xu = np.ones(2)
7372

7473
# chosen parents
75-
p = np.array([0.1, 1.0])
76-
# p = np.array([0.5, 0.6])
74+
# p = np.array([0.1, 1.0])
75+
p = np.array([0.5, 0.6])
7776

7877
c = np.array([-0.1, 1.0])
7978

pymoo/util/display.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,12 @@ def _do(self, problem, evaluator, algorithm):
176176
self.output.append("n_nds", len(algorithm.opt), width=7)
177177
self.term.do_continue(algorithm)
178178

179-
delta_ideal, delta_nadir, delta_f, hist_delta_max = "-", "-", "-", "-"
179+
delta_bounds, delta_f, hist_delta_max = "-", "-", "-"
180180

181181
if len(self.term.metrics) > 0:
182182
metric = self.term.metrics[-1]
183-
delta_ideal = metric["delta_ideal"]
184-
delta_nadir = metric["delta_nadir"]
183+
delta_bounds = np.maximum(metric["delta_ideal"], metric["delta_nadir"])
185184
delta_f = metric["delta_f"]
186185

187-
self.output.append("delta_ideal", delta_ideal)
188-
self.output.append("delta_nadir", delta_nadir)
186+
self.output.append("delta_bounds", delta_bounds)
189187
self.output.append("delta_f", delta_f)

0 commit comments

Comments
 (0)