oemof-solph
oemof-solph copied to clipboard
Fixed costs of storage
I don't get, why this
https://github.com/oemof/oemof-solph/blob/1cee273d3328fe00daf092f6bdfe9d227573a443/src/oemof/solph/components/_generic_storage.py#L591
can be false. (How can n.fixed_costs[0]
be None?)
I don't get, why this
https://github.com/oemof/oemof-solph/blob/1cee273d3328fe00daf092f6bdfe9d227573a443/src/oemof/solph/components/_generic_storage.py#L591
can be false. (How can
n.fixed_costs[0]
be None?)
You're right about that. I guess, the default values used to be None or I referred to another passage that was structured alike without giving it much thought. I guess that check could be safely removed.
@p-snft I see two options for this:
- Setting the default value for
fixed_costs
toNone
, which is the default value for anInvestment
object e.g. - Removing this test since as you stated above, it cannot be False.
I'd vote in favour of 1. What do you think?
I see two additional options:
- Test if all entries of the sequence are zero. (Sequence might be made aware if it's really representing a time-dependent value or always returning the same value for evcery index, so the test might come with almost no computational overhead.)
- Cast to sequence at a later point in time. (So you easily know if it's just zero.)
As all options improve the performance with respect to the current situation and just dropping the test is the simplest one, I'd opt to do this for now. we can implement performance optimisations later.