All Projects → didi → TrafficIndex

didi / TrafficIndex

Licence: Apache-2.0 license
TTI ,Smart Transportation Industry Standard

Programming Languages

C++
36643 projects - #6 most used programming language
python
139335 projects - #7 most used programming language

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].