-
Notifications
You must be signed in to change notification settings - Fork 130
Bugfix: Use correct efficiency factor when adding back local reduction contribution in group constraint checking #6681
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
base: master
Are you sure you want to change the base?
Conversation
This test exposes a bug in GroupStateHelper::checkGroupConstraintsProd() where the addback calculation uses the accumulated efficiency factor instead of the partial efficiency factor at local_reduction_level. Test setup: - Group hierarchy: FIELD -> PLAT (E=0.9) -> MANI (E=0.8) / MANI2 (E=0.7) - MANI has individual ORAT control, PLAT has guide rate - WELL-A produces 10000 SM3/day under MANI The bug causes: - Addback uses 0.72 (E_MANI * E_PLAT) instead of 0.8 (E_MANI) - This results in scale = 0.9465 (false constraint violation) - Correct calculation would give scale = 1.0288 (no violation) The test currently passes with the buggy expected values. A subsequent commit will fix the bug and update the test expectations.
|
jenkins build this please |
1 similar comment
|
jenkins build this please |
The addback calculation at local_reduction_level was using the accumulated efficiency factor (from entity to control group) instead of the partial efficiency factor (from entity to local_reduction_level). This caused incorrect constraint violations when checking higher-level group constraints. The fix computes the partial efficiency by multiplying efficiency factors from local_reduction_level down to the entity.
6653b6e to
da720e1
Compare
|
jenkins build this please |
totto82
left a comment
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.
Nice catch! Also, thanks for adding a test. I did not see any issues in the code. If there are no other comments from others, I will merge this later today.
|
I am not reviewing the PR. Just want to make sure Jenkins runs fine. |
|
jenkins build this please |
Fixes a bug in the efficiency factor addback part of the group constraint checking. The addback calculation at
local_reduction_levelwas using the accumulated efficiency factor (from entity to control group) instead of the partial efficiency factor (from entity tolocal_reduction_level).This might cause incorrect constraint violations when checking higher-level group constraints. The fix computes the partial efficiency by multiplying efficiency factors from
local_reduction_leveldown to the entity. Also added a test case to demonstrate the issue, see the first commit of this PR.