flexpool

Plan

From the forecast to a day-ahead plan per battery pool: scenarios, an optimiser with a risk knob, the water value behind every order, and the result against perfect foresight. Paper only.

The forecast says what prices to expect. The plan says what to do about it: for every battery pool, when to charge and discharge, how full the storage is through the day, what that should earn — and the orders that would go to the day-ahead auction. Nothing is sent to a market: the plan is paper until flexpool has a market connection.

In the desk🔗

Plan for Pool Nord: revenue on paper against perfect foresight, the expected revenue with its range and worst 10 %, one sentence on the charge and discharge windows, and charts of price, power and state of charge.

Plan (g p) shows each pool with batteries:

The risk (neutral, ausgewogen, vorsichtig) and the forecast model are in the URL (?view=plan&risk=cautious&model=naive-week). Above the pools, Letzte 14 Tage says how much of perfect foresight the same planning earned on the past fortnight.

How it is made🔗

  1. Scenarios. 200 price paths for the day from the forecast's five quantiles — each quarter hour's distribution exactly as forecast, and the quarters correlated as the forecast's own errors have been (a Gaussian copula; the correlation is shown with the plan).
  2. The optimiser. One linear programme per pool — its batteries summed to one storage — maximises (1 − β) × expected revenue + β × the mean of the worst 10 % of scenarios (CVaR). β is 0 for neutral, 0.5 for ausgewogen, 0.9 for vorsichtig. Hard limits, never traded for money: rated power (charge plus discharge), 10–90 % of usable energy, round-trip losses, start at half full and end at least as full. Solved by Clarabel, an interior-point solver.
  3. The water value — what one more stored MWh is worth at each moment — comes straight from the optimiser (the dual of the energy balance). Charging pays where the price is below it, discharging where above: that is the reason sentence.
  4. The orders. One per quarter hour with a planned flow, for the net volume (0.1 MW, rounded toward zero), with a protective limit: buy up to the highest price any scenario thought possible, sell down to the lowest. Volume and price steps are dated market rules.
  5. Committed at the gate. Before 12:00 the plan follows the latest forecast; from the gate on, the plan made at the gate is the one shown and judged.
  6. Judged on paper. Once prices are published, each order is filled if the price meets its limit (the storage's limits still hold), and the result is compared with the best schedule had the prices been known. Energy left above or below the start is valued at the day's mean price.

Why protective limits🔗

Limits at the water value look elegant but split the two legs of an arbitrage: on a day slightly below forecast, the cheap buys fill and the expensive sells miss. Over 8 market histories × 14 days:

LimitsShare of perfect foresight
water value41–46 %
80 % band of the scenarios79–80 %
protective (scenario range)94 %
price-taking (any price)95–96 %

Protective limits give up 1.6 points against price-taking for never buying a price spike blind.

Settings🔗

SettingDefaultMeaning
plan.round_trip_percent88Round-trip efficiency at the grid connection, 50–100 %
plan.cycle_cost0Cost of discharging one MWh (wear, warranty), 0–1,000 €/MWh

Both are shown under the plan.

API🔗

curl -s 'localhost:8080/api/v1/plan/day-ahead?risk=cautious&model=blend'
curl -s 'localhost:8080/api/v1/plan/day-ahead/backtest?risk=balanced'

Identical requests are served from a cache (x-flexpool-cache: hit); one plan is solved at a time. An unknown risk is a 400, an unknown model or a day without forecast a 404. See the API.

Limits🔗

Day-ahead only, per pool, batteries only; units in a pool are dispatched together. One day at a time: the storage starts at half full and ends at least as full instead of valuing tomorrow. There is no intraday, no linked order and no split per unit.

Edit this page