Daniel J. Hofmann
9231335eef
Use Intel TBB's parallel_sort even for nested parallelism.
...
TBB has a global task scheduler (that's one of the reason TBB is not
linked statically but dyanmically instead). This allows control over all
running threads, enabling us to use nested parallelism and the scheduler
doing all the task allocation itself.
That is, nested parallel execution such as in
parallel_for(seq, [](const auto& rng){
parallel_sort(rng);
});
is no problem at all, as the scheduler still claims control over the
global environment.
Therefore, use `parallel_sort` Range overload where possible.
References:
- https://www.threadingbuildingblocks.org/docs/help/hh_goto.htm#reference/algorithms.htm
- https://www.threadingbuildingblocks.org/docs/help/hh_goto.htm#reference/algorithms/parallel_sort_func.htm
- https://www.threadingbuildingblocks.org/docs/help/hh_goto.htm#reference/task_scheduler.htm
- https://www.threadingbuildingblocks.org/docs/help/hh_goto.htm#reference/task_scheduler/task_scheduler_init_cls.htm
- https://www.threadingbuildingblocks.org/docs/help/hh_goto.htm#tbb_userguide/Initializing_and_Terminating_the_Library.htm
2015-09-28 20:26:03 +02:00
Daniel Patterson
5844231a37
Include (road) name of matched nodes in addition to coordinate.
2015-09-23 17:53:34 +02:00
Patrick Niklaus
fe0fe1873a
Add simplification reset that was accidentally removed
2015-09-11 01:34:10 +02:00
Andreas Gruß
de29574314
tests + instructions for map matching
2015-09-11 01:34:10 +02:00
Patrick Niklaus
f11bd509b0
Also prune on MAX_DOUBLE
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
a4f558181d
Add status field to match plugin response
2015-09-03 17:02:33 +02:00
Huyen Chau Nguyen
f6a90e9b42
add missing include and clang-format
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
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
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
62b20769ee
Modernize the code base to C++11 standards and beyond.
...
Apply `clang-modernize` (based on Clang 3.6) transformations to the
codebase while making sure to support Clang>=3.4 and GCC>=4.8.
We apply the transformations in parallel to speed up the quite
time consuming process, and use our `clang-format` style file
to automatically format the code respecting our coding conventions.
We use the following self-explanatory transformations:
* AddOverride
* LoopConvert
* PassByValue
* ReplaceAutoPtr
* UseAuto
* UseNullptr
This required a `compile_commands.json` compilation database, e.g.
ccmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=1
for CMake or check Bear for a Makefile based solution (or even Ninja).
git ls-files -x '*.cpp|*.h' | \
xargs -I{} -P $(nproc) clang-modernize -p build -final-syntax-check -format -style=file -summary -for-compilers=clang-3.4,gcc-4.8 -include . -exclude third_party {}
Boom!
References:
* http://clang.llvm.org/extra/clang-modernize.html
* http://clang.llvm.org/extra/ModernizerUsage.html
2015-08-18 12:56:34 +02:00
Patrick Niklaus
1cc75ca636
Only swap nodes if it contains a big component
2015-08-06 13:20:29 +02:00
MoKob
b526cadebd
Initial version of core ch
...
This improves preprocessing times in favour of worse query performance.
Core size can be set over the --core parameater, default is the old
behaviour to fully contract the graph.
2015-08-01 18:00:48 +02:00
Patrick Niklaus
3248977e02
Update classifier parameters
2015-04-13 22:39:55 +02:00
Patrick Niklaus
7ee8776165
Remove second stage classifier: obsolete with trace splitting
2015-04-13 22:39:55 +02:00
Dennis Luxen
9a61f8b894
add more const keywords, avoid implicit type conversions
2015-04-02 11:27:51 +02:00
Dennis Luxen
9bbbebf31d
use empty() instead of 1>size() to make intent more clear
2015-03-30 13:13:13 +02:00
Dennis Luxen
19765cfa14
remove unneeded include
2015-03-30 13:10:03 +02:00
Patrick Niklaus
d3b9911445
Fix match geometry output
2015-03-17 23:50:59 +01:00
Patrick Niklaus
0c735953c9
Make uturn detection a little less sensitive.
2015-03-08 00:51:07 +01:00
Patrick Niklaus
736bc87480
Fix inverted operator in maximum check
2015-03-07 23:02:14 +01:00
Dennis Luxen
a9c3b343fc
separate model and computation in HMM matching
2015-03-03 12:48:33 +01:00
Dennis Luxen
592bebaf29
renamed: plugins/map_matching.hpp -> plugins/match.hpp to avoid confusion with routing_algorithms/map_matching.hpp
2015-03-03 12:01:40 +01:00
Dennis Luxen
6fb8fdc2bd
fix compilation
...
- define max_number_of_candidates where its used
- add curly braces
- reformat
2015-03-03 11:46:24 +01:00
Patrick Niklaus
d8d46e0f3e
Add routed parameter to limit matching size
2015-03-03 00:48:57 +01:00
Patrick Niklaus
e5830b0116
Add parameters for map matching
2015-03-03 00:48:57 +01:00
Patrick Niklaus
d89b171f49
Simplify json code in map matching plugin
2015-03-03 00:48:57 +01:00
Patrick Niklaus
a760aec791
Add json logger to map_matching
...
This adds additional data to the json response, when OSRM is compiled
in debug mode.
2015-03-03 00:48:57 +01:00