Closed frodrigo closed 9 years ago
The same profile with a speed=1 do the same result on France extract. Never ends.
Do you have a URL where I can download the same extract you're using? I am doing fixed-speed extract/prepare on a USA datafile with no problems with 4.8.1.
As as know speed = 0.0001
fails on Andorra and Luxembourg from geofabrik
speed=1
fail on France from geofabrik.
What version of OSRM are you using? Can you copy/paste the output of osrm-extract
and osrm-prepare
?
OSRM 4.8.1 on Ubuntu 14.04.2
fred@ubuntu-server:~/osrm-backend$ ./build/osrm-extract andorra-latest.osm.pbf
[info] Input file: andorra-latest.osm.pbf
[info] Profile: profile.lua
[info] Threads: 2
[info] Using script profile.lua
[STXXL-MSG] STXXL v1.3.1 (release)
[STXXL-ERRMSG] Warning: no config file found.
[STXXL-ERRMSG] Using default disk configuration.
[STXXL-MSG] 1 disks are allocated, total space: 1000 MiB
[info] Parsing in progress..
[info] input file generated by Osmium (http://wiki.openstreetmap.org/wiki/Osmium)
[info] timestamp: 2015-09-27T21:23:01Z
[info] Using turn restrictions
[info] Found 3 exceptions to turn restrictions:
[info] motorcar
[info] motor_vehicle
[info] vehicle
[info] Parsing finished after 0.357934 seconds
[info] Raw input contains 123876 nodes, 5747 ways, and 142 relations, and 0 unknown entities
[extractor] Sorting used nodes ... ok, after 0.010759s
[extractor] Erasing duplicate nodes ... ok, after 0.005772s
[extractor] Sorting all nodes ... ok, after 0.021081s
[extractor] Building node id map ... ok, after 0.015338s
[extractor] setting number of nodes ... ok
[extractor] Confirming/Writing used nodes ... ok, after 0.006386s
[info] Processed 70623 nodes
[extractor] Sorting edges by start ... ok, after 0.03585s
[extractor] Setting start coords ... ok, after 0.020006s
[extractor] Sorting edges by target ... ok, after 0.033041s
[extractor] Computing edge weights ... ok, after 0.055363s
[extractor] Sorting edges by renumbered start ... ok, after 0.026275s
[extractor] Writing used egdes ... ok, after 0.004764s
[extractor] setting number of edges ... ok
[info] Processed 71657 edges
[extractor] Sorting used ways ... ok, after 0.005861s
[extractor] Sorting 17 restriction. by from... ok, after 0.005436s
[extractor] Fixing restriction starts ... ok, after 0.003737s
[extractor] Sorting restrictions. by to ... ok, after 0.007261s
[extractor] Fixing restriction ends ... ok, after 0.002283s
[info] usable restrictions: 17
[extractor] writing street name index ... ok, after 0.00049s
[info] extraction finished after 0.760565s
[info] To prepare the data for routing, run: ./osrm-prepare andorra-latest.osrm
[STXXL-ERRMSG] Removing disk file created from default configuration: /var/tmp/stxxl
fred@ubuntu-server:~/osrm-backend$ ./build/osrm-prepare andorra-latest.osrm
[info] Input file: andorra-latest.osrm
[info] Restrictions file: andorra-latest.osrm.restrictions
[info] Profile: profile.lua
[info] Threads: 2
[info] Generating edge-expanded graph representation
[info] - 17 restrictions.
[info] Importing n = 70623 nodes
[info] - 2 bollard nodes, 0 traffic lights
[info] and 71657 edges
[info] Graph loaded ok and has 71657 edges
. 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100%
[info] Node compression ratio: 0.0531555
[info] Edge compression ratio: 0.0668183
. 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100%
[info] Generated 71657 nodes in edge-expanded graph
[info] generating edge-expanded edges
. 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100%
[info] Generated 71657 edge based nodes
[info] Node-based graph contains 8515 edges
[info] Edge-expanded graph ...
[info] contains 15498 edges
[info] skips 16 turns, defined by 17 restrictions
[info] skips 6643 U turns
[info] skips 4 turns over barriers
[info] Timing statistics for edge-expanded graph:
[info] Renumbering edges: 0.000478s
[info] Generating nodes: 0.020419s
[info] Generating edges: 0.036728s
[info] building r-tree ...
[info] large component [4]=8425
[info] SCC run took: 0.00154662s
[info] constructing r-tree of 71657 edge elements build on-top of 70623 coordinates
[info] finished r-tree construction in 0.038825 seconds
[info] writing node map ...
[STXXL-MSG] STXXL v1.3.1 (release)
[STXXL-ERRMSG] Warning: no config file found.
[STXXL-ERRMSG] Using default disk configuration.
[STXXL-MSG] 1 disks are allocated, total space: 1000 MiB
merged 24 edges out of 30996
contractor finished initalization
initializing elimination PQ ...ok
preprocessing 8515 nodes .... 10% . 20%
If you set the speed for edges very low, it will result in a duration of 0
(rounded to deci-seconds). Contractor
make sure that every edge has at least duration 1
, but on a graph with unit-weights I pretty sure that the contraction routine will just take ages. (there is no hierarchy in the network).
So this is actually working as expected, but I'm curious why you would do that?
With speed=1 it ends the prepare of Andorra but not on France. With speed of 100 it ends on France.
Maybe I misuse the profile or don't understand something. My goal it's to run an OSRM for shortest distance.
@frodrigo it is a rounding issue. If your speed is too low, small segments will get a duration of 0
because speed * length < 0.1 seconds
.
Ok, I got the point. Thank you.
I setup a test profile (to compute shortest route). When I set a speed of 0.0001 osrm-prepare never finish the job.
The the profile content: