optiwindnet.heuristics¶
Package Contents¶
- optiwindnet.heuristics.ClassicEW(L: networkx.Graph, capacity: int, delaunay_based: bool = False, maxiter: int = 10000, weightfun: Callable | None = None, weight_attr: str = 'length') networkx.Graph[source]¶
Classic Esau-Williams heuristic for C-MST.
- Parameters:
L – location graph
capacity – max number of terminals in a subtree
maxiter – fail-safe to avoid locking in an infinite loop
- Returns:
Routeset graph G
- optiwindnet.heuristics.CPEW(L: networkx.Graph, capacity: int, delaunay_based: bool = True, maxiter: int = 10000, weightfun: Callable | None = None, weight_attr: str = 'length') networkx.Graph[source]¶
Crossing Preventing Esau-Williams heuristic for C-MST
- Parameters:
L – location graph
capacity – max number of terminals in a subtree
maxiter – fail-safe to avoid locking in an infinite loop
- Returns:
Routeset graph G
- optiwindnet.heuristics.EW_presolver(Aʹ: networkx.Graph, capacity: int, maxiter: int = 10000, keep_log: bool = False) networkx.Graph[source]¶
Modified Esau-Williams heuristic for C-MST with limited crossings
- Parameters:
Aʹ – available links graph
capacity – max number of terminals in a subtree
maxiter – fail-safe to avoid locking in an infinite loop
- Returns:
Solution topology S.
- optiwindnet.heuristics.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[source]¶
Non-branching Esau-Williams heuristic for C-MST.
- Parameters:
L – networkx.Graph
capacity – max number of terminals in a subtree
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
- optiwindnet.heuristics.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[source]¶
Obstacle Bypassing Esau-Williams heuristic for C-MST.
Recommended rootlust: ‘0.6*cur_capacity/capacity’
- Parameters:
L – location graph
capacity – max number of terminals in a subtree
rootlust – expression to use for biasing weights
warnwhere – print debug info based on utils.Alerter
- Returns:
Routeset graph G