Problem with Link efficiency

64 views
Skip to first unread message

J Langer

unread,
Feb 5, 2025, 9:44:01 AM2/5/25
to pypsa
Dear PyPSA team,

I am trying to model the dispatch of a simple network consisting of three nodes connected via links and I am facing the following issue:

If all nodes are linked to each other like a triangle (using the Link component, not the Line component), then the model only returns reasonable results if the link efficiencies are 1. If any of the link efficiencies is set to anything between 0 and 1, then the model still solves, but the solution is trivial, i.e., the network.generators_t.p consists of only zeros.

If the three nodes are linked in series, i.e. not as a triangle, then the model works just fine even if an efficiency between 0 and 1 is applied.

Any ideas about what I did wrong? Thanks for your help in advance!

Fabian Neumann

unread,
Feb 15, 2025, 4:43:56 AM2/15/25
to pypsa
Hi Jannis,

not exactly sure what goes wrong in your specific case, but I can give a few general pointers:

- Links are unidirectional by default (from bus0 to bus1).
- They can be set to be bidirectional by setting p_min_pu=-1. In this case, the efficiency needs to be 1 as otherwise running the link in reverse "creates" energy.
- If you want to model lossy transport, you need to links with efficiency<1 and an extra constraint that links the capacity variables of the two links in case they are expandable (see https://github.com/PyPSA/pypsa-eur/blob/a91a3346ae4e8e22690ac945b4a337ef6e09d00b/scripts/solve_network.py#L820-L831).

Best wishes,

Fabian N
Reply all
Reply to author
Forward
0 new messages