oemof-solph
oemof-solph copied to clipboard
Multiple Outputs for OffsetConverter
This PR enables the OffsetConverter to output two (or more) flows with part-load depending efficiencies.
-
outputs
are allowed to contain multiple busses. -
coefficients
expects a dictionary, where the keys are the output busses and the values are the tuples containing the necessary parameters. I took the liberty to implement a deprecation warning for the old behaviour (passing a tuple without specifying the output bus it corresponds to). This way, the OffsetConverter is more in line with the regular Converter and there is less room for confusion. But this is totally up for debate! - The issues discussed in https://github.com/oemof/oemof-solph/issues/1010 are fixed (misleading docu, usage guide and erroneous example).
Hello @lensum! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:
Comment last updated at 2024-05-16 19:08:40 UTC
Can't figure out what problem tox
is having, would be glad for a hint in case someone knows!
I'd suggest to close this and have an example that models the same thing using multiple components instead. @fwitte asked about an electrolyser and waste heat, but the example could also be a CHP with increasing electrical and reducing thermal efficiency towards full load.
I also quickly looked into the OffsetConverter
, and I would now actually suggest implementing this feature (I already did locally before I found this PR)... It is quite straight forward, and it could be done using only a single binary variable.
I see. Then, I accept this (also as a fix to #1053).
I will make another PR, I would like to change the naming conventions and styles of the equations (to have the exact same structure as in the Converter
, i.e. using conversion_factors
, which should be supplied by a dictionary using the keywords offset
and slope
or something like that). We can discuss there then :).