Constraints
Boundary constraints
XYBoundaryConstraint
- class topfarm.constraint_components.boundary.XYBoundaryConstraint(boundary, boundary_type='convex_hull', units=None, relaxation=False, **kwargs)[source]
- __init__(boundary, boundary_type='convex_hull', units=None, relaxation=False, **kwargs)[source]
Initialize XYBoundaryConstraint
- Parameters:
boundary (array_like (n,2) or list of tuples (array_like (n,2), boolean)) – boundary coordinates. If boundary is array_like (n,2) it indicates a single boundary and can be used with boundary types: ‘convex_hull’, ‘polygon’, ‘rectangle’,’square’. If boundary is list of tuples (array_like (n,2), boolean), it is multiple boundaries where the boolean is 1 for inclusion zones and 0 for exclusion zones and can be used with the boundary type: ‘multi_polygon’.
boundary_type ('convex_hull', 'polygon', 'rectangle','square') –
‘convex_hull’ (default): Convex hul around boundary points
’polygon’: Polygon boundary (may be non convex). Less suitable for gradient-based optimization
’rectangle’: Smallest axis-aligned rectangle covering the boundary points
’square’: Smallest axis-aligned square covering the boundary points
’multi_polygon’: Mulitple polygon boundaries incl. exclusion zones (may be non convex).
’turbine_specific’: Set of multiple polygon boundaries that depend on the wind turbine type.
CircleBoundaryConstraint
Other constraints
SpacingConstraint
- class topfarm.constraint_components.spacing.SpacingConstraint(min_spacing, units=None, aggregation_function=None, full_aggregation=False, name='spacing_comp')[source]