test: cover peak shaping strategies with data driven cases#101
Open
andig wants to merge 3 commits into
Open
Conversation
Peak shaping only picks between cost neutral schedules, so the objective value moves by less than the comparison tolerance. Strict cases compare the resulting schedule instead.
Member
Author
|
@ekkea hope this is a better direction |
The three strategy cases pin the absolute peak, but not the shape of the profile underneath it. Cover that separately: the surplus of the first step is far beyond c_max, so the export peak is pinned there and the remaining 170 Wh can be charged anywhere in the following steps without touching it. A schedule that only caps the peak therefore has a free choice, and the strict comparison pins the leveled one. Requires #102: without the ramp penalty the optimizer returns grid_export [950, 50, 50, 50, 80] instead of [950, 57.5, 57.5, 57.5, 57.5]. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
andig
added a commit
that referenced
this pull request
Jul 24, 2026
The coverage moves to test_cases/026-attenuate-feedin-peaks-below-cap.json on #101, where the peak shaping cases and the strict schedule comparison live. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
Author
|
Added The three strategy cases pin the absolute peak; this one pins the shape of the profile below the peak. The surplus of the first step is far beyond It fails on current main and needs #102:
🤖 Generated with Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #100, depends on #102
Follows up on #96 (comment): the peak shaping coverage lives in the existing data driven harness instead of a feature specific test module.
attenuate_demand_peakslevels grid import,attenuate_feedin_peaksmoves charging into the solar hump,attenuate_grid_peaksdoes both"strict": true, which compares grid import, grid export, and the battery schedules withnumpy.allcloseon top of status and objective valuetestbench.py updatekeeps the strict flag when it refreshes a case🤖 Generated with Claude Code