Giter Club home page Giter Club logo

trafficindex's Introduction

TTI ,Smart Transportation Industry Standard!

license [Release Version] [PRs Welcome]

The TTI (Travel Time Index) industry's most used evaluation index of urban congestion degree is the ratio of the actual travel time and the free flow time. The larger the value, the worse the traffic operation status, and the congestion level is generally positive. Related, other abnormal weather conditions (such as rain, snow, fog, etc.) or abnormal road conditions may also affect the value of TTI.

Basic Idea

the basic idea of Speed: If a link has two time slices, t1 and t2, and the link's length is S, then the average speed v of the link is: v = 2·S / (t1 + t2) during the period from t1 to t2.

the basic idea of TTI: In the same link in a time slice, tti = free flow speed / actual speed.

Calculation method of traffic index

TTI

Data curves of Beijing and Urumqi

TTI

Required data

Feature Detail
Road network data Basic map road network data, including road shape and unique id
Realtime Traffic data Relying on dripping massive floating car data, real-time traffic data released by Didi
Free flow data From the Drip Trajectory database, the road speed generated by the excavation
weight data The total number of vehicles passing the road within a natural month

Getting started

GAIA Open Dataset

With DiDi's advantages in big data and technology, the GAIA Initiative provides academic community with real-life application use cases, anonymized data and computing resources, and seeks collaboration with the academic community. The Initiative aims to advance fundamental and prospective studies in transportation research. It promotes the application of scientific achievements by strengthening ties between industry, university and research. This effort will drive scientific development in intelligent transportation systems and contribute to societal development.With DiDi's advantages in big data and technology, the GAIA Initiative provides academic community with real-life application use cases, anonymized data and computing resources, and seeks collaboration with the academic community. The Initiative aims to advance fundamental and prospective studies in transportation research. It promotes the application of scientific achievements by strengthening ties between industry, university and research. This effort will drive scientific development in intelligent transportation systems and contribute to societal development.

Add a realtime traffic data API in config.conf in root of host project as following.

dependencies {
    realtime_traffic_data 'http://sts.didichuxing.com/api/realtime?citycode=1&token=your token'
    roadnet 'http://sts.didichuxing.com/api/roadnet?citycode=1&token=your token'
    freeflow 'http://sts.didichuxing.com/api/freeflow?link_id=10001&token=your token'
    weight 'http://sts.didichuxing.com/api/weight?link_id=10001&token=your token'
}

In addition, you need to configure redis、mysql

Compile c++ program

g++ -o TrafficIndex CommonTools.cpp LogUlits.cpp main.cpp md5.cpp TrafficIndex.cpp traffic_pb.pb.cc -lmysqlclient -lpq -I/usr/include/mysql -L/usr/lib64/mysql -I/usr/include -L/usr/lib64 -I/usr/local/protobuf/include -L/usr/local/protobuf/lib -I/usr/local/include/hiredis -L/usr/local/lib -I/usr/local/postgresql-9.6.6/include -L/usr/local/postgresql-9.6.6/lib -I/usr/local/leveldb -luuid -lpthread -lprotobuf -lhiredis -lcurl -lleveldb

Finally, Get executable program TrafficIndex

Start the calculation program like this: nohup ./TrafficIndex &

Known issues

  • Only supports the data format of DIDI, other data types are not supported.
  • Need to apply for open data from DIDI.

Contributing

Welcome to contribute by creating issues or sending pull requests. See Contributing Guide for guidelines.

Who is using TTI?

滴滴出行 Uber**

License

TTI is licensed under the Apache License 2.0. See the LICENSE file.

trafficindex's People

Contributors

zsz267 avatar wbtiger avatar

Watchers

James Cloos 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.