Skip to content

Commit

Permalink
Fix new values if mean_h5_dsets_data is None
Browse files Browse the repository at this point in the history
  • Loading branch information
ppinchuk committed Mar 6, 2024
1 parent 7f635ee commit 92e1f48
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions reV/supply_curve/points.py
Original file line number Diff line number Diff line change
Expand Up @@ -1802,14 +1802,16 @@ def sc_point_capital_cost(self):
This method scales the capital cost based on the included-area
capacity. The calculation requires 'capital_cost' and
'system_capacity' in the generation file, otherwise it returns
`None`.
'system_capacity' in the generation file and passed through as
`h5_dsets`, otherwise it returns `None`.
Returns
-------
sc_point_capital_cost : float | None
Total supply curve point capital cost ($).
"""
if self.mean_h5_dsets_data is None:
return None

required = ('capital_cost', 'system_capacity')
if not all(k in self.mean_h5_dsets_data for k in required):
Expand All @@ -1826,13 +1828,16 @@ def sc_point_fixed_operating_cost(self):
This method scales the fixed operating cost based on the
included-area capacity. The calculation requires
'fixed_operating_cost' and 'system_capacity' in the generation
file, otherwise it returns `None`.
file and passed through as `h5_dsets`, otherwise it returns
`None`.
Returns
-------
sc_point_fixed_operating_cost : float | None
Total supply curve point fixed operating cost ($).
"""
if self.mean_h5_dsets_data is None:
return None

required = ('fixed_operating_cost', 'system_capacity')
if not all(k in self.mean_h5_dsets_data for k in required):
Expand Down

0 comments on commit 92e1f48

Please sign in to comment.