|
1 | 1 | # Frequenz Microgrid Release Notes |
2 | 2 |
|
3 | | -## Upgrading |
4 | | - |
5 | | -- The `ChronoError` variant has been removed from the `ErrorKind` enum. This is a breaking change for code that pattern-matches on `ErrorKind`. The variant had no remaining constructors; the time-delta arithmetic that previously surfaced it is now performed inside the new `WallClockTimer`, and resampling-interval misconfiguration is reported as `InvalidConfig`. |
| 3 | +## Summary |
6 | 4 |
|
7 | | -- `LogicalMeterConfig` instances can't be created directly anymore, and need to be created using the `LogicalMeterConfig::new` method. This helps avoid future breaking changes, as we add more config parameters. |
| 5 | +<!-- Here goes a general summary of what this release is about --> |
8 | 6 |
|
9 | | -- Formula streaming methods in the `LogicalMeterHandle` no longer take metric as a function parameter, but expect a generic argument. For example: |
10 | | - |
11 | | - *Old syntax:* |
12 | | - ```rust |
13 | | - let formula_grid = logical_meter.grid(metric::AcPowerActive)?; |
14 | | - let formula_pv = logical_meter.pv(None, metric::AcVoltage)?; |
15 | | - ``` |
| 7 | +## Upgrading |
16 | 8 |
|
17 | | - *New syntax:* |
18 | | - ```rust |
19 | | - let formula_grid = logical_meter.grid::<metric::AcPowerActive>()?; |
20 | | - let formula_pv = logical_meter.pv::<metric::AcVoltage>(None)?; |
21 | | - ``` |
| 9 | +<!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with --> |
22 | 10 |
|
23 | 11 | ## New Features |
24 | 12 |
|
25 | | -- It is now possible to change the default resampling function, and to override the resampling function for specific metrics. |
26 | | - |
27 | | -- The resampler's `max_age_in_intervals` has also become configurable, through `LogicalMeterConfig`. |
28 | | - |
29 | | -- The `Quantity` trait now exposes numeric operations (`abs`, `floor`, `ceil`, `round`, `trunc`, `fract`, `is_nan`, `is_infinite`, `min`, `max`) as trait methods, so they can be used in generic code over any `Quantity` (including `f32` and all quantity types). |
30 | | - |
31 | | -- The `Quantity` trait now provides associated `MIN` and `MAX` constants. |
| 13 | +<!-- Here goes the main new features and examples or instructions on how to use them --> |
32 | 14 |
|
33 | | -- New `BatteryPool` type (accessible via `Microgrid::battery_pool`) exposing: |
34 | | - - `power()` — a `Formula<Power>` for the pool's aggregated power. |
35 | | - - `power_bounds()` — a `broadcast::Receiver<Vec<Bounds<Power>>>` tracking the pool's power bounds. |
| 15 | +## Bug Fixes |
36 | 16 |
|
37 | | -- The logical meter now survives NTP-style wall-clock jumps. A new internal `WallClockTimer` schedules resampler ticks against the wall clock while sleeping on tokio's monotonic clock; when the two diverge by more than one interval in either direction, the timer realigns and the actor rebuilds its inner resamplers against the new clock frame. Subscribers see one `None` sample at the resync tick (preserving the every-interval cadence) and real values resume on the next tick. Note: a backward jump produces a sample timestamped in the past relative to the previous one — consumers that assume monotonically increasing `Sample` timestamps must handle this. |
| 17 | +<!-- Here goes notable bug fixes that are worth a special mention or explanation --> |
0 commit comments