Skip to content

Commit

Permalink
fix OM bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrunik committed Jul 11, 2024
1 parent 37d4fb7 commit 2f62048
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions greenheart/tools/eco/finance.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,18 +530,18 @@ def run_opex(

# solar opex
if "pv" in hopp_config["technologies"].keys():
solar_opex = hopp_results["hybrid_plant"].pv.om_fixed + np.sum(
hopp_results["hybrid_plant"].pv.om_variable
)
solar_opex = hopp_results["hybrid_plant"].pv.om_total_expense[
0
]
if solar_opex < 0.1:
raise (RuntimeWarning(f"Solar OPEX returned as {solar_opex}"))
else:
solar_opex = 0.0

# battery opex
if "battery" in hopp_config["technologies"].keys():
battery_opex = hopp_results["hybrid_plant"].battery.om_fixed + np.sum(
hopp_results["hybrid_plant"].battery.om_variable
battery_opex = (np.sum(hopp_results["hybrid_plant"].battery.om_fixed)
* hopp_config["technologies"]["battery"]["system_capacity_kw"]
)
if battery_opex < 0.1:
raise (RuntimeWarning(f"Battery OPEX returned as {battery_opex}"))
Expand Down

0 comments on commit 2f62048

Please sign in to comment.