From c0fa7a400a32024496d738e59efb01cf96aa0c6f Mon Sep 17 00:00:00 2001 From: ppinchuk Date: Thu, 13 Jun 2024 11:47:40 -0600 Subject: [PATCH] Add extra check for lcoe correctness --- tests/test_supply_curve_sc_aggregation.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_supply_curve_sc_aggregation.py b/tests/test_supply_curve_sc_aggregation.py index 1a3cd6610..99e4737f9 100644 --- a/tests/test_supply_curve_sc_aggregation.py +++ b/tests/test_supply_curve_sc_aggregation.py @@ -581,6 +581,16 @@ def test_recalc_lcoe(cap_cost_scale): summary[SupplyCurveField.COST_SITE_OCC_USD_PER_AC_MW] / summary[SupplyCurveField.COST_BASE_OCC_USD_PER_AC_MW]) + expected_recalc_lcoe = lcoe_fcr(data["fixed_charge_rate"], + data["capital_cost"], + data["fixed_operating_cost"], + data["system_capacity"] + * np.array(annual_cf).mean() + * 8760, + data["variable_operating_cost"]) + assert np.allclose(summary[SupplyCurveField.MEAN_LCOE], + expected_recalc_lcoe) + fcr = summary[SupplyCurveField.FIXED_CHARGE_RATE] cap_cost = (summary[SupplyCurveField.COST_SITE_OCC_USD_PER_AC_MW] * summary[SupplyCurveField.CAPACITY_AC_MW])