From c44917f5b72994b390ed3b00e726f022dca3ef84 Mon Sep 17 00:00:00 2001 From: kbrunik Date: Mon, 12 Aug 2024 16:53:17 -0500 Subject: [PATCH] added loop for battery om --- .../simulation/greenheart_simulation.py | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/greenheart/simulation/greenheart_simulation.py b/greenheart/simulation/greenheart_simulation.py index aeda4cf9a..ffd1870af 100644 --- a/greenheart/simulation/greenheart_simulation.py +++ b/greenheart/simulation/greenheart_simulation.py @@ -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(