Skip to content

Tags

Tags

v1.0.0-rc2216

Toggle v1.0.0-rc2216's commit message

Verified

This tag was signed with the committer’s verified signature.
llucax Leandro Lucarella
# Frequenz Python SDK Release Notes

## Summary

This release adds support for `frequenz-channels` v2.0.0, while still supporting v1.13. It also raises the minimum `frequenz-microgrid-component-graph` version to pick up a fix for building the component graph of a microgrid that has an unspecified or unrecognized component with no connections.

## Upgrading

- The SDK now works with both `frequenz-channels` v1.13 and [v2.0.0](https://github.com/frequenz-floss/frequenz-channels-python/releases/tag/v2.0.0) (`frequenz-channels >= 1.13.0, < 3`). The minimum version is now [v1.13.0](https://github.com/frequenz-floss/frequenz-channels-python/releases/tag/v1.13.0).

- The minimum `typing-extensions` version is now 4.16.0. `frequenz-channels` also requires `frequenz-core >= 1.6.0, < 2`.

- The minimum `frequenz-microgrid-component-graph` version is now [v0.6.1](https://github.com/frequenz-floss/frequenz-microgrid-component-graph-python/releases/tag/v0.6.1).

- The SDK no longer uses the channels APIs removed in channels v2.0.0. The SDK's public API, timer behavior, and channel closing are unchanged.

## Bug Fixes

* A microgrid with a component of unspecified or unrecognized category that has no connections no longer fails to build its component graph. Such a component is left out of the formulas. If it has a connection, building the graph still fails.

v1.0.0-rc2215

Toggle v1.0.0-rc2215's commit message

Verified

This tag was signed with the committer’s verified signature.
Marenz Mathias L. Baumann
This release fixes how component pools (battery, PV, EV charger, stea…

…m boiler) handle an empty `component_ids` set, share state between pools of the same components, and account for the power of components that aren't working in their power bounds.

* The exclusion bounds of a `SystemBounds`, for example from `BatteryPool.system_power_bounds`, are no longer guaranteed to be inside its inclusion bounds. When components of a pool aren't working, only the inclusion bounds shift by the power measured on those components, so the exclusion bounds can be partly or fully outside them. If your code assumes that the exclusion bounds are inside the inclusion bounds, check each of them on its own.

* `new_battery_pool(component_ids=set())` uses all batteries again, like before v1.0.0-rc2206.
* `new_pv_pool()`, `new_ev_charger_pool()` and `new_steam_boiler_pool()` now also treat an empty `component_ids` set as "all components". Before, it gave a pool with no components, unless a pool for all components of that type had already been created (both pools then shared one cache entry).
* Because of that shared cache entry, the result used to depend on which pool was created first. Now `None` and `set()` always give the same pool.
* A pool created without component IDs and a pool created with the IDs of all the components of that type now share their state. The power manager creates such a pool to track power bounds, so the two pools no longer track the same bounds separately.
* `new_battery_pool()`, `new_pv_pool()`, `new_ev_charger_pool()` and `new_steam_boiler_pool()` now always log the warning that a pool was already created when the same pool is created twice at the same priority. The warning now names the pool's components.
  - Before, the warning was missed when a pool was created without IDs and again for all the IDs of its type, and sometimes for two equal sets of IDs that were built in different ways.
  - Creating pools of different types without IDs at the same priority also no longer logs the warning by mistake.
* Power requests to batteries no longer fail while a battery that isn't working shares an inverter with a working battery. The power distributor counted that battery as unreachable, and the component graph can't make a power formula for only some of the batteries behind an inverter, so no result was sent for the request.
* The battery pool's power bounds now include the power measured on the batteries that aren't working. Those batteries can still charge or discharge. The power distributor subtracts their measured power from the target power, so leaving it out of the bounds took it off the target twice.
  - For example, take 4 batteries that can each discharge up to 1000 W, with one of them not working but still discharging at -1000 W. A -4000 W request used to give the other three batteries -667 W each, instead of -1000 W.
  - When batteries stop working, `system_power_bounds` and the bounds in `power_status` now shift by the batteries' measured power, instead of only leaving those batteries' bounds out. A battery that shares an inverter with a working battery still counts as working. The exclusion bounds are not shifted.
  - The bounds measure that power with the same component graph formula as the power distributor, so both use the same meter fallback when an inverter stops sending data.
* The PV pool and the steam boiler pool now also include the power measured on their components that aren't working in their power bounds, for the same reason.

v1.0.0-rc2214

Toggle v1.0.0-rc2214's commit message

Verified

This tag was signed with the committer’s verified signature.
shsms Sahas Subramanian
# Frequenz Python SDK Release Notes

## Summary

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.

## Upgrading

- 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`.
  - 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")`.
  - 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.
  - With `ComponentGraphConfig(include_phantom_loads_in_consumer_formula=True)`, consumer power is unchanged: it still clamps each of its terms at zero.

## Bug Fixes

* Make the PowerManager fall back to zero instead of changing the requested power direction when a target is snapped outside asymmetric exclusion bounds.
* The battery pool no longer drops the cached data of batteries that stop working. A battery that started working again was left out of the pool's metrics until its next data sample arrived. When every working battery had just started working again, `system_power_bounds` briefly reported no bounds, and if an actor had requested power, the power manager set the target power to zero.
* After a power request to a battery's inverter fails or times out, the next request that includes that inverter is now always sent, even if it is 0 W. Before, a 0 W request was skipped when the last successful request to that inverter was also 0 W. The failed request may have been applied anyway, so the battery could keep running at that request's power. As before, a battery whose request failed is left out of new requests for a while: 1 second at first, and up to 30 seconds if its requests keep failing. This only happens while another battery in the new request is working. If none is, the failed battery is used again right away.

v1.0.0-rc2213

Toggle v1.0.0-rc2213's commit message

Verified

This tag was signed with the committer’s verified signature.
shsms Sahas Subramanian
# Frequenz Python SDK Release Notes

## Summary

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.

## Upgrading

- 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`.
  - 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")`.
  - 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.
  - With `ComponentGraphConfig(include_phantom_loads_in_consumer_formula=True)`, consumer power is unchanged: it still clamps each of its terms at zero.

v1.0.0-rc2212

Toggle v1.0.0-rc2212's commit message

Verified

This tag was signed with the committer’s verified signature.
llucax Leandro Lucarella
# Frequenz Python SDK Release Notes

## Upgrading

- Custom validators passed through a configuration dataclass field's `metadata` (as used by `load_config()` and `ConfigManager.new_receiver()`) must now raise a `marshmallow.ValidationError` to reject a value. `marshmallow` 4 removed support for validators that signal failure by returning `False`, so such validators are now ignored and the invalid value is accepted silently. This affects you as soon as `marshmallow` 4 is installed, which `frequenz-quantities` 1.0.2 and later require.

## New Features

* Added `SteamBoilerPool` for monitoring and controlling pools of steam boilers, available via `microgrid.new_steam_boiler_pool()`.

## Bug Fixes

* `COALESCE()` no longer unsubscribes from the parameter that is producing values when the parameter it was tracking evaluates to nothing at all.  This could only happen when a parameter is an expression that has no value yet, like a nested function call, in which case the samples of the producing parameter were counted against the tracked one.

v1.0.0-rc2211

Toggle v1.0.0-rc2211's commit message

Verified

This tag was signed with the committer’s verified signature.
shsms Sahas Subramanian
# Frequenz Python SDK Release Notes

## Summary

This release updates the microgrid component graph library to v0.5.0.  Formulas now fall back to more sources: a component that shares a meter with other components can be measured as that meter minus its siblings, so a formula can still return a value where it used to return nothing.

## Upgrading

* 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()`.

* Graph validation errors now use a new message format.

## New Features

* Formulas now fall back to more sources.  A component that shares a meter with other components can be measured as that meter minus its siblings, which also covers diamond topologies, and a meter can fall back to the components under it.  So a formula can still return a value when some readings are missing.

* `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.  `ComponentGraphConfig` and `FormulaOverrides` are re-exported from `frequenz.sdk.microgrid`.

v1.0.0-rc2210

Toggle v1.0.0-rc2210's commit message

Verified

This tag was signed with the committer’s verified signature.
shsms Sahas Subramanian
# Frequenz Python SDK Release Notes

## Summary

This release updates the microgrid component graph library to v0.5.0.  Formulas now fall back to more sources: a component that shares a meter with other components can be measured as that meter minus its siblings, so a formula can still return a value where it used to return nothing.

## Upgrading

* 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()`.

* Graph validation errors now use a new message format.

## New Features

* Formulas now fall back to more sources.  A component that shares a meter with other components can be measured as that meter minus its siblings, which also covers diamond topologies, and a meter can fall back to the components under it.  So a formula can still return a value when some readings are missing.

* `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.  `ComponentGraphConfig` and `FormulaOverrides` are re-exported from `frequenz.sdk.microgrid`.

v1.0.0-rc2209

Toggle v1.0.0-rc2209's commit message

Verified

This tag was signed with the committer’s verified signature.
shsms Sahas Subramanian
# Frequenz Python SDK Release Notes

## Upgrading

* Update microgrid client to v0.18.3+, which fixes a problem with missing steam boilers on formula generation.
* 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.

## New Features

* 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).

## Bug Fixes

* 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.
* Fixed the grid reactive-power formula being recreated and leaked on every access instead of being reused from the cache.

v1.0.0-rc2208

Toggle v1.0.0-rc2208's commit message

Verified

This tag was signed with the committer’s verified signature.
shsms Sahas Subramanian
# Frequenz Python SDK Release Notes

## Summary

Along with the new `tick_delay` resampler config option, this release also includes some performance improvements in the data pipeline.

## New Features

* A new `tick_delay` option was added to `ResamplerConfig` and `ResamplerConfig2` to delay resampling execution after each timer tick. The delay was designed to postpone processing while keeping window boundaries aligned to the original tick times, which can be used for cascaded resampling pipelines. This option is experimental and may be changed or deprecated in a future release.

## Bug Fixes

* Accept `ComponentDataSamples` that only carry state changes (the state changes were dropped before).

v1.0.0-rc2207

Toggle v1.0.0-rc2207's commit message

Verified

This tag was signed with the committer’s verified signature.
llucax Leandro Lucarella
# Frequenz Python SDK Release Notes

## New Features

* A new `tick_delay` option was added to `ResamplerConfig` and `ResamplerConfig2` to delay resampling execution after each timer tick. The delay was designed to postpone processing while keeping window boundaries aligned to the original tick times, which can be used for cascaded resampling pipelines. This option is experimental and may be changed or deprecated in a future release.