Repository navigation
Conversation
p_departure per battery weighs p_a by the probability the device is still there, ft_err per step prices the grid at the mean over ft +- ft_err with the schedule shared and only the grid split per scenario. Both optional, absent they reproduce the previous model.
Member
Author
|
Split per feature: departure #184, forecast band #185. 🤖 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.
closes #163
Two optional request fields let the schedule weigh what the forecast and the vehicle may do instead of taking both as given. Absent, both reproduce the previous model, every stored case solves unchanged.
p_departureper battery: probability of leaving in each time step, the remainder stays.p_athen values the state of charge the device is expected to leave with, so a charge that may be cut short is worth less than one already in. One term in the model, no new variables. The cost of charging planned after a departure is still counted in full, which leans the schedule early rather than making it exact.ft_errper time step: standard deviation of the generation forecast. The grid cost of a step is the mean over generation atft - ft_errandft + 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. Steps where export pays more than import stay atft, since the pair is not locked by a direction binary there.tools/bench_risk.pyruns the stored cases against main, then with a band of 20 % of ft growing with the square root of the lead time, and with a 30 % departure chance spread over hours 6 to 12 on every battery without discharge. Plain: 5.25 s against 5.25 s total. Band: 6.56 s, worst 016 from 0.26 to 0.90 s and 028 from 1.62 to 2.86 s, while 020 and 023 got faster. Departure: 4.26 s, nothing slower.ft_errfrom the forecast provider bands or a default growing with the horizon.🤖 Generated with Claude Code