optiwindnet.augmentation ======================== .. py:module:: optiwindnet.augmentation Module Contents --------------- .. py:function:: get_shape_to_fill(L: networkx.Graph) -> tuple[optiwindnet.geometric.CoordPairs, optiwindnet.geometric.CoordPairs] 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). .. py:function:: 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 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. :param T: number of points to place. :param min_dist: minimum distance between place points. :param BorderC: coordinates (B × 2) of border polygon. :param RepellerC: coordinates (R × 2) of the centers of forbidden discs. :param repel_radius: the radius of the forbidden discs. :param obstacleC__: sequence of coordinate arrays (X × 2). :param max_iter: total dart-throw iteration budget. :param partial_fulfilment: whether to return or reject a partial result. :param single_run: whether to disable adaptive restarts. :returns: coordinates (T, 2) of placed points .. py:function:: 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 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. :param L: reference location (only borders, obstacles and substations are used) :param T: desired number of turbines to place :param d: minimum spacing between turbines :param root_clearance: minimum spacing from turbine to substation (if not given, ``d`` is used) :param max_iter: total placement iteration budget. :param rounds: deprecated multiplier for ``max_iter``. :param single_run: whether to disable adaptive restarts. :returns: A location with randomly placed turbines (the number may be lower than T)