oemof-solph: Misleading/missing documentation of OffsetConverter
Describe the bug
In the usage documentation for the OffsetTransformer an example is given to calculate the coefficients c0 and c1. If calculated like this, the results are illogical. I narrowed it down to the calculation of c0, which should actually look like this:
c0 = (P_out_max-c1*P_in_max)/P_out_max
Which means, that c0 isn’t really the y-intercept anymore (which would be c0 = P_out_max-c1*P_in_max).
Possible solutions I see two possible solutions:
- Fix the documentation to include the example calculations of the parameters described above, or
- Change the calculation in the
OffsetConverterBlockto not multiply with thestatus_nominal(which is the product ofP_max(t) * Y(t)) but with thestatusvariable. This way,c0would remain to be the y-intercept, which, from a mathematical, logical and usage standpoint seems much nicer to me.
Am I overlooking something here or doing something wrong? I’m actually a bit surprised that this has not been noticed before.
About this issue
- Original URL
- State: open
- Created 8 months ago
- Comments: 18 (17 by maintainers)
@lensum @p-snft Noticed one more misleading in the (usage documentation for the OffsetTransformer), that the Nonconvex flow is given in inputs of the converter but in the source code it says that the Nonconvex attribute must be defined only for the output flow:
if len(self.inputs): if v.nonconvex: raise TypeError( "NonConvex attribute must be defined only for the " + "output flow!" )I might be assuming it incorrectly, please correct me if it intended.Nice, I like it 😃