Skip to content

Commit

Permalink
scaled_capital_cost now reported in SC + tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ppinchuk committed Mar 5, 2024
1 parent 4a0fd31 commit f5a2a51
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions reV/supply_curve/points.py
Original file line number Diff line number Diff line change
Expand Up @@ -1980,6 +1980,7 @@ def economies_of_scale(cap_cost_scale, summary):
summary['raw_lcoe'] = eos.raw_lcoe
summary['mean_lcoe'] = eos.scaled_lcoe
summary['capital_cost_scalar'] = eos.capital_cost_scalar
summary['scaled_capital_cost'] = eos.scaled_capital_cost

return summary

Expand Down
4 changes: 4 additions & 0 deletions tests/test_econ_of_scale.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ def test_econ_of_scale_baseline():
sc_df = pd.read_csv(out_fp_sc + ".csv")
assert np.allclose(base_df['mean_lcoe'], sc_df['mean_lcoe'])
assert (sc_df['capital_cost_scalar'] == 1).all()
assert np.allclose(sc_df['mean_capital_cost'],
sc_df['scaled_capital_cost'])


def test_sc_agg_econ_scale():
Expand Down Expand Up @@ -225,6 +227,8 @@ def test_sc_agg_econ_scale():
/ aep + data['variable_operating_cost'])

assert np.allclose(scalars, sc_df['capital_cost_scalar'])
assert np.allclose(scalars * sc_df['mean_capital_cost'],
sc_df['scaled_capital_cost'])

assert np.allclose(true_scaled_lcoe, sc_df['mean_lcoe'])
assert np.allclose(true_raw_lcoe, sc_df['raw_lcoe'])
Expand Down

0 comments on commit f5a2a51

Please sign in to comment.