Interface with WindIO format
Currently a wind farm site defined according to IEAWindTask37/windIO has to be converted explicitly:
# Load Regular layout from YAML file
regular_system = load_yaml('IEA37_Borssele/IEA37_Borssele_Regular_System.yaml',
Loader)
turbine_pos = np.array([
regular_system['wind_farm']['layouts']['initial_layout']['coordinates']['x'],
regular_system['wind_farm']['layouts']['initial_layout']['coordinates']['y']
])
substation_pos = np.array([
regular_system['wind_farm']['electrical_substations']['coordinates']['x'],
regular_system['wind_farm']['electrical_substations']['coordinates']['y']
])
main_parcel = np.array([regular_system['site']['boundaries']['polygons'][0]['x'],
regular_system['site']['boundaries']['polygons'][0]['y']])
site_info = {'site_name': regular_system['name'],
'handle': 'iea37reg',
'boundary': main_parcel.T}
wfn = WindFarmNetwork(turbine_positions=turbine_pos,
substation_positions=substation_pos,
drivers=[InterArrayDriver(**interarray_setting)],
sequence=[0],
cables=cables,
site_info=site_info)
It would be much easier for the user to just do something like:
wfn = WindFarmNetwork(from_windio='some_farm.yaml',
cables=cables,
drivers=[some_driver, ...])
Edited by Mauricio Souza de Alencar