modex-flexmex / oemof-flexmex

oemof-flexmex is an oemof model built for model comparison within the Modex project FlexMex.
https://oemof-flexmex.readthedocs.io
MIT License
0 stars 0 forks source link

Feature: AsymmetricStorage #59

Closed unndreay closed 4 years ago

unndreay commented 4 years ago

This introduces an asymmetric storage derived from tabular 'Storage'.

Asymmetric means, that each the charging and the discharging device can be parametrized different.

unndreay commented 4 years ago

The test for investment optimization reveals that tabular's Facade._investment() method has to be adapted as well:

Traceback (most recent call last):
  File "/home/unndreay/Workspaces/oemo-flex/tests/run_test.py", line 6, in <module>
    test_facades.check_asymmetric_storage_optimize_investment()
  File "/home/unndreay/Workspaces/oemo-flex/tests/test_facades.py", line 168, in check_asymmetric_storage_optimize_investment
    initial_storage_level=0,  # oemof.solph argument
  File "/home/unndreay/Workspaces/oemo-flex/oemoflex/facades.py", line 67, in __init__
    self.build_solph_components()
  File "/home/unndreay/Workspaces/oemo-flex/oemoflex/facades.py", line 79, in build_solph_components
    self.investment = self._investment()
  File "/home/unndreay/Workspaces/oemof-tabular/src/oemof/tabular/facades.py", line 91, in _investment
    if self.capacity_cost is None:
AttributeError: 'AsymmetricStorage' object has no attribute 'capacity_cost'

See https://github.com/oemof/oemof-tabular/blob/master/src/oemof/tabular/facades.py#L84-L91

unndreay commented 4 years ago

Chosen tech type name with a space to be in line with techs "electrical line" and "electrical bus".

jnnr commented 4 years ago

Open todo: Clean up the tests.