Commit Graph

4511 Commits

Author SHA1 Message Date
Daniel J. Hofmann
345d5e8d9e Make an exception for block barriers in bicycle and foot profile.
This adds `barrier=block` exceptions to the respective white lists.

In addition this adds tests to check for the exception in bicycle and
foot profiles and makes sure cars are still not able to cross them.

Checked with:

    cucumber --tags @barrier -p verify

References:

- https://github.com/Project-OSRM/osrm-backend/issues/1643
- http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dblock
2015-09-07 12:23:21 +02:00
Daniel J. Hofmann
bcc41bf3d1 Fixes undefined behavior from shifting into signed bit; use unsigned literal instead 2015-09-06 01:11:54 +02:00
Daniel Patterson
b2d444d782 Only replace fingerprint file when MD5 changes. Avoids rebuilding several things if nothing has actually changes, as cmake is only looking at timestamps. 2015-09-04 14:07:40 +02:00
Lauren Budorick
bac6703f8e Implement raster source feature to read data from third-party sources, to be used in lua profiles.
* Adds a data structure, RasterSource, to store parsed + queryable data
* Adds bindings for that and relevant data structures as well as source_function and segment_function
* Adds relevant unit tests and cucumber tests
* Bring-your-own-data feature
2015-09-03 22:28:18 -07:00
Daniel J. Hofmann
6cbbd1e5a1 Move destination to access tag white list instead of making exception in car profile.
Tested with:

    cucumber --tags @access -p verify

References:

- https://github.com/Project-OSRM/osrm-backend/issues/1617
- https://github.com/Project-OSRM/osrm-backend/pull/1639
2015-09-03 17:46:20 +02:00
Daniel J. Hofmann
b6ef558c86 Make pedestrian roads marked as destination routable with car profile.
Check provided tests with:

    cucumber --tags @access -p verify

References:

- https://github.com/Project-OSRM/osrm-backend/issues/1617
- http://wiki.openstreetmap.org/wiki/Tag:highway%3Dpedestrian
- http://wiki.openstreetmap.org/wiki/Key:motorcar
- http://wiki.openstreetmap.org/wiki/Key:access
2015-09-03 17:46:20 +02:00
Patrick Niklaus
70bb082973 Fix endless loop 2015-09-03 17:02:34 +02:00
Patrick Niklaus
8b8a19c75d Fix failing matching tests due to gps precision 2015-09-03 17:02:34 +02:00
Patrick Niklaus
0b53242564 Move distance calculation out of loop 2015-09-03 17:02:34 +02:00
Patrick Niklaus
f11bd509b0 Also prune on MAX_DOUBLE 2015-09-03 17:02:33 +02:00
Patrick Niklaus
57608628a4 Use median sample time instead of average to harden against outliers 2015-09-03 17:02:33 +02:00
Patrick Niklaus
f167c3e12e Move heap initialization out of loop 2015-09-03 17:02:33 +02:00
Patrick Niklaus
262b380280 Candidate query for match is now only depending on gps_precision 2015-09-03 17:02:33 +02:00
Patrick Niklaus
ee0c20ae44 Fix typo 2015-09-03 17:02:33 +02:00
Patrick Niklaus
c30c144120 Move matching default in route_parameters.cpp 2015-09-03 17:02:33 +02:00
Patrick Niklaus
a5ee82b0d1 Make matching thresholds adaptable to different sample lengths 2015-09-03 17:02:33 +02:00
Patrick Niklaus
a4f558181d Add status field to match plugin response 2015-09-03 17:02:33 +02:00
Daniel Patterson
120303e6e3 Fixed test case that uses the car profile. 2015-09-03 17:01:11 +02:00
Daniel Patterson
b3822d5802 Enable turn penalties on car profile, using values tuned by comparing real-world sample routes with map-matched routes. 2015-09-03 17:01:11 +02:00
Daniel J. Hofmann
980e4ee89a Don't mix signed and unsigned in comparisons as signed is converted first to unsigned.
This is true:

    -1 > 1u

because the integer literal `-1` is first converted to a large unsigned
value and then compared to the unsigned `1`.

This patch fixes several of those isses in the farthest insertion
algorithm.

`-Wsign-compare` catches those issues.

References:

- http://stackoverflow.com/a/5416498
- C++14 standard
2015-09-02 16:33:03 +02:00
Daniel J. Hofmann
bb1428eeb1 Remove unneeded semicola from profiles.
Nothing fancy, does what it says.
2015-09-02 12:23:26 +02:00
Huyen Chau Nguyen
f6a90e9b42 add missing include and clang-format 2015-09-01 15:20:35 +02:00
Huyen Chau Nguyen
a71159667d add cucumber test for the trip plugin 2015-09-01 15:20:35 +02:00
Huyen Chau Nguyen
74e00cf652 fix some small issues:
remove empty unit test

