Skip to main content
Ctrl+K

AequilibraE 1.1.0

Site Navigation

  • Examples
  • Modeling with AequilibraE
  • API Reference

Site Navigation

  • Examples
  • Modeling with AequilibraE
  • API Reference

Section Navigation

  • The AequilibraE project
  • Parameters YAML File
  • Project database
    • About table
    • Network
    • Modes table
    • Link types table
    • Matrices
    • Zones table
    • Parameters metadata table
    • Results
    • 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
  • 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
  • Static Traffic Assignment
    • Multi-class Equilibrium assignment
    • Path-finding and assignment mechanics
  • Transit assignment
    • Hyperpath routing in the context of transit assignment
    • The Transit assignment graph
  • Route Choice
    • Choice set generation algorithms
    • Route choice models
  • 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, (Network consistency behaviour), 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.

previous

Modes table

next

Matrices

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-07-26, AequilibraE developers.

Created using Sphinx 7.4.7.

Built with the PyData Sphinx Theme 0.13.3.