Giter Club home page Giter Club logo

grid2demand's Issues

KeyError: 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.
image_2023-10-31_210650318

Your efforts to fix this issue would be greatly appreciated. Thank you.

File duplication issue

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!

Error: invalid continuation byte

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.
image_2023-10-31_205817454

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.

WhatsApp Image 2023-10-22 at 22 22 17

Please let me know if my conclusion of the source of the problem is incorrect. Thank you.

ERROR: There is no node with activity_type = 'poi/residential' or is_boundary = '1'

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.

map.zip

NetworkPartition_notworking

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.

what does 'yes' mean?

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?

suggestions for the next version

  1. 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.
    image

  2. 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.

Add a function to bring in pre-existing zone boundaries for the centroid connector creation

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.

TAZ.csv

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.