oemof-solph
oemof-solph copied to clipboard
nominal_value=1 bounds flow variable without min/max/fix being set
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:
- Set up an energysystem model
- Create a sink with fixed demand > 1, fed from a transformer
- Set
nominal_value=1
in the transformer outflow - Try to solve the resulting model
Expected behavior
- A raised warning if
nominal_value
is set withoutmin
/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
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.
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.
@joroeder @DFuh this might be fixed with #881 ?