reverse_link#
module wntr.morph.link
- reverse_link(wn, link_name, return_copy=True)[source]#
Reverse a link to switch between the start and end nodes The function can reverse any link (pipe, pump or valve) Vertices order will be reversed to maintain the link layout
- Parameters:
wn (WaterNetworkModel) – The network object where link should be reversed.
link_name (string) – The name of the link to revers.
return_copy (bool, optional) – If True, modify and return a copy of the WaterNetworkModel object. If False, modify and return the original WaterNetworkModel object.
- Returns:
WaterNetworkModel
A network object after link was reversed
- Return type: