Skip to content

Preparing GMNS Node and Link Files for Traffic Assignment

ASU Trans+AI Lab edited this page Jan 11, 2025 · 1 revision

Preparing GMNS Node and Link Files for Traffic Assignment

Problem Statement

To make the GMNS node.csv and link.csv files fully traffic assignment-ready, it is crucial to ensure proper structuring of the files for compatibility with algorithms like shortest path label-collecting or label-setting. The key challenge is to avoid inefficiencies caused by bypassing connectors through zone centroids while maintaining a forward-star structure.


Requirements for Traffic Assignment-Ready GMNS Node and Link Files

1. Forward-Star Structure

  • Sorting Nodes and Links:
    • The node_id in node.csv and the from_node_id/to_node_id in link.csv must be sorted in ascending order.
    • This organization facilitates efficient processing in shortest path algorithms and allows building the outgoing nodes from an upstream node efficiently using a fixed-size array vector rather than lists.

2. Node File Structure (node.csv)

  • Two Blocks of Nodes:
    • First Block: Zone Centroids:
      • The node_id for zone centroids in node.csv must directly correspond to the zone_id (i.e., zone_id = node_id).
      • Zone centroids are listed first to ensure consistency.
    • Second Block: Physical/Activity Nodes:
      • Physical nodes or activity nodes are listed after the zone centroids.
      • These are the activity nodes in the physical network that connect to zone centroids through connectors.

3. Connector Definition

  • Connector Properties:
    • Connectors are virtual links defined as:
      • One end (from_node or to_node) is always a zone centroid node.
      • The other end connects to an activity node or a physical node in the network.
    • These connectors load traffic from the zone centroid to the network.

4. No Bypassing Zone Centroids

  • Avoiding Centroid Bypass:
    • In shortest path algorithms, zone centroids (except for the origin node) should not act as through nodes.
    • To enforce this:
      • Use the "first-through node" concept:
        • During label-collecting or label-setting, zone centroids (except the origin zone) are not scanned or picked up from the eligible list.
        • This ensures that no paths bypass zone centroids incorrectly.
      • This is implemented through the concept of First-Through Node, which can be detected automatically from the zone block in node.csv as the largest node numbers in the zone block.
    • To prevent incorrect bypassing of zone centroids, label-collecting or label-setting algorithms must scan nodes in a specific order:
      • Zone centroids, except for the origin node, are excluded from the scan list once the algorithm begins.
      • Only activity nodes and physical nodes are considered for shortest path calculations beyond the origin zone.

5. Demand File Structure (demand.csv)

  • Zone ID Consistency:
    • The o_zone_id (origin zone) and d_zone_id (destination zone) in demand.csv must match the zone_id in node.csv.
    • This ensures that demand data aligns directly with the corresponding zone centroids in node.csv.

Explanation of Forward-Star Structure and First-Through Node Concept

  1. Forward-Star Structure:
    • Organizing the link.csv by sorting from_node_id and to_node_id ensures that the network can be processed efficiently by algorithms like shortest path calculation.
    • This is critical for reducing computational complexity in large-scale networks.

Implementation in TransCAD, Cube, and PTV VISUM

  1. TransCAD:

    • Zone IDs do not need to be equal to node IDs.
    • TransCAD allows zone IDs to be defined directly within the node layer.
    • The GMNS structure can be converted into TransCAD format by relating zone centroids and physical nodes using a GeoPandas shapefile. The geometry field in the shapefile can define link geometries in WKT format for seamless integration.
  2. Cube:

    • Requires a zone block to define the first set of nodes as zones.
    • The GMNS structure supports Cube’s approach by defining separate node and zone layers. Zone centroids are mapped as the first block of nodes in node.csv, while physical nodes and connectors are maintained as subsequent blocks.
    • GeoPandas can facilitate the conversion by creating shapefiles that separate zone centroids and their connected layers.
  3. PTV VISUM:

    • Provides advanced configuration of zone centroids and connectors, allowing detailed attributes such as impedance, priority, and capacity.
    • The GMNS structure, with link geometries in WKT format, can be converted using GeoPandas shapefiles, enabling a smooth transition into PTV VISUM’s node and link layers.

Implementation Checklist

  1. node.csv:

    • Verify that node_id values for zone centroids directly match zone_id (where applicable).
    • Organize the file with zone centroids listed first, followed by physical/activity nodes.
  2. link.csv:

    • Ensure links are sorted by from_node_id and to_node_id.
    • Define connectors with one end as a zone centroid and the other as an activity node.
  3. demand.csv:

    • Check that o_zone_id and d_zone_id match the zone_id values in node.csv.
  4. Shortest Path Algorithm:

    • Implement the first-through node rule to exclude zone centroids (except for the origin zone) from being scanned during the shortest path calculation.
  5. Conversion Using GeoPandas:

    • Utilize GeoPandas to relate CSV files with shapefiles for zone centroids, physical nodes, and connectors.
    • Use the WKT geometry field in shapefiles to represent link geometries for seamless integration into tools like TransCAD, Cube, and PTV VISUM.

By following these requirements and principles, the GMNS node and link files will be well-structured and traffic assignment-ready, enabling efficient and accurate network modeling across tools like TransCAD, Cube, and PTV VISUM.