Skip to main content
Ctrl+K

AequilibraE 1.1.3

Site Navigation

  • Examples
  • Modeling with AequilibraE
  • API Reference

Site Navigation

  • Examples
  • Modeling with AequilibraE
  • API Reference

Section Navigation

  • The AequilibraE project
  • Project database
    • About table
    • Network
      • Dealing with Geometries
      • Importing and exporting the network
    • Modes table
    • Link types table
    • Matrices table
    • Zones table
    • Project metadata
    • Results table
    • Periods table
    • SQL Data model
      • about table structure
      • attributes documentation table structure
      • link types table structure
      • links table structure
      • matrices table structure
      • modes table structure
      • nodes table structure
      • periods table structure
      • results table structure
      • transit graph configs table structure
      • zones table structure
  • Parameters YAML File
  • Public Transport database
    • SQL Data model
      • agencies table structure
      • attributes documentation table structure
      • fare attributes table structure
      • fare rules table structure
      • fare zones table structure
      • link types table structure
      • links table structure
      • modes table structure
      • node types table structure
      • nodes table structure
      • pattern mapping table structure
      • results table structure
      • route links table structure
      • routes table structure
      • stop connectors table structure
      • stops table structure
      • trigger settings table structure
      • trips table structure
      • trips schedule table structure
  • Components of an AequilibraE Project
    • Data Components
    • Accessing Project Data
    • AequilibraE Matrix
  • Static Traffic Assignment
    • Assignment mechanics
    • Multi-class Equilibrium assignment
  • Transit assignment
    • The Transit assignment graph
    • Hyperpath routing in the context of transit assignment
  • Route Choice
    • Route choice models
    • Choice set generation algorithms
  • Modeling with AequilibraE
  • Project database
  • Link types table

Link types table#

The link_types table exists to list all the link types available in the model’s network, and its main role is to support processes such as adding centroids and centroid connectors, and to store reference data like default lane capacity for each link type.

Reserved values#

There are two default link types in the link_types table and that cannot be removed from the model without breaking it.

  • centroid_connector - These are VIRTUAL links added to the network with the sole purpose of loading demand/traffic onto the network. The identifying letter for this mode is z.

  • default - This link type exists to facilitate the creation of networks when link types are irrelevant. The identifying letter for this mode is y. That is right, you have from a to x to create your own link types, as well as all upper-case letters of the alphabet.

Adding new link types to a project#

Adding link types to a project can be done through the Python API or directly into the ‘link_types’ table, which could look like the following.

Link_types table structure

Note

Both ‘link_type’ and ‘link_type_id’ MUST be unique

Consistency triggers#

As it happens with the links and nodes tables, the ‘link_types’ table is kept consistent with the links table through the use of database triggers.

Changes to reserved link_types#

For both link types mentioned about (y & z), changes to the ‘link_type’ and ‘link_type_id’ fields, as well as the removal of any of these records are blocked by database triggers, as to ensure that there is always one generic physical link type and one virtual link type present in the model.

Changing the link type for a certain link#

Whenever we change the ‘link_type’ associated to a link, we need to check whether that link type exists in the links_table.

This condition is ensured by specific trigger checking whether the new ‘link_type’ exists in the link table. If if it does not, the transaction will fail.

We also need to update the ‘link_types’ field the nodes connected to the link with a new string of all the different ‘link_type_id’s connected to them.

Adding a new link#

The exact same behaviour as for Changing the link type for a certain link applies in this case, but it requires an specific trigger on the creation of the link.

Editing a link type in the link_types table#

Whenever we want to edit a ‘link_type’ in the ‘link_types’ table, we need to check for two conditions:

  • The new ‘link_type_id’ is exactly one character long

  • The old ‘link_type’ is not in use on the network

For each condition, a specific trigger was built, and if any of the checks fails, the transaction will fail.

The requirements for uniqueness and non-absent values are guaranteed during the construction of the ‘link_types’ table by using the keys UNIQUE and NOT NULL.

Adding a new link type to the link_types table#

In this case, only the first behaviour mentioned above on Editing a link type in the link_types table applies, the verification that the ‘link_type_id’ is exactly one character long. Therefore only one new trigger is required.

Removing a link type from the link_types table#

In counterpoint, only the second behaviour mentioned above on Editing a link type in the link_types table applies in this case, the verification that the old ‘link_type’ is not still in use by the network. Therefore only one new trigger is required.

See also

  • aequilibrae.project.network.LinkTypes()

    Class documentation

  • link types table structure

    Data model

previous

Modes table

next

Matrices table

On this page
  • Reserved values
  • Adding new link types to a project
  • Consistency triggers
    • Changes to reserved link_types
    • Changing the link type for a certain link
    • Adding a new link
    • Editing a link type in the link_types table
    • Adding a new link type to the link_types table
    • Removing a link type from the link_types table
Show Source

© Copyright 2024-11-08, AequilibraE developers.

Created using Sphinx 8.1.3.

Built with the PyData Sphinx Theme 0.13.3.