Repository navigation
[BugFix] fast_any_tap boundary handling boundary handling in binary search - #1632
Open
Jerry-Jinfeng-Guo wants to merge 1 commit into
Open
Jerry-Jinfeng-Guo wants to merge 1 commit into
Jerry-Jinfeng-Guo wants to merge 1 commit into
Conversation
Signed-off-by: Jerry Jinfeng Guo <jerry.jinfeng.guo@alliander.com>
Member
Author
There was a problem hiding this comment.
Pure binary search runs will not trigger max iteration error.
Member
Author
There was a problem hiding this comment.
Discussion needed wrt behaviour.
|
This branch has not been deployed
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.



Fixes #1215
The behaviour that lead to the original bug was due to us strictly limiting binary search to search between the upper bound and lower bounds. In cases where target voltage range lives outside such bounds, boundary taps should be considered.
Some other tests are also updated. Due to the nature of including a boundary, binary search will terminate at
lower_bound == upper_boundand will not run all the way untilmax_iterreached. This will change the behaviour of the search wrt maximum iteration exceptions.Arguably, if target range falls outside the achievable range, we return the closest tap without exception, the same should apply to small
u_band.