fix issue #362 a second time - #402
Merged
Merged
Conversation
|
stijnh
self-requested a review
September 11, 2026 07:07
stijnh
approved these changes
Sep 11, 2026
stijnh
left a comment
Member
There was a problem hiding this comment.
Looks good to me! Good to have the test to ensure it does not resurface
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Due to a large merge, the issue of a runtime overflow warning in the dual_annealing strategy (issue #362) resurfaced.
This pull fixes the issue by replacing a hard coded sys.float_info.max in the get_result_cost function in util.py with a value passed as an argument. CostFunc is also adjusted to use pass its self.invalid_return_value to the get_result_cost function.
I've also added a test to make sure the issue does not resurface again.