remove compiler directives

move trip related files from routing_algorithms to algorithms

run clang-format on files

fix all std::size_t related issues

improve code by adding std::move()s

clean up includes

fixing several code stye and improvement issues

add several small code improvements

return single scc in SplitUnaccessibleLocations() when theres only one

change ComputeRoute() to return an InternalRouteResult by value

improve some code style issues
2015-09-01 15:20:35 +02:00
Huyen Chau Nguyen
e773a80b06 remove possibility to choose algorithm but only use brute force and farthest insertion 2015-09-01 15:20:34 +02:00
Huyen Chau Nguyen
e6eea67eeb rename all names with round_trip, trip or tsp to trip to standardize the naming 2015-09-01 15:20:34 +02:00
Huyen Chau Nguyen
8429a1e792 add assertions 2015-09-01 15:20:34 +02:00
Huyen Chau Nguyen
47fbd2a2b5 fix json output such that each trip returns a json object with all information of the trip 2015-09-01 15:20:34 +02:00
Huyen Chau Nguyen
93835b9b94 change input param for tsp algos from a vector to a begin and an end iterator 2015-09-01 15:20:34 +02:00
Huyen Chau Nguyen
2de3fc9f6f fix GetAdjacendEdgeRange of matrix wrapper for tarjan scc and fix wrongly solved merge conflict 2015-09-01 15:20:34 +02:00
Huyen Chau Nguyen
78a8cf6982 add a wrapper for the distance table for better access 2015-09-01 15:20:34 +02:00
Huyen Chau Nguyen
99cf3219d4 have less redundant code for requests with one or multiple SCCs 2015-09-01 15:20:34 +02:00
Huyen Chau Nguyen
7587e97d46 use typedefs from typedefs.h
return roundtrip result as a return parameter and not as an input parameter
2015-09-01 15:20:34 +02:00
Huyen Chau Nguyen
3061c8b854 solve merge conflicts 2015-09-01 15:20:34 +02:00
Huyen Chau Nguyen
77e9e95067 fix bugs
and add todos of code review session with daniel-j-h
2015-09-01 15:20:33 +02:00
Chau Nguyen
6191b6bee2 add parameter to choose algorithm for tsp calculation and remove redundant code 2015-09-01 15:20:33 +02:00
Chau Nguyen
b15f8f68e4 refactor and improve the round trip computation of multiple SCCs
Problem:
- old solution was slow
- depending on the result of TarjanSCC, new distance tables and new phantom node vectors were created to run tsp on it

Solution:
- dont create new distance tables and phantom node vectors
- pass an additional vector with the information which locations are in the same component and ignore all others

fix bug for scc split computation
2015-09-01 15:20:33 +02:00
Chau Nguyen
84c12793e8 clean up some code 2015-09-01 15:20:33 +02:00
Chau Nguyen
6eeadddd4d remove attention on unaccessible locations as we filter them beforehand 2015-09-01 15:20:33 +02:00
Chau Nguyen
a40b3a98dc split algorithms in different plugins for better evaluation
split tsp brute force algorithm for better testing

refactor and clean up
2015-09-01 15:20:33 +02:00
Chau Nguyen
f0d66ff0fb move implementation of algorithms to own hpp in routing_algorithms folder
add changes to improve readability
2015-09-01 15:20:33 +02:00
Chau Nguyen
d3ebd360b2 add brute force algorithm for tsp for small tests 2015-09-01 15:20:33 +02:00
chaupow
ebbe1692c8 add description of farthest insertion algorithm
add farthest insertion algorithm for round trip

farthest insertion: always add the node that add the biggest distance to the total route

farthest insertion: remove total distance computation and compute only diff instead
2015-09-01 15:20:33 +02:00
chaupow
ca7d406787 add timer to check runtime of round trip algorithm 2015-09-01 15:20:33 +02:00
chaupow
a2dc8378f5 rename result_table to dist_table 2015-09-01 15:20:33 +02:00
chaupow
b570e89dbd capsule tsp round trip computation in a private method 2015-09-01 15:20:32 +02:00
chaupow
108f87678a fix bugs and add comments
rename subroute to via_point

merge is_lonely_island and is_connected to make code easier to understand
2015-09-01 15:20:32 +02:00
chaupow
00146ae87c add support for locations that are not reachable as well as information about location permutaton 2015-09-01 15:20:32 +02:00
chaupow
e3757fbbfa add round trip plugin with greedy approximation 2015-09-01 15:20:32 +02:00
Daniel J. Hofmann
ac64e8b15e Remove protobuf dependencies from travis config 2015-08-31 16:57:42 +02:00