PyPSA icon indicating copy to clipboard operation
PyPSA copied to clipboard

Allow specification of reference bus for cost and efficiencies

Open fneum opened this issue 5 months ago • 0 comments

Currently, cost attributes capital_cost and marginal_cost always refer to bus0. In the same way, efficiencyX refers to the output of busX per bus0.

It has been suggested a couple of times to introduce a new attribute, something like reference_bus, which allows you to specify the reference bus, e.g. bus1.

Example

n.add(
    "Link",
    "electrolyser",
    bus0="electricity",
    bus1="hydrogen",
    capital_cost=XXX, # $/MW_H2/a
    marginal_cost=XXX, # $/MWh_H2
    efficiency=1/0.7, # MWh_e/MWh_H2
)

The inversion of efficiency is a bit quirky... maybe there's a better solution with something like efficiency0 and efficiency1?

fneum avatar Jul 09 '25 09:07 fneum