asu-trans-ai-lab / grid2demand Goto Github PK
View Code? Open in Web Editor NEWA tool for generating zone-to-zone travel demand based on grid zones and gravity model
License: Apache License 2.0
A tool for generating zone-to-zone travel demand based on grid zones and gravity model
License: Apache License 2.0
I have noticed that running the following code does not work when the node_id (in the node.csv file generated by osm2gmns) starts with anything other than 0.
Step 2: Generate zone dictionary from node dictionary by specifying number of x blocks and y blocks
zone_dict = gd.net2zone(node_dict, num_x_blocks=25, num_y_blocks=25)
The error is shown in the image below.
Your efforts to fix this issue would be greatly appreciated. Thank you.
https://github.com/asu-trans-ai-lab/grid2demand/blob/main/dataset/ASU/node.csv
When grid2demand overwrites this node file, the values become xx.0 as float point numbers.
osm_node_id could contain 2 numbers such as as consolidated intersections, thus, please treat them as string.
When the grid2demand code is run multiple times, the code generates duplicates of the output files instead of overwriting them. For example, the duplicates appear as zone_1.csv, zone_1_1.csv and so on. I believe we discussed this issue last week and came to the conclusion that it is tedious for the user to rename, delete and reorganize the output files. Your effort to fix this would be greatly appreciated!
I have noticed that running the following line causes the code to throw an error.
Step 1: Load node and poi data from input directory
node_dict, poi_dict = gd.load_network.values()
The error thrown is as follows.
I have replicated this issue under different conditions and I have come to the conclusion that the problem is caused by poi.csv file generated from osm2gmns. It would seem that the first column "name" in poi.csv causes this issue and deleting this column "fixes" the issue. The image below should give some context.
Please let me know if my conclusion of the source of the problem is incorrect. Thank you.
I am running the "Quick start" step by step, but when I reach the "Apply gravity model to perform trip distribution" I get the following error.
"grid2demand_0418b.py[line:1422] - ERROR: There is no node with activity_type = 'poi/residential' or is_boundary = '1'. Please check node.csv!"
I attach a zip containing the OSM file with the map I am currently using.
When grid2demand is imported, there is no function called 'NetworkPartition' which mentioned in the readme file, I tried 'PartitionGrid' and which seems to work similarly as the NetworkPartition function implies. I think the name of the function is wrong.
Does the building type 'yes' mean the purpose can not be identified from OSM as I see there are quite a lot? How did you get the attraction rate for 'yes' type?
The coefficients of the friction factor function need to use the unit of travel time in min. Maybe the average speeds for different modes can be considered to convert the distance to travel time.
Specifically for mode choice, coefficient calibration should be considered for different modes. Spatial Poisson model can be used without a and b but with c as the inverse of average trip travel time in min for bike and walk.
The zone numbers are copied twice in zone.csv.
https://github.com/asu-trans-ai-lab/osm_test_data_set/blob/main/test_gtfs.ipynb
Hi developer,
Typically, the zone-to-node mapping is specified in node.csv through the field of zone_id. However, there is a challenge when mapping TAZ-based information to the network. Could you please add a function to map TAZ centroid to node, and update zone_id field when users have TAZ boundary information, including boundary polygon, centroid latitude and longitude.
I prepared the Phoenix TAZ files for your test.
The attached TAZ.csv contains fields for zone_id, x_coord, y_coord, and geometry defined in WKT format. The geometry is typically represented using polygon geometry and a pair of x_coord and y_coord defines zone centroids.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.