Skip to content

Commit 3332503

Browse files
authored
Bump component-graph to 0.6.0 (#1467)
The consumer and producer formulas are no longer clamped, so consumer power can be negative and producers drawing power count against the producer total.
2 parents ef2339d + 90e58a5 commit 3332503

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

‎RELEASE_NOTES.md‎

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,12 @@
22

33
## Summary
44

5-
<!-- Here goes a general summary of what this release is about -->
5+
This release updates the microgrid component graph library to v0.6.0, which stops clamping the consumer and producer formulas. Consumer power can now be negative, and a producer that draws power now makes the producer total less negative instead of counting as zero.
66

77
## Upgrading
88

9-
<!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->
9+
- The minimum supported version of [`frequenz-microgrid-component-graph`](https://github.com/frequenz-floss/frequenz-microgrid-component-graph-python) is now [v0.6.0](https://github.com/frequenz-floss/frequenz-microgrid-component-graph-python/releases/tag/v0.6.0), which stops clamping the consumer and producer formulas. This changes the values streamed by `microgrid.consumer().power` and `microgrid.producer().power`.
10+
- Consumer power used to be clamped at zero. It can now be negative, for example when unmodeled production or a measurement mismatch is larger than the consumption. To get the old result, use `consumer.power.max(Power.zero()).build("consumer_power")`.
11+
- Producer power used to clamp each producer at zero. A producer that draws power now adds a positive value instead of zero, so the total can be positive. For example, PV producing 10 kW and a CHP drawing 2 kW used to give -10 kW and now give -8 kW. There is one exception: when the two share a meter below the grid meter, that meter sends data, and `disable_fallback_components` is off, the meter measures them together, so they gave -8 kW before too. `producer.power.min(Power.zero()).build("producer_power")` clamps the total at zero, but it still differs from the old result when one producer draws power while another produces.
12+
- With `ComponentGraphConfig(include_phantom_loads_in_consumer_formula=True)`, consumer power is unchanged: it still clamps each of its terms at zero.
1013

11-
## New Features
12-
13-
<!-- Here goes the main new features and examples or instructions on how to use them -->
14-
15-
## Bug Fixes
16-
17-
<!-- Here goes notable bug fixes that are worth a special mention or explanation -->

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ dependencies = [
3030
# changing the version
3131
# (plugins.mkdocstrings.handlers.python.import)
3232
"frequenz-client-microgrid >= 0.18.3, < 0.19.0",
33-
"frequenz-microgrid-component-graph >= 0.5.0, < 0.6",
33+
"frequenz-microgrid-component-graph >= 0.6.0, < 0.7",
3434
"frequenz-client-common >= 0.3.6, < 0.5.0",
3535
"frequenz-channels >= 1.6.1, < 2.0.0",
3636
"frequenz-quantities[marshmallow] >= 1.0.0, < 2.0.0",

0 commit comments

Comments
 (0)