[question, bug?] Traffic - how does segment-speed-file really work?
Hello,
I'm using OSRM with traffic and everything worked well. Until I realized, that customize resets my graph...? Situation:
- Let's have a map of Europe in OSRM.
- Start osrm (osrm-routed with mld algorithm and shared memory)
- Run osrm-customize with first 500 node pairs (1st rates update)
- Run osrm-datastore to actually update OSRM
Now routing respects the first update. Let's continue
- Run osrm-customize with next 800 node pairs (2nd rates update)
- Run osrm-datastore to actually update OSRM
Now it respects the second update, but the first one is gone? And this is my question - does it really work this way? Or am I doing something wrong? Does this mean, I must always provide valid updates for whole europe, not just new ones? So in my example, I must provide all 1300 node pairs for second update?
I use version 5.18.0.
Thanks! Michal
@mbukovy osrm-customize updates the datafiles in-place. So the edges updated in your first osrm-customize should be retained.
This is not always desirable, but it sounds like it's what you want, and it should be the default behaviour.
Yes, that's what I want, but that's not how it works for me. I've tested it and it actually clears my previous updates. What could be wrong? @danpat
I've downgraded to 5.17 but still the same. This is my workflow, please tell me, I do something wrong / or is it a bug in OSRM? I use Czech republic map for my tests (I'll do the whole Europe for production)
osrm-extract czech-republic-latest.osm.pbf -p ../osrm-backend-5.17.0/profiles/car.lua --generate-edge-lookuposrm-partition czech-republic-latest.osrmosrm-customize czech-republic-latest.osrmosrm-datastore czech-republic-latest.osrmosrm-routed -s 1 --algorithm=MLD -p 5001
Then I've prepared two test csv files: danger1.csv is a way segment here https://www.openstreetmap.org/node/1139503559 danger2.csv is a way segment here https://www.openstreetmap.org/node/60271726
danger1.csv
1139503559,176916175,0
176916175,1139503559,0
176916174,1139503559,0
1139503559,176916174,0
1139554452,176916174,0
176916174,1139554452,0
176916173,1139554452,0
1139554452,176916173,0
1139554848,176916173,0
176916173,1139554848,0
176916172,1139554848,0
1139554848,176916172,0
176916171,176916172,0
176916172,176916171,0
1139554909,176916171,0
176916171,1139554909,0
176916170,1139554909,0
1139554909,176916170,0
1139554430,176916170,0
176916170,1139554430,0
176916169,1139554430,0
1139554430,176916169,0
246636954,176916169,0
176916169,246636954,0
176916167,246636954,0
246636954,176916167,0
danger2.csv
60271726,60271727,0
60271727,60271726,0
60271727,622152853,0
622152853,60271727,0
622152853,60271728,0
60271728,622152853,0
60271728,3937617060,0
3937617060,60271728,0
3937617060,1320864485,0
1320864485,3937617060,0
1320864485,3269268977,0
3269268977,1320864485,0
3269268977,3269268976,0
3269268976,3269268977,0
3269268976,60271750,0
60271750,3269268976,0
60271750,622152844,0
622152844,60271750,0
622152844,245503029,0
245503029,622152844,0
245503029,267572530,0
267572530,245503029,0
267572530,1323305076,0
1323305076,267572530,0
Now i do
6. osrm-customize czech-republic-latest.osrm --segment-speed-file testrates/danger1.csv
7. osrm-datastore czech-republic-latest.osrm --only-metric
danger1 is working now, routing avoids that way.
Next:
8. osrm-customize czech-republic-latest.osrm --segment-speed-file testrates/danger2.csv
9. osrm-datastore czech-republic-latest.osrm --only-metric
danger2 is working now, but danger1 is not preserved and routing is using this way once again.
osrm-customize czech-republic-latest.osrm --segment-speed-file testrates/danger1.csvosrm-datastore czech-republic-latest.osrm --only-metric
danger1 is working again, but danger2 is not preserved and routing is using this way once again.
You can specify two data files, as listed in the Wiki here: https://github.com/Project-OSRM/osrm-backend/wiki/Traffic#multiple-data-files
Give this a try!
@mbukovy I'm seeing the same thing with version 5.22.0 on Mac. Although the route now doesn't avoid the first csv route, those segments do reflect the modified speed.
Original:

First customize (speed set to zero between Archdale and Hayman):

Second customize (speed set to zero between Aycock and Walker... notice the time):

This issue seems to be stale. It will be closed in 30 days if no further activity occurs.