Expand description

This module provides abstractions and implementations for modifying a transit network. A transit network is represented as a graph, where each node is a TransitNode (a point in the transit network where a vehicle can stop) and each edge represents a path (TransitEdge) between two transit nodes. The main trait provided by this module is TransitNetworkModifier.

TransitNetworkModifier

The TransitNetworkModifier trait provides an interface for modifying the network. This includes adding nodes and edges to the network. Implementors of this trait can be used to add TransitNode and TransitEdge instances to a network.

For instance, an implementor might add a TransitNode to an internal data structure upon invocation of the add_node method. Similarly, the add_edge and add_edge_with_accessibility methods are used to add TransitEdge instances to the network. The add_edge_with_accessibility method also allows specifying the accessibility of the edge, represented by the Accessability enum.

Traits

  • Trait providing methods for modifying a transit network.
  • A trait for repairing transit networks, particularly for ensuring that all edges in the network are in the correct direction.