oemof-solph icon indicating copy to clipboard operation
oemof-solph copied to clipboard

Multiple Outputs for OffsetConverter

Open lensum opened this issue 1 year ago • 2 comments

This PR enables the OffsetConverter to output two (or more) flows with part-load depending efficiencies.

  1. outputs are allowed to contain multiple busses.
  2. 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!
  3. The issues discussed in https://github.com/oemof/oemof-solph/issues/1010 are fixed (misleading docu, usage guide and erroneous example).

lensum avatar Feb 16 '24 15:02 lensum

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

pep8speaks avatar Feb 16 '24 15:02 pep8speaks

Can't figure out what problem tox is having, would be glad for a hint in case someone knows!

lensum avatar Feb 18 '24 20:02 lensum

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.

p-snft avatar May 16 '24 12:05 p-snft

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.

fwitte avatar May 16 '24 13:05 fwitte

I see. Then, I accept this (also as a fix to #1053).

p-snft avatar May 16 '24 19:05 p-snft

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 :).

fwitte avatar May 16 '24 19:05 fwitte