Wildcard EQ and spills

10 views
Skip to first unread message

Felix Delgado Elizundia

unread,
Nov 2, 2022, 6:37:31 AM11/2/22
to pypsa
Hi everyone!
Am testing out the EQ functionality and have noticed that the program fails during the solve_network rule because it fails to find:
        get_var(n, "StorageUnit", "spill").T)
This is the case when there is no hydro involved, but other storage units are (H2, battery)
Is there something that could be done to the script? 

Thank you in advance

Felix D.

Fabian Neumann

unread,
Nov 2, 2022, 6:48:20 AM11/2/22
to pypsa
Hi Felix,

ah, yes, this extra functionality has been written assuming the presence of hydro units.

You'd need to rewrite the function such that code passages handling the storage are skipped, e.g. by testing wether n.storage_units is empty:

if not n.storage_units.empty:
    # add storage terms to constraint

Best wishes.

Fabian N
Reply all
Reply to author
Forward
0 new messages