Skip to content

Commit 7137459

Browse files
daniel-j-hdanpat
authored andcommitted
Makes MLD default algorithm in example to avoid confusion, see #4702
1 parent f57fd4f commit 7137459

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ install:
423423
script:
424424
- if [[ $TARGET_ARCH == armhf ]] ; then echo "Skip tests for $TARGET_ARCH" && exit 0 ; fi
425425
- make -C test/data benchmark
426-
- ./example/build/osrm-example test/data/ch/monaco.osrm
426+
- ./example/build/osrm-example test/data/mld/monaco.osrm
427427
# All tests assume to be run from the build directory
428428
- pushd ${OSRM_BUILD_DIR}
429429
- ./unit_tests/library-tests

example/example.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,17 @@ int main(int argc, const char *argv[])
3030

3131
// Configure based on a .osrm base path, and no datasets in shared mem from osrm-datastore
3232
EngineConfig config;
33+
3334
config.storage_config = {argv[1]};
3435
config.use_shared_memory = false;
3536

37+
// We support two routing speed up techniques:
38+
// - Contraction Hierarchies (CH): requires extract+contract pre-processing
39+
// - Multi-Level Dijkstra (MLD): requires extract+partition+customize pre-processing
40+
//
41+
// config.algorithm = EngineConfig::Algorithm::CH;
42+
config.algorithm = EngineConfig::Algorithm::MLD;
43+
3644
// Routing machine with several services (such as Route, Table, Nearest, Trip, Match)
3745
const OSRM osrm{config};
3846

0 commit comments

Comments
 (0)