Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aequillibrea benchmark #4

Open
Robinlovelace opened this issue Aug 8, 2024 · 6 comments · May be fixed by #5
Open

Aequillibrea benchmark #4

Robinlovelace opened this issue Aug 8, 2024 · 6 comments · May be fixed by #5

Comments

@Robinlovelace
Copy link
Member

Based on this, will try to apply it to Leeds: https://aequilibrae.com/python/latest/_auto_examples/assignment_workflows/plot_route_choice_set.html#sphx-glr-auto-examples-assignment-workflows-plot-route-choice-set-py

@Robinlovelace
Copy link
Member Author

@pedrocamargo
Copy link

pedrocamargo commented Aug 8, 2024

Hey Robin,
This is a nice hackaton you are going to have here. Let me just make a few comments:

  • The AequilibraE Route Choice capability is substantially different from all other alternatives you have there, as it has proper route choice (i.e. discrete choice) built on top of path-finding. I recommend the Link Penalisation algorithm for performance.

  • AequilibraE has a non-negligible overhead in building the Graph in memory. Still, the performance should be at least one order of magnitude better than your minimum for the network size I imagine. You will have to keep the graph in memory.

  • AequilibraE has a specific treatment for centroids and centroid connectors. If you plan to do computation ALWAYS from node to node, just prepare the graph with all nodes as centroids and use graph.set_blocked_centroid_flows(False)

  • For simple path-finding tasks, you can refer to this notebook, which shows how to use the PathResults() class to compute and hold paths (sequence of links, nodes and predecessors preserved). This object also allows you to re-trace a different path for the same origin based on the predecessors in place.

  • In case you want to use AequilibraE only for path computation, a good example is this notebook, which is basically performing assignment (and preparing the graph along the way) from a text-based network. It could be the case of storing the network in something like parquet in your case

Robinlovelace added a commit that referenced this issue Aug 8, 2024
@Robinlovelace Robinlovelace linked a pull request Aug 8, 2024 that will close this issue
@Robinlovelace Robinlovelace linked a pull request Aug 8, 2024 that will close this issue
@Robinlovelace
Copy link
Member Author

Great stuff, will give it a spin, many thanks jumping on this Pedro!

@Robinlovelace
Copy link
Member Author

OK, starting slow, have got the example code running in Quarto, looking good!

image

Source: #5

@Robinlovelace
Copy link
Member Author

Robinlovelace commented Aug 8, 2024

@pedrocamargo sorry to bother but looking at https://aequilibrae.com/python/latest/_auto_examples/aequilibrae_without_a_model/plot_assignment_without_model.html I'm not sure how to import the OSM network. See code and commit below for where we've got to (not far):

# Create a project for Leeds
from aequilibrae.project import Project
p = Project()
#| eval: false
p.new('leeds_project')
p.open('leeds_project')
import geopandas as gpd
zones = gpd.read_file('input_data/zones_msoa_leeds.geojson')
# p.network.create_from_osm(model_area = zones, modes = ['car'])
# Fails with 
p.network.create_from_osm(place_name = 'Leeds, UK')
AttributeError                            Traceback (most recent call last)
Cell In[17], [line 1](vscode-notebook-cell:?execution_count=17&line=1)
----> [1](vscode-notebook-cell:?execution_count=17&line=1) p.open('leeds_project')
      [2](vscode-notebook-cell:?execution_count=17&line=2) import geopandas as gpd
      [3](vscode-notebook-cell:?execution_count=17&line=3) zones = gpd.read_file('input_data/zones_msoa_leeds.geojson')

Robinlovelace added a commit that referenced this issue Aug 8, 2024
@pedrocamargo
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants