Network.clean

Network.clean(remove_zones: bool = False, remove_parallel_edges: bool = True, remove_zero_cost_edges: bool = True, remove_isolated_nodes: bool = False, remove_unreachable_nodes: bool = False, remove_commodities: bool = False, start_node_unreachables=None) str[source]

Clean network.

Parameters
remove_zonesbool, default=False

Whether to remove all nodes in network.nodes that are flagged as a zone node.

remove_parallel_edgesbool, default=True

Whether to remove parallel edges. E.g., if two edges exist that have the same source and the same target, only the first edge is kept.

remove_zero_cost_edgesbool, default=True

Whether to remove edges that have zero costs.

remove_isolated_nodesbool, default=False

Whether to remove nodes that are isolated, i.e., nodes in the network that do not have any edges associated with them.

remove_unreachable_nodesbool, default=False

Whether to remove nodes that are unreachable from start_node_unreachables. If this is not given, unreachable nodes from the first node in network.nodes are removed.

remove_commoditiesbool, default=False

Whether to remove commodities made up by nodes which are deleted in the cleaning process.

Returns
str

Summary of cleaning process.