optiwindnet.interface ===================== .. py:module:: optiwindnet.interface Module Contents --------------- .. py:function:: assign_cables(G, cables) Assign a cable type to each edge of `G` and update attribute 'cost'. Each edge is assigned the cheapest cable type that can carry its load. The edge attribute 'cable' is the index in `cables` of the type chosen. :param G: networkx graph with edges having a 'load' attribute (use calcload(G)) :param cables: [(«capacity», «cost»), ...] in increasing capacity order (each cable entry must be a tuple) or numpy.ndarray where each row represents one cable type