Skip to content

Commit

Permalink
Add bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jokochems committed Oct 13, 2023
1 parent 465ebe4 commit 31c0e92
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/oemof/solph/components/_generic_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ def _objective_expression(self):
if m.es.periods is not None:
for n in self.STORAGES:
if n.fixed_costs[0] is not None:
fixed_costs += (
fixed_costs += sum(
n.nominal_storage_capacity
* n.fixed_costs[pp]
* ((1 + m.discount_rate) ** (-pp))
Expand Down
6 changes: 3 additions & 3 deletions src/oemof/solph/components/experimental/_sink_dsm.py
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ def _objective_expression(self):
)

if g.fixed_costs[0] is not None:
fixed_costs += (
fixed_costs += sum(
max(g.max_capacity_up, g.max_capacity_down)
* g.fixed_costs[pp]
* ((1 + m.discount_rate) ** (-pp))
Expand Down Expand Up @@ -2105,7 +2105,7 @@ def _objective_expression(self):
)

if g.fixed_costs[0] is not None:
fixed_costs += (
fixed_costs += sum(
max(g.max_capacity_up, g.max_capacity_down)
* g.fixed_costs[pp]
* ((1 + m.discount_rate) ** (-pp))
Expand Down Expand Up @@ -4205,7 +4205,7 @@ def _objective_expression(self):
)

if g.fixed_costs[0] is not None:
fixed_costs += (
fixed_costs += sum(
max(g.max_capacity_up, g.max_capacity_down)
* g.fixed_costs[pp]
* ((1 + m.discount_rate) ** (-pp))
Expand Down
2 changes: 1 addition & 1 deletion src/oemof/solph/flows/_simple_flow_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ def _objective_expression(self):
and (i, o) not in self.LIFETIME_FLOWS
and (i, o) not in self.LIFETIME_AGE_FLOWS
):
fixed_costs += (
fixed_costs += sum(
m.flows[i, o].nominal_value
* m.flows[i, o].fixed_costs[pp]
* ((1 + m.discount_rate) ** (-pp))
Expand Down

0 comments on commit 31c0e92

Please sign in to comment.