Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/planning/multi-commitments #1144

Draft
wants to merge 38 commits into
base: main
Choose a base branch
from

Conversation

Flix6x
Copy link
Contributor

@Flix6x Flix6x commented Aug 13, 2024

Description

  • Revised the commitments framework used in our linear problem formulation:
    • Commitments are now split by groups of timeslots, for each of which the max deviation from the commitment quantity gets priced. This allows modelling additional types of contractual commitments.
    • To linearize computing the max deviation, an equality constraint is replaced with an inequality constraint, but only on certain conditions (specifically, it has to be a one-sided penalty commitment, i.e. only upwards or downwards deviations are penalized, without negative prices and with a group size > 1). If these conditions do not hold, the problem becomes unbounded.
    • Backwards compatible with the single commitment that was in use before, i.e. the two-sided energy contract commitment, for which the equality constraint is still in place.
  • Added new fields:
    • site-consumption-breach-price: if set, site-consumption-capacity becomes a soft constraint, and breaching it is penalized at the given price per kW. The higher the breach, the higher the costs, and it also matters if you breach it once or many times.
    • site-production-breach-price: if set, site-production-capacity becomes a soft constraint, and breaching it is penalized at the given price. The higher the breach, the higher the costs, and it also matters if you breach it once or many times.
    • site-peak-consumption: used to record peak consumption, above which an additional price per kW is charged
    • site-peak-production: used to record peak production, above which an additional price per kW is charged
    • site-peak-consumption-price: if set, an additional price per kW is charged if the site power goes over the site-peak-consumption. The higher the peak, the higher the costs, but it doesn't matter how often you reach it.
    • site-peak-production-price: if set, an additional price per kW is charged if the site power goes over the site-peak-production. The higher the peak, the higher the costs, but it doesn't matter how often you reach it.
  • Added test involving a day-ahead tariff, capacity breach pricing and peak pricing.
  • Added test demonstrating the effect of modelling a capacity breach as a dual any-each commitment.
  • Use the new VariableQuantityField for the new fields introduced in this PR. Depended on feature: flex context prices as quantities #1028.
  • Document the new API fields in the API endpoint documentation for triggering schedules.

Further Improvements

  • Added API test using the new fields.
  • For Dutch large consumers, the peak cost component "resets" monthly. If the planning window spans across 2 months, this should be reflected in the commitment groups. Moved to Reset monthly peak component #1215.

Rejected proposals

  • Q: Introducing binary constraints to determine max deviations could be more robust against negative penalties
    • A: We decided not to. The binary constraints slow things down, while the contracts where the max deviation plays a role can be assumed to carry strictly non-negative penalties.
  • Q: Should we simplify the API by defining a single capacity breach price, irregardless of whether the breach occurred on the production or consumption site?
    • A: We decided not to. Although this would result in fewer fields and a slightly shorter field name site-capacity-breach-price that may look better, it provides users less control over their setting. In particular, the separate fields allow to keep a hard constraint for, say, the production capacity, while choosing a soft constraint for the consumption capacity.
  • Q: Should we have separate prices for breaching the capacity once and per occurrence?
    • A: We decided not to. Although this would provide users with more control over their setting, in practice, breaching site capacities should be prevented, or otherwise mitigated, with the highest priority. The actual price of breaching is, to our knowledge, not a published number by network operators. Instead, the price is the risk of being curtailed by the network operator, after receiving warnings.

Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
…per group

Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Flix6x and others added 19 commits August 14, 2024 11:15
…hould work under the assumption of positive prices)

Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
…ts' into feature/planning/multi-commitments

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
…mmitments, and fix scheduler logic

Signed-off-by: F.N. Claessen <felix@seita.nl>
…t state non-negative penalties for the problem to be bounded)

Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
…planning/multi-commitments

Signed-off-by: F.N. Claessen <felix@seita.nl>

# Conflicts:
#	flexmeasures/data/models/planning/storage.py
#	flexmeasures/data/models/planning/tests/test_solver.py
#	flexmeasures/data/schemas/scheduling/__init__.py
# Conflicts:
#	flexmeasures/data/schemas/scheduling/__init__.py
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
…ach and one for each breach

Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
…p.inf

Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
@nhoening nhoening added this to the 0.24.0 milestone Sep 16, 2024
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants