Skip to content

feat: deleted pr#62

Closed
damonrand wants to merge 1 commit into
mainfrom
feature/support-axle-flex
Closed

feat: deleted pr#62
damonrand wants to merge 1 commit into
mainfrom
feature/support-axle-flex

Conversation

@damonrand
Copy link
Copy Markdown
Contributor

@damonrand damonrand commented May 8, 2026

DELETED

Two backward-compatible additions to priceCurveAlgo. Both default to legacy
behaviour, so existing YAMLs are unaffected.

1. peaks: [...] — multi-peak support
   PriceCurveAlgo accepts a `peaks` list alongside the legacy single `peak`.
   The two are mutually exclusive (validated in __post_init__);
   resolve_peaks() returns a list view that works for either form, including
   the no-peak case.

   get_peak_power and get_peak_approach_energies now take List[Peak].
   Active-peak resolution: scan list for the peak whose period contains t;
   raise ValueError if more than one matches (overlap = config error).
   Approach-energy resolution: pick the next-upcoming peak today; if no peak
   left today, return zero.

2. dynamic.minEndOfPeakSoe — reserve SoE for post-peak niv-chase
   New optional float on PeakDynamic, default 0.0. In get_peak_power the
   time-to-empty calc uses dischargeable_soe = max(0, soe - min_end_of_peak_soe)
   instead of full soe. This creates slack in the peak window so the dynamic
   HOLD-on-LONG branch can actually fire instead of falling through to forced
   full discharge in every HH.

   The prioritise_residual_load=true reserve-energy calc also switched to
   dischargeable_soe, so the residual-load reserve sits inside the
   dischargeable budget.

Tests: 14 -> 34 unit/integration tests pass. Existing single-peak
integrationTestPriceCurve summary unchanged within tolerance — backward-compat
verified at every test run. New integrationTestPriceCurveMultiPeak end-to-end
fixture exercises weekday morning + evening windows. 5 unit tests for
_find_active_peak/_find_next_peak (overlap detection, day-class filtering,
transitions). 5 unit tests for minEndOfPeakSoe (default-zero legacy,
slack-creates-hold-on-long, short-still-discharges, late-in-peak-forces-full,
min-above-soe-clamps-to-zero-dischargeable).
@damonrand damonrand force-pushed the feature/support-axle-flex branch from ae82638 to c53095e Compare May 8, 2026 15:31
@damonrand
Copy link
Copy Markdown
Contributor Author

Closing in favour of a sanitised replacement PR. See follow-up PR.

@damonrand damonrand closed this May 8, 2026
@damonrand damonrand changed the title feat: multi-peak + minEndOfPeakSoe (v2.1.0, v2.2.0) feat: deleted pr May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant