Version Checks (indicate both or one)
Issue Description
When setting a p_set time series in the storage unit component and running an optimization, the operation of the storage unit remain unconstrained. while you can fix p_discharge and p_store individually, the combination is much more intuitive and aligned with the other components.
I realize now, that this could also be a feature request, depending on how you see it.
Reproducible Example
import pypsa
n = pypsa.Network()
n.set_snapshots(range(4))
n.add("Bus", "bus")
n.add("Generator", "gen", bus="bus", control="Slack", p_nom=100)
n.add("Load", "load", bus="bus", p_set=[20, 30, 25, 35])
n.add(
"StorageUnit",
"storage",
bus="bus",
p_nom=50,
max_hours=2,
p_set=[10, -15, 5, -10], # positive=discharge, negative=charge
)
n.optimize()
Expected Behavior
In order to be consistent with the other components p_set would need to fix combined p_dispatch - p_store.
Installed Versions
Details
Replace this line.
Version Checks (indicate both or one)
I have confirmed this bug exists on the lastest release of PyPSA.
I have confirmed this bug exists on the current
masterbranch of PyPSA.Issue Description
When setting a
p_settime series in the storage unit component and running an optimization, the operation of the storage unit remain unconstrained. while you can fixp_dischargeandp_storeindividually, the combination is much more intuitive and aligned with the other components.I realize now, that this could also be a feature request, depending on how you see it.
Reproducible Example
Expected Behavior
In order to be consistent with the other components
p_setwould need to fix combinedp_dispatch - p_store.Installed Versions
Details
Replace this line.