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
BorderCwithTrandomly placed points that are at leastmin_distapart and that donβt fall inside any of theRepellerCdiscs orobstaclesareas.max_iteris 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
LwithTturbines spaced at leastdapart.Only the border and root locations from
Lare used.The placement of turbines is random and some combinations of
Tanddwill result in fewer placements than requested. Increasemax_iterto 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,
dis 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)