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

Fixed costs of storage

Open p-snft opened this issue 1 year ago • 3 comments

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?)

p-snft avatar Jul 31 '23 18:07 p-snft

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.

jokochems avatar Aug 04 '23 15:08 jokochems

@p-snft I see two options for this:

  1. Setting the default value for fixed_costs to None, which is the default value for an Investment object e.g.
  2. Removing this test since as you stated above, it cannot be False.

I'd vote in favour of 1. What do you think?

jokochems avatar Aug 11 '23 09:08 jokochems

I see two additional options:

  1. 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.)
  2. 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.

p-snft avatar Aug 11 '23 09:08 p-snft