A tool for generating zone-to-zone travel demand based on grid cells
Project description
GRID2DEMAND: A tool for generating zone-to-zone travel demand based on grid cells
Introduction
Grid2demand is an open-source quick demand generation tool based on the trip generation and trip distribution methods of the standard 4-step travel model for teaching transportation planning and applications. By taking advantage of OSM2GMNS tool to obtain routable transportation network from OpenStreetMap, Grid2demand aims to further utilize Point of Interest (POI) data to construct trip demand matrix aligned with standard travel models.
You can get access to the introduction video with the link: https://www.youtube.com/watch?v=EfjCERQQGTs&t=1021s
Quick Start
Users can refer to the code template and test data set to have a quick start.
Installation
pip install grid2demand
If you meet installation issues, please refer to the user guide for solutions.
Simple Example
import grid2demand as gd
"Step 1: Read Input Network Data"
gd.ReadNetworkFiles()
"Step 2: Partition Grid into cells"
gd.PartitionGrid(number_of_x_blocks=None, number_of_y_blocks=None, cell_width=1000, cell_height=1000)
# users can customize number of grid cells or cell's width and height in meters
"Step 3: Get Production/Attraction Rates of Each Land Use Type with a Specific Trip Purpose"
gd.GetPoiTripRate(trip_purpose=1)
# users can customize trip purpose and poi_trip_rate.csv
"Step 4: Define Production/Attraction Value of Each Node According to POI Type"
gd.GetNodeDemand(residential_production=20, residential_attraction=20, boundary_production=1000, boundary_attraction=1000)
# users can customize production and attraction values of residential nodes and boundary nodes
"Step 5: Calculate Zone-to-zone Accessibility Matrix by Centroid-to-centroid Straight Distance"
gd.ProduceAccessMatrix()
"Step 6: Apply Gravity Model to Perform Trip Distribution"
gd.RunGravityModel(trip_purpose=1, a=None, b=None, c=None)
# users can customize friction factor coefficients under a specific trip purpose
"Step 7: Generate Agent"
gd.GenerateAgentBasedDemand()
Visualization
Open QGIS and add Delimited Text Layer of the output files.
User guide
Users can check the user guide for a detailed introduction of grid2demand.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for grid2demand-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b3234f24e5fc333688f2ca746f33bc544bf7e21828958d8294e9cbb6df82dde |
|
MD5 | 347e4a9d9c525a1d0b5081e7636a6893 |
|
BLAKE2b-256 | b300acc0ca4dc1f414f8a038f5b55544a5ada63a1c112c29d0b46222194e5956 |