Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUGFIX: GenericStorage investment initialization #989

Merged
merged 1 commit into from
Oct 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/oemof/solph/components/_generic_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def __init__(
if isinstance(nominal_storage_capacity, numbers.Real):
self.nominal_storage_capacity = nominal_storage_capacity
elif isinstance(nominal_storage_capacity, Investment):
self.investment = investment
self.investment = nominal_storage_capacity
self._invest_group = True

self.initial_storage_level = initial_storage_level
Expand All @@ -235,11 +235,9 @@ def __init__(
self.min_storage_level = solph_sequence(min_storage_level)
self.fixed_costs = solph_sequence(fixed_costs)
self.storage_costs = solph_sequence(storage_costs)
self.investment = investment
self.invest_relation_input_output = invest_relation_input_output
self.invest_relation_input_capacity = invest_relation_input_capacity
self.invest_relation_output_capacity = invest_relation_output_capacity
self._invest_group = isinstance(self.investment, Investment)
self.lifetime_inflow = lifetime_inflow
self.lifetime_outflow = lifetime_outflow

Expand Down
Loading