This repository contains the source code for CAR application.
Abstract: Transport related pollution is becoming a major issue as it adversely affects human health and one way to lower the personal exposure to air pollutants is to choose a health-optimal route to the destination. Current navigation systems include options for the quickest paths (distance, traffic) and least expensive paths (fuel costs, tolls). In this paper, we come up with the CAR (Clean Air Routing) algorithm and use it to build a health-optimal route recommendation system between the origin and the destination. We combine the open source PM2.5 (Fine Particulate Matter with diameter less than 2.5 micrometers) concentration data for Taiwan, with the road network graph obtained through OpenStreetMaps. In addition, spatio-temporal interpolation of PM2.5 is performed to get PM2.5 concentration for the road network intersections. Our algorithm introduces a weight function that assesses how much PM2.5 the user is exposed to at each intersection of the road network and uses it to navigate through intersections with the lowest PM2.5 exposures. The algorithm can help people reduce their overall PM2.5 exposure by offering a healthier alternative route which may be slightly longer than the shortest path in some cases. We evaluate our algorithm for different travel modes, including driving, cycling and walking. An analysis is done for more than 4,000 real-world travel scenarios. The results show that our approach can lead to an average exposure reduction of 17.1% with an average distance increase of 2.4%.
To get more details about the algorithm, please have a look at our paper "CAR: The Clean Air Routing Algorithm for Path Navigation With Minimal PM2.5 Exposure on the Move" (https://ieeexplore.ieee.org/abstract/document/8863351). The paper is open access and available at the IEEE website. A demonstration of this work was also done at ACM MobiSys 2018 in Munich.
The implementation of this routing algorithm is based on Graphhopper.
Java Runtime Environment is required for running this project. Depending on your system, Java Runtime Environment can be downloaded at https://www.java.com/en/download/. If you want to edit and recompile the code, Java Development Kit and sbt are needed.
To start the server locally, simply execute the jar file
java -cp scala-routing-assembly-1.1.jar edu.sinica.iis.app.RoutingApplication
Go to your browser and type in
http://localhost:8080/car?latFrom=25.042574&lonFrom=121.614649&latTo=25.055222&lonTo=121.617254&mode=car
The server will respond with a route along with its detailed information.
{
"status":"OK",
"message":"",
"route":{
"direction":[
{
"time":2292,
"distance":12.739805834784068,
"instruction":"Continue",
"name":"",
"code":0
},
{
"time":10424,
"distance":57.913,
"instruction":"Keep left",
"name":"",
"code":-7
},
{
"time":32851,
"distance":182.508,
"instruction":"Turn right onto ",
"name":"生命大道",
"code":2
},
{
"time":2518,
"distance":13.99,
"instruction":"Turn left onto ",
"name":"生命大道",
"code":-2
},
{
"time":102801,
"distance":1409.5569999999998,
"instruction":"Turn slight right onto ",
"name":"研究院路二段61巷",
"code":1
},
{
"time":1538,
"distance":12.82,
"instruction":"Turn slight left onto ",
"name":"民權街一段",
"code":-1
},
{
"time":24727,
"distance":446.5703667535901,
"instruction":"Turn left onto ",
"name":"大同路一段, 5",
"code":-2
},
{
"time":0,
"distance":0,
"instruction":"Arrive at destination",
"name":"",
"code":4
}
],
"path":[
[
25.04259415060618,
121.61471779893651
],
...
[
25.054799766573304,
121.61962456896062
],
[
25.054817834231656,
121.6191842396375
],
[
25.054870360826037,
121.61882232767691
],
[
25.054907799994375,
121.61867014956482
],
[
25.055109074016105,
121.61723409872131
]
],
"total_distance":2136.0981725883744,
"total_time":177,
"total_pm25":13148.505673224201
}
}
To use the routing system in regions of your choice, first download the map data from Open Street Map. Place the .osm
file in map_cache
folder and rename it to map.osm
.
If you need to change the code, recompile the project with (in the project's root folder)
sbt assembly
The .jar
file will be generated at target/scala-2.12
folder.