From 7137459fb0d360fe248bcd50927f84d594c7e643 Mon Sep 17 00:00:00 2001 From: "Daniel J. Hofmann" Date: Fri, 24 Nov 2017 11:40:28 +0100 Subject: [PATCH] Makes MLD default algorithm in example to avoid confusion, see #4702 --- .travis.yml | 2 +- example/example.cpp | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9aff6228b..50256cd6f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -423,7 +423,7 @@ install: script: - if [[ $TARGET_ARCH == armhf ]] ; then echo "Skip tests for $TARGET_ARCH" && exit 0 ; fi - make -C test/data benchmark - - ./example/build/osrm-example test/data/ch/monaco.osrm + - ./example/build/osrm-example test/data/mld/monaco.osrm # All tests assume to be run from the build directory - pushd ${OSRM_BUILD_DIR} - ./unit_tests/library-tests diff --git a/example/example.cpp b/example/example.cpp index edce8d17a..6cd6eac82 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -30,9 +30,17 @@ int main(int argc, const char *argv[]) // Configure based on a .osrm base path, and no datasets in shared mem from osrm-datastore EngineConfig config; + config.storage_config = {argv[1]}; config.use_shared_memory = false; + // We support two routing speed up techniques: + // - Contraction Hierarchies (CH): requires extract+contract pre-processing + // - Multi-Level Dijkstra (MLD): requires extract+partition+customize pre-processing + // + // config.algorithm = EngineConfig::Algorithm::CH; + config.algorithm = EngineConfig::Algorithm::MLD; + // Routing machine with several services (such as Route, Table, Nearest, Trip, Match) const OSRM osrm{config};