Add L1 regularisation to dispatch - #1463
Conversation
There was a problem hiding this comment.
🟡 Not ready to approve
The new parameter’s Rust default value and the secondary-objective scaling currently don’t match the documented “small mean deviation” behaviour and can materially distort dispatch outcomes.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
This PR introduces an optional secondary objective in the dispatch optimisation to regularise asset activity (L1 deviation in utilisation fraction) so dispatch is spread more evenly across otherwise-equivalent assets, controlled by a new model parameter exposed in the input schema.
Changes:
- Adds an activity-equalisation (L1) penalty term to the dispatch optimisation when
dispatch_activity_equalisation_epsilon > 0. - Introduces
dispatch_activity_equalisation_epsilontoModelParameterswith validation and a default value. - Exposes the new parameter in the input model schema (
schemas/input/model.yaml).
File summaries
| File | Description |
|---|---|
| src/simulation/optimisation.rs | Adds secondary-objective variables/constraints to penalise utilisation deviations across assets/time-slices. |
| src/model/parameters.rs | Adds a new parameter to control the regularisation strength (incl. default + validation). |
| schemas/input/model.yaml | Documents and exposes the new parameter to user configuration with a default and notes. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Low
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
6dcc329 to
f481607
Compare
alexdewar
left a comment
There was a problem hiding this comment.
I've had a look through and it seems sensible enough. I was hoping to have a bit of a play with it but ran out of time in the end.
I think we should pick a sensible default value for this and make users set please_give_me_broken_results to either change it or reduce it below this default value, because it will lead to potentially non-intuitive results (e.g. varying arbitrarily between platforms and versions of HiGHS). Of course, users might want to disable it for performance reasons, but that's on them 👅. We should just make it clear that the "supported" configuration is with an appropriate amount of regularisation.
Description
Please include a summary of the change and which issue is fixed (if any). Please also
include relevant motivation and context. List any dependencies that are required for
this change.
Fixes # (issue)
Type of change
Key checklist
$ cargo test$ cargo docpresent in the previous release
Further checks