Bus connection patterns in oemof.solph: Bus, Link, and Converter

Hello oemof community,

I am working with oemof.solph and a question regarding the connection of two Buses occurred. My question is specifically about connecting buses without representing an actual energy conversion (e.g. electricity to heat), where using a Converter is the obvious choice. As far as I understand, there are different possibilities:

-Bus to Bus directly
-Bus to Converter to Bus
-Bus to Link to Bus

I was wondering whether there are recommended use cases for each of these options or if there is a general modeling philosophy within oemof. From my understanding and research I would assume the following:

-Busto Bus: Should/ can be used for directed or undirected connection without losses (e.g., an electricity bus and an EV bus, this came up in another Q&A by Patrik Schönfeldt here)
-Busto Link to Bus: Should/ can be used for bidirectional connection with losses (e.g., two electricity buses representing different regions connected by a transmission line).
-Busto Converter to Bus: Should/ can be used for directed connections with losses (e.g., two heat buses connected via a pipe with losses)

Is this understanding correct? One other observation. If I try to use a Link for a directed connection by defining only one input, one output, and a single efficiency factor, I get a SuspiciousUsageWarning: Component Link should have exactly 2 inputs, 2 outputs, and 2 conversion factors connecting these. Now this could be avoided by disabling SuspiciousUsageWarning globally or by building it with two inputs and outputs and deleting one part of it. However, I assume this is not the intended way to use it, which is why I currently assume a Converter should be used for such an application.

I would be interested in other perspectives on how this is intended to be used and how you structure the connection of Buses in practice. Thank you in advance.

Hi @Marco,

what you say is generally correct. When I teach solph, however, I typically just skip the Link, as it does not add a functionality. Instead, you can take two Converters to make the same thing more explicit. (To my understanding, the Link is mostly there for backward compatibility. Removing it at our side would break user code without any real benefit.)

If you follow that approach, it becomes really clear:

  • No gains or losses: Direct connection BusBus.
  • With gains or losses: Connection BusConverterBus.

PS: Thank you for the question. You inspired me to try to change the Link to be clearer about its internal logic.

Hi @pschoen,

thank you for your quick response. This is very helpful! Representing a Link with two Converters makes sense to me and makes the model probably even clearer. It’s also helpful to know that the Link is then essentially obsolete in this context.

Thanks again for the explanation, and glad the question sparked something useful on your end too!