asu-trans-ai-lab / grid2demand

A tool for generating zone-to-zone travel demand based on grid zones and gravity model
Apache License 2.0
71 stars 21 forks source link

Add a script to transform input_agents.csv into the JSON format used by #2

Closed dabreegster closed 3 years ago

dabreegster commented 3 years ago

A/B Street to create scenarios.

To run this (the relative paths are probably different):

python3 demand_to_abst_scenario.py --input=../examples/input_agent.csv --output=scenario.json
# cd to the abstreet directory
cargo run --release --bin import_traffic -- --map=data/system/seattle/maps/udistrict.bin --input=/home/dabreegster/Downloads/grid2demand/src/scenario.json --skip_problems

The A/B Street import fails, because there are some trips with an origin or destination at https://goo.gl/maps/aZCjMMnqw34pphBX8, with the OSM ID of https://www.openstreetmap.org/node/3391705319. There isn't a building within 100m, so the import fails. Update: I added a --skip_problems option to ignore these. From the latest input data, only 91 people were skipped because of this.