Skip to content

Commit

Permalink
Merge pull request #67 from wind-python/fix/round_total_capacity
Browse files Browse the repository at this point in the history
Round values in total_capacity check
  • Loading branch information
birgits committed Aug 26, 2019
2 parents cc0c880 + ba03c61 commit 3e58a6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions windpowerlib/wind_farm.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ def check_and_complete_wind_turbine_fleet(self):
'wind turbine is set.'.format(
turbine=row['wind_turbine']))
else:
if not row['total_capacity'] == (
if not abs(row['total_capacity'] - (
row['number_of_turbines'] *
row['wind_turbine'].nominal_power):
row['wind_turbine'].nominal_power)) < 1:
self.wind_turbine_fleet.loc[ix, 'total_capacity'] = \
row['number_of_turbines'] * \
row['wind_turbine'].nominal_power
Expand Down

0 comments on commit 3e58a6a

Please sign in to comment.