UDST / urbanaccess

A tool for GTFS transit and OSM pedestrian network accessibility analysis by UrbanSim
https://udst.github.io/urbanaccess/index.html
GNU Affero General Public License v3.0
236 stars 56 forks source link

Multiple networks in memory at once #77

Open smmaurer opened 3 years ago

smmaurer commented 3 years ago

I'm having trouble loading more than one network into memory at the same time using urbanaccess.load_network(). Earlier network variables end up pointing to the most recently loaded network:

Screen Shot 2020-10-05 at 3 21 34 PM

Diagnosis

UrbanAccess maintains a record of the current network, since most of the time users are only working with one at a time. It looks like the problem might be with how load_network() updates it -- it's overwriting the nodes and edges rather than replacing the object. I'll see if i can fix this. network.py#L539-L542

Environment

actransit_with_headways.h5
actransit_bart_with_headways.h5

MacOS 10.14
Python 3.8
UrbanAccess 0.2.1 Pandas 1.1
Jupyter 1.0