We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e58a6a commit 5dbddcbCopy full SHA for 5dbddcb
windpowerlib/wind_turbine.py
@@ -198,6 +198,16 @@ def __repr__(self):
198
199
return turbine_repr
200
201
+ def to_group(self, number_turbines=None, total_capacity=None):
202
+ if number_turbines is not None and total_capacity is not None:
203
+ raise ValueError("The 'number' and the 'total_capacity are"
204
+ " mutually exclusive. Use just one of them.")
205
+ elif total_capacity is not None:
206
+ number_turbines = total_capacity / self.nominal_power
207
+ elif number_turbines is None:
208
+ number_turbines = 1
209
+ return {'wind_turbine': self, 'number_of_turbines': number_turbines}
210
+
211
212
def get_turbine_data_from_file(turbine_type, path):
213
r"""
0 commit comments