windfarm

class off.windfarm.WindFarm(turbines: List[Turbine])

Bases: object

Wind Farm Attributes

turbinesList[Turbine]

List of turbine objects which form the wind farm

dependenciesnp.ndarray (with boolean entries)

Row i describes which turbines influence turbine i. The main diagonal should always be ‘True’.

nTint

Number of turbines in the wind farm

add_turbine(turb: Turbine) int

Adds another turbine to the list

Parameters:

turb (Turbine) – Turbine class object which describes the new turbine

Returns:

index of the newly added turbine object

Return type:

int

dependencies: ndarray
get_current_turbine_states() ndarray

Collects and returns the current turbine states of the turbines

Returns:

[n_t x m] matrix with current turbine states at the turbine locations

Return type:

np.ndarray

get_layout() ndarray

Gets the current wind farm layout and diameters

Returns:

[n_t x 4] matrix with wind farm layout in the world coordinate system and turbine diameter

Return type:

np.ndarray

get_op_world_coordinates() ndarray

Collects and returns all OP world locations

Returns:

x,y,z coordiates of the OPs (in m)

Return type:

np.ndarray

get_sub_windfarm(indices)

Creates a subset of the wind farm with the turbines at the given indices

Parameters:

indices (int[]) –

Return type:

turbines array

nT: int
rmv_turbine(ind: int) Turbine

Removes a turbine from the wind farm

Parameters:

ind (int) – Index of the turbine to remove

Returns:

removed turbine object

Return type:

Turbine

set_dependencies(dependencies: ndarray)
Parameters:

dependencies (np.ndarray) – boolean array with dependencies - true if there is a dependency, false if not

turbines: List[Turbine]