Skip to content

Commit

Permalink
Fix units + tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ppinchuk committed Oct 23, 2024
1 parent eb2faa0 commit 2d1853b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion reV/supply_curve/points.py
Original file line number Diff line number Diff line change
Expand Up @@ -2194,7 +2194,7 @@ def _compute_cost_per_ac_mw(self, dset):
return None

sam_cost = self.exclusion_weighted_mean(self.gen[dset])
sam_cost_per_mw = sam_cost / self._sam_system_capacity_kw
sam_cost_per_mw = sam_cost / (self._sam_system_capacity_kw / 1000)
sc_point_cost = sam_cost_per_mw * self.capacity

ac_cap = (self.capacity
Expand Down
2 changes: 1 addition & 1 deletion tests/test_econ_of_scale.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def test_econ_of_scale_baseline(request_h5):
capital_cost_per_mw = SupplyCurveField.COST_SITE_OCC_USD_PER_AC_MW
assert np.allclose(sc_df['mean_capital_cost'],
sc_df[capital_cost_per_mw]
* data["system_capacity"])
* data["system_capacity"] / 1000)
assert np.allclose(sc_df[SupplyCurveField.COST_BASE_OCC_USD_PER_AC_MW],
sc_df[SupplyCurveField.COST_SITE_OCC_USD_PER_AC_MW])

Expand Down
6 changes: 3 additions & 3 deletions tests/test_supply_curve_sc_aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,9 +606,9 @@ def test_recalc_lcoe(cap_cost_scale):
* summary[SupplyCurveField.CAPACITY_AC_MW])
voc = (summary[SupplyCurveField.COST_SITE_VOC_USD_PER_AC_MW]
* summary[SupplyCurveField.CAPACITY_AC_MW])
aep = summary[SupplyCurveField.SC_POINT_ANNUAL_ENERGY_MWH] * 1000
aep_kwh = summary[SupplyCurveField.SC_POINT_ANNUAL_ENERGY_MWH] * 1000

lcoe = lcoe_fcr(fcr, cap_cost, foc, aep, voc)
lcoe = lcoe_fcr(fcr, cap_cost, foc, aep_kwh, voc)
assert np.allclose(lcoe, summary[SupplyCurveField.MEAN_LCOE])

cap_cost = (summary[SupplyCurveField.COST_BASE_OCC_USD_PER_AC_MW]
Expand All @@ -620,7 +620,7 @@ def test_recalc_lcoe(cap_cost_scale):
voc = (summary[SupplyCurveField.COST_BASE_VOC_USD_PER_AC_MW]
* summary[SupplyCurveField.CAPACITY_AC_MW])

lcoe = lcoe_fcr(fcr, cap_cost, foc, aep, voc)
lcoe = lcoe_fcr(fcr, cap_cost, foc, aep_kwh, voc)
assert np.allclose(lcoe, summary[SupplyCurveField.MEAN_LCOE])


Expand Down

0 comments on commit 2d1853b

Please sign in to comment.