Skip to content

feat: price the grid at the mean over the forecast band - #185

Open
andig wants to merge 2 commits into
mainfrom
feat/forecast-band
Open

andig wants to merge 2 commits into
mainfrom
feat/forecast-band

Conversation

@andig

@andig andig commented Oct 4, 2026

Copy link
Copy Markdown
Member

refs #163

One optional time series lets the schedule price the generation forecast as uncertain instead of taking it as given. Absent, the model is unchanged and every stored case solves as before.

  • ft_err: standard deviation of the forecast per step. The grid cost of a step is the mean over generation at ft - ft_err and ft + ft_err. The schedule is shared, only the grid split differs: a shortfall cannot raise the export, a surplus cannot raise the import. No scenario copies of the battery variables, no new binaries, four continuous variables and four rows per step with a band.
  • Steps where export pays more than import stay at ft, since the pair is not locked by a direction binary there.
  • The reported objective value follows the same accounting.
  • Serializing TimeSeriesData with asdict now yields ft_err: None, which the API rejects like any null list. The continuity API tests filter it the way they already do for batteries.
  • tools/bench_forecast_band.py runs the stored cases against main, then with a band of 20 % of ft growing with the square root of the lead time. Plain: 5.22 s against 5.29 s total. Band: 6.44 s, worst 016 from 0.26 to 0.87 s and 028 from 1.61 to 2.82 s, while 020 and 023 solve faster. This is the one that costs solve time, the departure PR feat: value the state of charge the device is expected to leave with #184 does not.
  • evcc has to send the field for this to take effect, from the provider bands or a default growing with the horizon.

🤖 Generated with Claude Code

ft_err per step gives the standard deviation of the generation forecast. The grid cost of a step is
the mean over ft - ft_err and ft + ft_err with the schedule shared and only the grid split per
scenario. Optional, absent it reproduces the previous model.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant