Skip to main content

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: Zone Partition"
# Option 1: Partition grid into cells (users can customize number of grid cells or cell's width and height in meters)
gd.PartitionGrid(number_of_x_blocks=None, number_of_y_blocks=None, cell_width=1000, cell_height=1000)
# Option 2: Partition based on Traffic Analysis Zone boundaries with an external input TAZ.csv
gd.TAZ2zone()

"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

Option 1: Open QGIS and add Delimited Text Layer of the files.

Option 2: Upload files to the website of ASU Trans+AI Lab and view input and output files.

Option 3: Import input_agent.csv to A/B Street and view dynamic simulation of the demand.

User guide

Users can check the user guide for a detailed introduction of grid2demand.

Project details


Release history Release notifications | RSS feed

This version

0.2.5

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grid2demand-0.2.5.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

grid2demand-0.2.5-py3-none-any.whl (34.7 kB view details)

Uploaded Python 3

File details

Details for the file grid2demand-0.2.5.tar.gz.

File metadata

  • Download URL: grid2demand-0.2.5.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/59.6.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.6.6

File hashes

Hashes for grid2demand-0.2.5.tar.gz
Algorithm Hash digest
SHA256 b466ded1200d37d97d84611462675da064f3c5070d1595023b3d792cec1944dd
MD5 70353e2f872932e775f95fa4619002a4
BLAKE2b-256 8ce4c32bfd9d9e8291677d4c5421b0bccd1ef03a0531029a87412427df5189f5

See more details on using hashes here.

File details

Details for the file grid2demand-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: grid2demand-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 34.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/59.6.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.6.6

File hashes

Hashes for grid2demand-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c11354b617280da66efd317357f9f7b630e2274380512db115b5983af5094f30
MD5 a953e9c97507cc62feb997753b783f9f
BLAKE2b-256 bdaed3002489a91bf5718276c0e593cd9ae6ff9565b1d48a34bcf06ca2a8db95

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page