-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESSOptimizer: Fix recombination bug #1477
Conversation
This fixes a bug in the recombination step of the `ESSOptimizer`, also used by `SacessOptimizer`. This will in particular improve performance when using scatter search without local optimizers.
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## develop #1477 +/- ##
===========================================
- Coverage 82.89% 82.88% -0.02%
===========================================
Files 163 163
Lines 13786 13786
===========================================
- Hits 11428 11426 -2
- Misses 2358 2360 +2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i am guessing that line 450 created the bug?
@@ -443,11 +443,15 @@ def _combine(self, i, j) -> np.array: | |||
raise ValueError("i == j") | |||
x = self.refset.x | |||
|
|||
d = x[j] - x[i] | |||
alpha = np.sign(j - i) | |||
d = (x[j] - x[i]) / 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why was this changed to /2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it was wrong :)
L446 + L450 |
This fixes a bug in the recombination step of the
ESSOptimizer
, also used bySacessOptimizer
.This will in particular improve performance when using scatter search without local optimizers.