AequilibraE
0.7.1

Contents:

  • 1. An overview of AequilibraE
  • 2. Getting Started
  • 3. The AequilibraE project
  • 4. Modeling Platform
  • 5. Path computation engine
  • 6. API documentation
    • 6.1. Project Module
      • 6.1.1. aequilibrae.Project
      • 6.1.2. Project components
      • 6.1.3. Project objects
        • 6.1.3.1. aequilibrae.project.Zone
        • 6.1.3.2. Network data
        • 6.1.3.3. Network items
    • 6.2. Parameters Module
    • 6.3. Distribution Module
    • 6.4. Matrix Module
    • 6.5. Paths Module
    • 6.6. Transit Module
    • 6.7. Use examples
  • 7. Workflows
  • 8. Contributing to AequilibraE
  • 9. Roadmap
  • 10. QGIS
AequilibraE
  • Docs »
  • 6. API documentation »
  • 6.1.3.3.3. aequilibrae.project.network.Link
  • View page source

6.1.3.3.3. aequilibrae.project.network.Link¶

class aequilibrae.project.network.Link(dataset)¶

Bases: aequilibrae.project.network.safe_class.SafeClass

A Link object represents a single record in the links table

from aequilibrae import Project

proj = Project()
proj.open('path/to/project/folder')

all_links = proj.network.links

# Let's get a mode to work with
modes = proj.network.modes
car_mode = modes.get('c')

# We can just get one link in specific
link1 = all_links.get(4523)
link2 = all_links.get(3254)

# We can find out which fields exist for the links
which_fields_do_we_have = link1.data_fields()

# And edit each one like this
link1.lanes_ab = 3
link1.lanes_ba = 2

# we can drop a mode from the link
link1.drop_mode(car_mode)
# or link1.drop_mode('c')

# we can add a mode to the link
link2.add_mode(car_mode)
# or link2.add_mode('c')

# Or set all modes at once
link2.set_modes('cmtw')

# We can just save the link
link1.save()
link2.save()
__init__(dataset)¶

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(dataset)

Initialize self.

add_mode(mode)

Adds a new mode to this link

data_fields()

lists all data fields for the link, as available in the database

delete()

Deletes link from database

drop_mode(mode)

Removes a mode from this link

save()

Saves link to database

set_modes(modes)

Sets the modes acceptable for this link

__init__(dataset)¶

Initialize self. See help(type(self)) for accurate signature.

Next Previous

© Copyright 2018, Pedro Camargo.

Built with Sphinx and ❤️ using a custom theme based on Read the Docs.