Default to component-first per-category formulas#91
Draft
shsms wants to merge 3 commits into
Draft
Conversation
Point the frequenz-microgrid-component-graph dependency at the meter-subtraction branch of the fork. Update the default-preference steam-boiler and wind-turbine formula tests for the new component-first default: per-category formulas now use the component reading as the primary source and the meter as the fallback. Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
component-graph flipped the prefer_meters_in_component_formulas default to false (component reading primary, meter as fallback). Mirror it in the binding so an explicit ComponentGraphConfig() matches both the no-config path and the upstream default, instead of forcing the old meter-first behavior. Update the type stub and the preference tests. Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
Pure terminology: the per-category formulas' non-meter source is a component, matching component-graph's vocabulary (the flag is prefer_meters_in_component_formulas). Rename _DEVICE_PRIMARY and the "device" wording in the type stub and preference tests to "component"; no behavior change. Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
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.
Track component-graph's meter-subtraction branch and mirror its breaking default: per-category formulas now use the component reading as the primary source and the meter as the fallback.
Changes
frequenz-microgrid-component-graphdependency at themeter-subtractionbranch (temporary — repoint to a release before merge).ComponentGraphConfigdefault forprefer_meters_in_component_formulasfromTruetoFalse, so an explicitComponentGraphConfig()matches both the no-config path and upstream.Breaking
prefer_meters_in_component_formulasnow defaults toFalse(wasTrue): the per-category formulas (battery/chp/pv/wind_turbine/ev_charger/steam_boiler) use the component reading as primary and the meter as fallback. PassTrueto restore the previous meter-first behavior.