You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since #2321, a shared stock's SoC parameters (soc-at-start, soc-min, soc-max, soc-targets) must be defined on a single flex-model entry, and every device in a stock group receives the group's initial stock. However, storage-efficiency is still a per-device flex-model field (see the TODO in storage.py: "move storage-efficiency into a shared parameter for the first device belonging to a shared storage"). Physically, storage losses belong to the stock, not to the connected converters, so members of one stock group declaring different storage efficiencies is a modelling smell we currently accept silently.
This also blocks a solver simplification suggested in review of #2282: device_stock is indexed per device, so each member of a stock group carries its own copy of the group's stock recursion. With uniform initial stock (#2321) the only reason these per-device recursions can differ is the per-device storage efficiency. Once storage-efficiency is shared per stock, one stock variable and one balance constraint per group suffices, dropping the redundant secondary recursions (a linear-in-horizon saving per extra group member).
Proposal
Treat storage-efficiency as a per-stock parameter: for multi-device stock groups, require it to be defined on a single entry (consistent with how Track devices via a typed device inventory in the StorageScheduler #2321 treats the other SoC parameters, failing fast on conflicting definitions) and apply the group's efficiency to all members.
Backwards compatibility: entries that all leave storage-efficiency at its default are unaffected; groups where multiple members explicitly define it (even with equal values) would now get a clear validation error instead of silently applying per-device losses to the shared stock.
Context
Since #2321, a shared stock's SoC parameters (
soc-at-start,soc-min,soc-max,soc-targets) must be defined on a single flex-model entry, and every device in a stock group receives the group's initial stock. However,storage-efficiencyis still a per-device flex-model field (see the TODO instorage.py: "move storage-efficiency into a shared parameter for the first device belonging to a shared storage"). Physically, storage losses belong to the stock, not to the connected converters, so members of one stock group declaring different storage efficiencies is a modelling smell we currently accept silently.This also blocks a solver simplification suggested in review of #2282:
device_stockis indexed per device, so each member of a stock group carries its own copy of the group's stock recursion. With uniform initial stock (#2321) the only reason these per-device recursions can differ is the per-device storage efficiency. Once storage-efficiency is shared per stock, one stock variable and one balance constraint per group suffices, dropping the redundant secondary recursions (a linear-in-horizon saving per extra group member).Proposal
storage-efficiencyas a per-stock parameter: for multi-device stock groups, require it to be defined on a single entry (consistent with how Track devices via a typed device inventory in the StorageScheduler #2321 treats the other SoC parameters, failing fast on conflicting definitions) and apply the group's efficiency to all members.device_scheduler, index the stock variable and its balance constraint by stock group instead of by device (follow-up to Speed up device_scheduler with a recursive stock balance #2282's recursive stock balance).Notes
storage-efficiencyat its default are unaffected; groups where multiple members explicitly define it (even with equal values) would now get a clear validation error instead of silently applying per-device losses to the shared stock.