[OSRM-talk] Route flapping / osrm-prepare adds randomness?

Florian Lohoff f at zz.de
Wed Jul 1 21:56:15 UTC 2015


On Wed, Jul 01, 2015 at 04:09:40PM +0200, Patrick Niklaus wrote:
> Checked the supposedly broken routes, indeed they all have exactly the
> same length. So yes this is down to non-deterministic node ordering
> caused by parallel sorting/parsing. We can't fix this, it is just a
> side-effect of parallel parsing done by osmium and parallel sorting.
> It might be desirable to have consistent soriting, but not at the cost
> of removing parallelization.
> So this isn't a bug after all.

So why does it randomly return an alternate route and sometimes dont?

I have all permutations route A + alternate B - route B with alternate A
- Route A without alternate and Route B without alternate.

It would be okay for me if the route i got last can be found in the
alternates but that does not work reliably.

> The "random" JSON ordering is due to using `std::unordered_map` (you
> might guess the effect of that from its name).

Does it really do an "unsort"? I mean even an unordered map returns
element always in a deterministic way either be order of adding,
reverse, alphabetical, backend storage. 

Flo
-- 
Florian Lohoff                                                 f at zz.de
     We need to self-defense - GnuPG/PGP enable your email today!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20150701/5ef138fb/attachment.sig>


More information about the OSRM-talk mailing list