Skip to content

Commit

Permalink
fix bug where the presence of skip_financial caused the skip, rather …
Browse files Browse the repository at this point in the history
…than the value
  • Loading branch information
jaredthomas68 committed Oct 3, 2024
1 parent 5852b2d commit ac73efb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hopp/simulation/hybrid_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ def _aggregate_financial_output(self, name, start_index=None, end_index=None) ->
out = self.outputs_factory.create()
for k, v in self.technologies.items():
if k in self.sim_options.keys():
if 'skip_financial' in self.sim_options[k].keys():
if 'skip_financial' in self.sim_options[k].keys() and self.sim_options[k]['skip_financial']:
continue
val = getattr(v, name)
if start_index and end_index:
Expand Down
10 changes: 9 additions & 1 deletion tests/hopp/test_custom_financial.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,17 @@ def test_hybrid_simple_pv_with_wind_storage_dispatch(site, subtests):
'ppa_price': 0.03
}
}
config = {
"simulation_options": {
"wind": {
"skip_financial": False # test that setting this to false allows financial calculations to run
}
}
}
hopp_config = {
"site": site,
"technologies": power_sources
"technologies": power_sources,
"config": config
}
hi = HoppInterface(hopp_config)
hybrid_plant = hi.system
Expand Down

0 comments on commit ac73efb

Please sign in to comment.