optiwindnet.heuristics ====================== .. py:module:: optiwindnet.heuristics Package Contents ---------------- .. py:function:: ClassicEW(L: networkx.Graph, capacity: int, delaunay_based: bool = False, maxiter: int = 10000, weightfun: Callable | None = None, weight_attr: str = 'length') -> networkx.Graph Classic Esau-Williams heuristic for C-MST. :param L: location graph :param capacity: max number of terminals in a subtree :param maxiter: fail-safe to avoid locking in an infinite loop :returns: Routeset graph G .. py:function:: CPEW(L: networkx.Graph, capacity: int, delaunay_based: bool = True, maxiter: int = 10000, weightfun: Callable | None = None, weight_attr: str = 'length') -> networkx.Graph Crossing Preventing Esau-Williams heuristic for C-MST :param L: location graph :param capacity: max number of terminals in a subtree :param maxiter: fail-safe to avoid locking in an infinite loop :returns: Routeset graph G .. py:function:: EW_presolver(Aʹ: networkx.Graph, capacity: int, maxiter: int = 10000, keep_log: bool = False) -> networkx.Graph Modified Esau-Williams heuristic for C-MST with limited crossings :param Aʹ: available links graph :param capacity: max number of terminals in a subtree :param maxiter: fail-safe to avoid locking in an infinite loop :returns: Solution topology S. .. py:function:: NBEW(L: networkx.Graph, capacity: int, delaunay_based: bool = True, rootlust: float = 0.0, maxiter: int = 10000, weightfun: Callable | None = None, weight_attr: str = 'length') -> networkx.Graph Non-branching Esau-Williams heuristic for C-MST. :param L: networkx.Graph :param capacity: max number of terminals in a subtree :param rootlust: weight of the reduction of subroot length in calculating savings (use some value between 0 and 1, e.g. 0.6) :returns: Routeset graph G .. py:function:: OBEW(L: networkx.Graph, capacity: int, rootlust: str | None = None, maxiter: int = 10000, maxDepth: int = 4, MARGIN: float = 0.0001, warnwhere: Callable | None = None, weightfun: Callable | None = None, keep_log: bool = False) -> networkx.Graph Obstacle Bypassing Esau-Williams heuristic for C-MST. Recommended `rootlust`: '0.6*cur_capacity/capacity' :param L: location graph :param capacity: max number of terminals in a subtree :param rootlust: expression to use for biasing weights :param warnwhere: print debug info based on utils.Alerter :returns: Routeset graph G