-
Notifications
You must be signed in to change notification settings - Fork 33
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
Resolve difference between input and update #860
Conversation
@mgovers what exactly is the drifting here? We do not have addition/subtraction drift right? Multiple/division usually does not cause large drift. |
power_grid_model_c/power_grid_model/include/power_grid_model/component/power_sensor.hpp
Show resolved
Hide resolved
|
Signed-off-by: Martijn Govers <[email protected]>
Signed-off-by: Martijn Govers <[email protected]>
Signed-off-by: Martijn Govers <[email protected]>
226015e
to
09d1dac
Compare
Quality Gate passedIssues Measures |
@TonyXiang8787 I added you as a reviewer because I would like you to be the one to sign off on this change. |
It turns out that input data and update data are not treated exactly the same way in power sensors.
When rounding errors caused by this propagate, a difference may occur between single calculations run with measurement data provided in input data, or (batch or single) calculations with power sensor measurements provided in (batch or permanent) update data.
NOTE: similar rounding errors introduced when calculating the inverse update may also propagate to other scenarios, so the result may even differ between different orderings of batch scenarios or threading levels
but not yet for the inverse updateEDIT: as mentioned below: we do not apply the propagation of inverse update calculation in this PR. It may not be as big of an issue as one would expect.from a quick investigation, it turns out that the voltage sensor may also be prone to this, but no combination of values that reproduces this bug has been found yetEDIT: a combination of values was found and added to the unit tests.