Code Monkey home page Code Monkey logo

optimal-strategy-transit-assignment's Introduction

Optimal-Strategy-Transit-Assignment

Optimal-Strategy-Transit-Assignment is a repository for the static (frequency-based) transit assignment python code. The model was proposed by Spiess and Florian (1987).

What is optimal strategy transit assignment?

This is an assignment model for the transit systems where the service is perceived in terms of frequencies. The passengers traveling between an origin-destination pair served by multiple transit lines are faced with the problem of which transit route to board. Due to the randomness in the arrival time of buses, the passengers adopt strategy which minimizes the expected travel time. A strategy is defined as a set of rules when applied helps a passenger to move from origin to destination in a transit network. Nguyen and Pallottino 1988 formalized the idea of strategy in a graph-theoretic framework and called it a hyperpath. Let v_ak be the flow on link a destined to destination k and let W_ik be the wait time of all the passengers visiting node i destined to destination k. The, the transit assignment can be formulated as a linear program given below:

To avoid solving the large LP, Spiess and Florian proposed a primal-dual algorithm which is coded in python.

Steps to run transit assignment.

  1. Clone the repository on a local directory

  2. Data Preparation :

For the assignment, you need three types of data:

  • Network data: For this, you can use R file named DataPrep.R. Change the location of the GTFS ZIP file in the script and run it. This will create nodes and links for the network.
  • Zones data/Access links data: You need data related to traffic analysis zones from where the demand is generated or destined to. I will leave this up to you to create access_links from zones to transit stops and vice versa. Check the data format ft_input_accessLinks.dat
  • Demand: You need demand between various zones.

How to run transit assignment?

The code is under progress. Please do not use this code.

optimal-strategy-transit-assignment's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.