Skip to content
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

Merged
merged 1 commit into from
Oct 2, 2024
Merged

Conversation

dweindl
Copy link
Member

@dweindl dweindl commented Oct 2, 2024

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.

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-commenter
Copy link

codecov-commenter commented Oct 2, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.88%. Comparing base (951f0db) to head (c86dc79).

❗ 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.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@PaulJonasJost PaulJonasJost left a 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
Copy link
Collaborator

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it was wrong :)

@dweindl
Copy link
Member Author

dweindl commented Oct 2, 2024

i am guessing that line 450 created the bug?

L446 + L450

@dweindl dweindl merged commit d24db86 into ICB-DCM:develop Oct 2, 2024
18 checks passed
@dweindl dweindl deleted the fix_ess_recomb branch October 2, 2024 07:38
@PaulJonasJost PaulJonasJost mentioned this pull request Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants