open source routing machine - foss4g 2016 bonn

35
Open Source Routing Machine Johan Uhle @freenerd [email protected] FOSS4G Bonn August 2016 1

Upload: johan

Post on 07-Jan-2017

314 views

Category:

Technology


0 download

TRANSCRIPT

Open Source Routing Machine

Johan Uhle@[email protected] Bonn August 2016

1

2

3

4

Pipeline• OSM road network

• Processing

• Routing

5

PipelineProcessing

• OSM planet

• AWS EC2: r3.8xlarge with 32 CPUs & 244 GB RAM

• car 9 hours

• bike 13 hours

• walk 18 hours

6

PipelineRouting

• Car routing

• AWS EC2: r3.4xlarge with 16 CPUs & 122 GB RAM

7

OSRM v5In-car navigation

8

9

OSRM v51. Guidance2. Dynamic Speeds

10

Guidance

11

12

GuidanceAdditional instruction types

depart new namecontinue end of roadturn forkroundabout mergearrive on ramp off ramp use lane rotary roundabout turn

13

GuidanceRamps

14

GuidanceRoundabouts

15

GuidanceCombinined Instructions

16

GuidanceLanes

lanes=4turn:lanes=left;through|through|through|through;right

17

OSRM v51. Guidance2. Dynamic Speeds

18

Dynamic Speeds• Goals:

• Give realistic ETAs

• Choose the best route

19

Dynamic Speeds

20

Dynamic SpeedsCurrent Design

• Speeds assigned by profiles

• OSM tag maxspeed

• Type of road, e.g. primary

• car 65 km/h

• bike 15 km/h

• walk 5 km/h

21

Dynamic SpeedsExternal speed data

• During processing

• Load external csv file with format

from_node,to_node,speed

22

Dynamic SpeedsExternal speed data

1. Freeflow

• Uncongested speed

2. Historical buckets

• In a typical week, speed for this 15 minute window

3. Realtime

• Speed "right now"23

Dynamic Speeds

24

Dynamic SpeedsExternal speed data

Mapbox SF office to SFO x: time UTC y: ETA seconds blue: static speed from profile orange: external speed data is dynamic with rush hour

25

Dynamic SpeedsExternal speed data

Mapbox SF office to SFO different routes over time

26

Dynamic SpeedsFaster processing

• How to get speeds into osrm?

27

Dynamic SpeedsFaster processing

• Make processing faster by:

• Caching

• Doing less work

28

Dynamic SpeedsFaster processing: Caching

• Cache major parts of processing

• On speed update: only execute the speed relevant processing

29

Dynamic SpeedsFaster processing: Do less work

• Tradeoff between processing time and query time

30

Dynamic SpeedsFaster processing: Do less work

• Eventually: smaller geographical areas process faster.

31

Dynamic SpeedsFaster processing

• Turnaround time for processing: 3 hours -> 10 minutes 1

• Route request time: 20ms -> 200ms

1 Shuttling of data between processing and api instance not included

32

33

Thanks• OSRM has in-car-ready guidance

• Bring your own speeds

Johan@[email protected]

34

• project-osrm.org

• github.com/mapbox/guidance-sim

• Maps © Mapbox © OpenStreetMap contributors

• Map from JOSM © OpenStreetMap contributors

35