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

nominal_value=1 bounds flow variable without min/max/fix being set

Open lensum opened this issue 2 years ago • 3 comments

Describe the bug If the attribute nominal_value=1 is set in a flow without setting either one of min/max/fix, the flow variable seems to be bounded to 1.

To Reproduce Steps to reproduce the behavior:

  1. Set up an energysystem model
  2. Create a sink with fixed demand > 1, fed from a transformer
  3. Set nominal_value=1 in the transformer outflow
  4. Try to solve the resulting model

Expected behavior

  • A raised warning if nominal_value is set without min/max/fix being set
  • Documentation of default values for min/max arguments

Desktop (please complete the following information):

  • oemof.solph version: 0.4.5

Additional context Might be related to: https://github.com/oemof/oemof-solph/issues/818

lensum avatar May 09 '22 13:05 lensum

This is because the default value of max is 1. https://github.com/oemof/oemof-solph/blob/7e341fdd041c38da8dfbb95867bb3a5bbc9bbe15/src/oemof/solph/network/flow.py#L182-L183 We could tell about this in the docstring.

jnnr avatar May 09 '22 14:05 jnnr

We should just state that ’max’ has a default value of 1. When we touch the docstring, we should also delete the parameter fixed, which is no longer used.

p-snft avatar May 11 '22 20:05 p-snft

@joroeder @DFuh this might be fixed with #881 ?

lensum avatar Nov 10 '22 16:11 lensum