optiwindnet.interface¶
Module Contents¶
- optiwindnet.interface.assign_cables(G, cables)[source]¶
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.
- Parameters:
G – networkx graph with edges having a ‘load’ attribute (use calcload(G))
cables – [(«capacity», «cost»), …] in increasing capacity order (each cable entry must be a tuple) or numpy.ndarray where each row represents one cable type