Skip to content

Commit

Permalink
added loop for battery om
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrunik committed Aug 12, 2024
1 parent ea552b7 commit c44917f
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions greenheart/simulation/greenheart_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,18 +358,19 @@ def setup_greenheart_simulation(config: GreenHeartSimulationConfig):
"om_capacity"
][0] != config.hopp_config["config"]["cost_info"]["battery_om_per_kw"]
):
config.hopp_config["technologies"]["battery"]["fin_model"]["system_costs"][
"om_capacity"
][i] = config.hopp_config["config"]["cost_info"]["battery_om_per_kw"]

# Use this to set the Production-based O&M amount [$/MWh]
# config.hopp_config['technologies']['battery']['fin_model']['system_costs']['om_production'] =

om_batt_fixed_cost = config.hopp_config["technologies"]["battery"]["fin_model"]["system_costs"]["om_capacity"][i]
battery_om_per_kw = config.hopp_config["config"]["cost_info"]["battery_om_per_kw"]
warnings.warn(f"'om_capacity' in the battery 'fin_model' was {om_batt_fixed_cost}, but 'battery_om_per_kw' in"
f"'cost_info' was {battery_om_per_kw}. The 'om_capacity' value in the battery 'fin_model'"
"is being overwritten with the value from the 'cost_info'", UserWarning)
for i in range(len(config.hopp_config["technologies"]["battery"]["fin_model"]["system_costs"]["om_capacity"])):
config.hopp_config["technologies"]["battery"]["fin_model"]["system_costs"][
"om_capacity"
][i] = config.hopp_config["config"]["cost_info"]["battery_om_per_kw"]

# Use this to set the Production-based O&M amount [$/MWh]
# config.hopp_config['technologies']['battery']['fin_model']['system_costs']['om_production'] =

om_batt_fixed_cost = config.hopp_config["technologies"]["battery"]["fin_model"]["system_costs"]["om_capacity"][i]
battery_om_per_kw = config.hopp_config["config"]["cost_info"]["battery_om_per_kw"]
warnings.warn(f"'om_capacity' in the battery 'fin_model' was {om_batt_fixed_cost}, but 'battery_om_per_kw' in"
f"'cost_info' was {battery_om_per_kw}. The 'om_capacity' value in the battery 'fin_model'"
"is being overwritten with the value from the 'cost_info'", UserWarning)

# setup HOPP model
hi = he_hopp.setup_hopp(
Expand Down

0 comments on commit c44917f

Please sign in to comment.