optiwindnet.augmentationΒΆ

Module ContentsΒΆ

optiwindnet.augmentation.get_shape_to_fill(L: networkx.Graph) tuple[optiwindnet.geometric.CoordPairs, optiwindnet.geometric.CoordPairs][source]ΒΆ

Calculate the area and scale the border so that it has area 1.

The border and OSS are translated to the 1st quadrant, near the origin.

IF SITE HAS MULTIPLE OSSs, ONLY 1 IS RETURNED (mean of the OSSs’ coords).

optiwindnet.augmentation.poisson_disc_filler(T: int, min_dist: float, BorderC: optiwindnet.geometric.CoordPairs, RepellerC: optiwindnet.geometric.CoordPairs | None = None, repel_radius: float = 0.0, obstacleC__: list[optiwindnet.geometric.CoordPairs] = [], seed: int | None = None, max_iter: int = 30000, plot: bool = False, partial_fulfilment: bool = True, single_run: bool = False) optiwindnet.geometric.CoordPairs[source]ΒΆ

Randomly place points inside an area respecting a minimum separation.

Fills the area delimited by BorderC with T randomly placed points that are at least min_dist apart and that don’t fall inside any of the RepellerC discs or obstacles areas.

max_iter is shared by all attempts. The sampler restarts when the current placement rate cannot meet the remaining target and sufficient budget remains for a new attempt.

Parameters:
  • T – number of points to place.

  • min_dist – minimum distance between place points.

  • BorderC – coordinates (B Γ— 2) of border polygon.

  • RepellerC – coordinates (R Γ— 2) of the centers of forbidden discs.

  • repel_radius – the radius of the forbidden discs.

  • obstacleC – sequence of coordinate arrays (X Γ— 2).

  • max_iter – total dart-throw iteration budget.

  • partial_fulfilment – whether to return or reject a partial result.

  • single_run – whether to disable adaptive restarts.

Returns:

coordinates (T, 2) of placed points

optiwindnet.augmentation.turbinate(L: networkx.Graph, T: int, d: float, *, root_clearance: float | None = None, plot: bool = False, max_iter: int = 100000, rounds: int | None = None, single_run: bool = False) networkx.Graph[source]ΒΆ

Fills the location L with T turbines spaced at least d apart.

Only the border and root locations from L are used.

The placement of turbines is random and some combinations of T and d will result in fewer placements than requested. Increase max_iter to apply more effort before aborting.

Parameters:
  • L – reference location (only borders, obstacles and substations are used)

  • T – desired number of turbines to place

  • d – minimum spacing between turbines

  • root_clearance – minimum spacing from turbine to substation (if not given, d is used)

  • max_iter – total placement iteration budget.

  • rounds – deprecated multiplier for max_iter.

  • single_run – whether to disable adaptive restarts.

Returns:

A location with randomly placed turbines (the number may be lower than T)