Skip to content

Commit 607b633

Browse files
authored
Update df.py (#684)
Correction of DF11 Pareto front calculation
1 parent 5da15ca commit 607b633

File tree

1 file changed

+4
-4
lines changed
  • pymoo/problems/dynamic

1 file changed

+4
-4
lines changed

pymoo/problems/dynamic/df.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,10 @@ def _calc_pareto_front(self, *args, n_pareto_points=100, **kwargs):
318318
y1 = np.pi * G / 6 + (np.pi / 2 - np.pi * G / 3) * x1
319319
y2 = np.pi * G / 6 + (np.pi / 2 - np.pi * G / 3) * x2
320320

321-
f1 = np.sin(y1)
322-
f2 = np.dot(np.multiply(1, np.sin(y2)), np.cos(y1))
323-
f3 = np.dot(np.multiply(1, np.cos(y2)), np.cos(y1))
324-
321+
f1 = (1 + G) * np.sin(y1)
322+
f2 = (1 + G) * np.sin(y2) * np.cos(y1) # Correct element-wise multiplication
323+
f3 = (1 + G) * np.cos(y2) * np.cos(y1) # Correct element-wise multiplication
324+
325325
return get_PF(np.array([f1, f2, f3]), False)
326326

327327

0 commit comments

Comments
 (0)