You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 11cb1ce
Browse filesBrowse the repository at this point in the historyBrowse files
Update the microgrid component graph to v0.5.0 and make it configurable (#1437)
The microgrid component graph library v0.5.0 changes the per-category
formulas to read the components first and use the meter as the fallback.
This PR upgrades the SDK to it and lets applications configure the
component graph from the top-level API.
## Changes
- Update `frequenz-microgrid-component-graph` to `>= 0.5.0, < 0.6`.
- Add a `component_graph_config` keyword argument to
`microgrid.initialize()`. It takes a `ComponentGraphConfig`, which is
passed to the `ComponentGraph` constructor. `ComponentGraphConfig` and
`FormulaOverrides` are re-exported from `frequenz.sdk.microgrid`.
- Update the formula tests to send component values that differ from the
meter values, so both the new component-first order and the meter
fallback are verified at runtime.
- Rename the test helper `ComponentGraphConfig` to `ComponentGraphSpec`,
to avoid confusion with the re-exported library class.
## Breaking
- Per-category formulas (battery, PV, CHP, EV charger, ...) now read the
components first and use the meter as the fallback. Pass
`ComponentGraphConfig(prefer_meters_in_component_formulas=True)` to
`microgrid.initialize()` to restore the old order.
- Generated formula strings can differ from the previous release, and
graph validation errors use the new `Graph validation failed:` message
format.
<!-- Here goes a general summary of what this release is about -->
6
+
3
7
## Upgrading
4
8
5
-
* Update microgrid client to v0.18.3+, which fixes a problem with missing steam boilers on formula generation.
6
-
* The PV inverter manager now subtracts the power measured on unreachable PV inverters from the distribution target, so the power sent to the reachable inverters can change when some requested PV inverters are unreachable.
9
+
* Update the microgrid component graph library to v0.5.0. The per-category formulas (battery, PV, CHP, EV charger, ...) now read the component first and use the meter as the fallback. This is the opposite of the old order, so generated formula strings and power values can change. To keep the old order, pass `ComponentGraphConfig(prefer_meters_in_component_formulas=True)` to `microgrid.initialize()`.
10
+
11
+
* Graph validation errors now use a new message format.
7
12
8
13
## New Features
9
14
10
-
*The PV inverter manager now accounts for the power measured on unreachable PV inverters when distributing power, so the reachable inverters compensate for it (matching the battery manager's behavior).
15
+
*`microgrid.initialize()` has a new keyword argument `component_graph_config`. It takes a `ComponentGraphConfig` and gives full control over how the component graph is built. For example, pass `ComponentGraphConfig(prefer_meters_in_component_formulas=True)` to make the per-category formulas read from the meter first, as in previous releases. `ComponentGraphConfig` and `FormulaOverrides` are re-exported from `frequenz.sdk.microgrid`.
11
16
12
17
## Bug Fixes
13
18
14
-
* Fixed a resource leak in the power distributor: the formulas created for unreachable batteries were never stopped, so CPU usage slowly climbed over time until the application was restarted.
15
-
* Fixed the grid reactive-power formula being recreated and leaked on every access instead of being reused from the cache.
19
+
<!-- Here goes notable bug fixes that are worth a special mention or explanation -->
0 commit comments