Skip to content

Allow a storage unit to be energy neutral over its EnergyType period - #170

Merged
erikfilias merged 1 commit into
masterfrom
feature/storage-energy-neutrality
Aug 30, 2026
Merged

Allow a storage unit to be energy neutral over its EnergyType period#170
erikfilias merged 1 commit into
masterfrom
feature/storage-energy-neutrality

Conversation

@erikfilias

@erikfilias erikfilias commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Change

Lets a storage unit be energy neutral over a period: the net of discharge and charge across each
block must be zero. Two optional columns in oT_Data_GenerationEnergyNeutrality opts the unit
in, and the existing EnergyType sets the block. Both default to off.

No existing case needs to change. EnergyType is not a new column — every shipped case already
has it, blank. EnergyNeutrality is the only addition and is read with a fallback, so an absent
column means off. No shipped case sets it, and the full suite passes, including all 27 solve cases,
each reading a generation table written before this existed. With no unit opted in the constraint is
never built.

Rationale

eESSInventory links a unit's inventory to its own past and bounds it, but nothing requires it to
end a period where it started. For a store that is the right default. For demand-side management it
is not: shifted consumption is meant to be recovered within a window, not displaced across the
horizon, and a unit ending each day away from where it started quietly relaxes the shifting it
represents. A formulation that states daily neutrality currently has no way to enforce it.

Relation to eMinimumEnergy and eMaximumEnergy

Those already bound the energy a unit produces over an EnergyType period, over the same window and
with the same idxEnergy mapping. This constraint reuses that period deliberately rather than
adding a second way to say daily or weekly.

They cannot express neutrality, though. They compare vTotalOutput against an exogenous profile;
neutrality ties vTotalOutput to vESSTotalCharge, and the level the two must agree on is decided
by the optimisation rather than given, so it cannot be written as a min/max pair. No charge-side
energy constraint exists either.

Example

A demand-response unit that must recover shifted consumption within the same day:

Generator Technology EnergyType EnergyNeutrality
01_ES_DSM DSM Daily 1
01_ES_Battery Battery (blank) (blank)

The battery is untouched. The DSM unit gets one constraint at the end of each 24-hour block:

sum over the block of  duration x (discharge - charge)  ==  0

EnergyType of Weekly makes it 168 hours, and so on through the existing vocabulary.

Effect

None by default, since no shipped case sets either column. Full test suite passes, 106 tests
including the solve cases.

@erikfilias
erikfilias force-pushed the feature/storage-energy-neutrality branch 2 times, most recently from b4f2d39 to 7a72b6b Compare August 30, 2026 13:11
eESSInventory links a unit's inventory to its own past and bounds it, but
nothing requires it to end a period where it started. For a store that is the
right default. For demand-side management it is not: shifted consumption is
meant to be recovered within a window, not displaced across the horizon, and a
unit ending each day away from where it started quietly relaxes the shifting it
represents.

eMinimumEnergy and eMaximumEnergy already bound the energy a unit produces over
an EnergyType period, using the same window. They cannot express neutrality,
because they compare output against an exogenous profile whereas neutrality ties
output to charge, and the level the two must agree on is decided by the
optimisation rather than given.

This reuses that period rather than introducing a second way to say daily or
weekly: EnergyNeutrality opts a unit in, EnergyType sets the block. Both columns
are optional and default to off, so cases written before them load unchanged.
@erikfilias
erikfilias force-pushed the feature/storage-energy-neutrality branch from 7a72b6b to 3d844c3 Compare August 30, 2026 13:48
@erikfilias erikfilias changed the title Allow a storage unit to be energy neutral over a fixed block Allow a storage unit to be energy neutral over its EnergyType period Aug 30, 2026
@erikfilias
erikfilias merged commit bf1ee64 into master Aug 30, 2026
15 checks passed
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