Skip to content

DR revenue calculator - #59

Draft
arao53 wants to merge 4 commits into
mainfrom
feature/dr
Draft

DR revenue calculator#59
arao53 wants to merge 4 commits into
mainfrom
feature/dr

Conversation

@arao53

@arao53 arao53 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

EECO will be responsible for demand response constraint building + revenue calculations for flex-pse. This PR focuses on building the Pyomo support for DR constraints and revenue calculations on a model given a set of events, a payment function, and a power consumption baseline/variable.

To be merged, will need to be extended to refine the approach for pyomo/numpy support and add CVXPy support.

Build/calculate DR Revenue
Functions to build DR revenue from events, calculate DR revenue given events and power consumption trajectory, and supporting functions to build, monitor, and evaluate events, with or without models.

Baselining:

  • BaselineMethod: Creates a way to do standard baselining based on historic and modeled power consumption and a few different strategies. This base class can be extended to represent a wide variety of strategies by specific utility or aggregator programs. The default is to average the last N similar weekdays, then scale by a day-of adjustment based on the hours right before the event. Defaults match PG&E's Capacity Bidding Program (10 days, 3-hour adjustment).
  • TopUsageDaysBaseline: Pick the highest-usage days instead of the most recent ones.
  • FixedLevelBaseline: Ignore historic power, just use an agreed upon constant baseline.
  • UnilateralInterruptionBaseline: Limit the load to a pre-determined a set level

Payment

  • PaymentStructure: This class creates a modeling abstraction to bridge baseline power, facility power consumption, and DR revenue. The default is a piecewise-linear payment based on the fraction of the bid actually delivered. Regions are plain dicts, so a schedule can express real tariff shapes — a penalty for under-delivery, a cap where extra reduction earns nothing.
  • CapacityEnergyPayment: adds a flat $/kWh payment to the amount of energy shed + the default power-based revenue.
  • MarketIndexedPayment: looks the capacity price up at calculation time (market or index prices are not known when the event is defined)

All baselining and payment classes/subclasses pair with one another.

@arao53 arao53 self-assigned this Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant