Skip to content

Commit a9b1bd8

Browse files
authored
Remove all core-CH left-overs (#6920)
* Remove all core-CH left-overs * Fix formatting * Update CHANGELOG.md
1 parent 1ff096a commit a9b1bd8

File tree

16 files changed

+13
-147
lines changed

16 files changed

+13
-147
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Unreleased
22
- Changes from 5.27.1
33
- Features
4+
- REMOVED: Remove all core-CH left-overs [#6920](https://github.com/Project-OSRM/osrm-backend/pull/6920)
45
- ADDED: Add support for a keepalive_timeout flag. [#6674](https://github.com/Project-OSRM/osrm-backend/pull/6674)
56
- ADDED: Add support for a default_radius flag. [#6575](https://github.com/Project-OSRM/osrm-backend/pull/6575)
67
- ADDED: Add support for disabling feature datasets. [#6666](https://github.com/Project-OSRM/osrm-backend/pull/6666)

docs/nodejs/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ var osrm = new OSRM('network.osrm');
2121
**Parameters**
2222

2323
- `options` **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) \| [String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))** Options for creating an OSRM object or string to the `.osrm` file. (optional, default `{shared_memory:true}`)
24-
- `options.algorithm` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** The algorithm to use for routing. Can be 'CH', 'CoreCH' or 'MLD'. Default is 'CH'.
24+
- `options.algorithm` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** The algorithm to use for routing. Can be 'CH', or 'MLD'. Default is 'CH'.
2525
Make sure you prepared the dataset with the correct toolchain.
2626
- `options.shared_memory` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** Connects to the persistent shared memory datastore.
2727
This requires you to run `osrm-datastore` prior to creating an `OSRM` object.

include/engine/engine_config.hpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,10 @@ namespace osrm::engine
5454
*
5555
* In addition, shared memory can be used for datasets loaded with osrm-datastore.
5656
*
57-
* You can chose between three algorithms:
57+
* You can chose between two algorithms:
5858
* - Algorithm::CH
5959
* Contraction Hierarchies, extremely fast queries but slow pre-processing. The default right
6060
* now.
61-
* - Algorithm::CoreCH
62-
* Deprecated, to be removed in v6.0
63-
* Contraction Hierachies with partial contraction for faster pre-processing but slower
64-
* queries.
6561
* - Algorithm::MLD
6662
* Multi Level Dijkstra, moderately fast in both pre-processing and query.
6763
*
@@ -74,7 +70,6 @@ struct EngineConfig final
7470
enum class Algorithm
7571
{
7672
CH,
77-
CoreCH, // Deprecated, will be removed in v6.0
7873
MLD
7974
};
8075

include/engine/search_engine_data.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ namespace osrm::engine
1212

1313
// Algorithm-dependent heaps
1414
// - CH algorithms use CH heaps
15-
// - CoreCH algorithms use CH
1615
// - MLD algorithms use MLD heaps
1716

1817
template <typename Algorithm> struct SearchEngineData

include/nodejs/node_osrm_support.hpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -296,24 +296,19 @@ inline engine_config_ptr argumentsToEngineConfig(const Napi::CallbackInfo &args)
296296
{
297297
engine_config->algorithm = osrm::EngineConfig::Algorithm::CH;
298298
}
299-
else if (algorithm_str == "CoreCH")
300-
{
301-
engine_config->algorithm = osrm::EngineConfig::Algorithm::CH;
302-
}
303299
else if (algorithm_str == "MLD")
304300
{
305301
engine_config->algorithm = osrm::EngineConfig::Algorithm::MLD;
306302
}
307303
else
308304
{
309-
ThrowError(args.Env(), "algorithm option must be one of 'CH', 'CoreCH', or 'MLD'.");
305+
ThrowError(args.Env(), "algorithm option must be one of 'CH', or 'MLD'.");
310306
return engine_config_ptr();
311307
}
312308
}
313309
else if (!algorithm.IsUndefined())
314310
{
315-
ThrowError(args.Env(),
316-
"algorithm option must be a string and one of 'CH', 'CoreCH', or 'MLD'.");
311+
ThrowError(args.Env(), "algorithm option must be a string and one of 'CH', or 'MLD'.");
317312
return engine_config_ptr();
318313
}
319314

scripts/ci/windows-build.bat

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ IF %ERRORLEVEL% NEQ 0 GOTO ERROR
5858

5959
SET test_region=monaco
6060
SET test_region_ch=ch\monaco
61-
SET test_region_corech=corech\monaco
6261
SET test_region_mld=mld\monaco
6362
SET test_osm=%test_region%.osm.pbf
6463
COPY %PROJECT_DIR%\test\data\%test_region%.osm.pbf %test_osm%
@@ -68,18 +67,13 @@ IF %ERRORLEVEL% NEQ 0 GOTO ERROR
6867
MKDIR ch
6968
XCOPY %test_region%.osrm.* ch\
7069
XCOPY %test_region%.osrm ch\
71-
MKDIR corech
72-
XCOPY %test_region%.osrm.* corech\
73-
XCOPY %test_region%.osrm corech\
7470
MKDIR mld
7571
XCOPY %test_region%.osrm.* mld\
7672
XCOPY %test_region%.osrm mld\
7773
%CONFIGURATION%\osrm-contract.exe %test_region_ch%.osrm
78-
%CONFIGURATION%\osrm-contract.exe --core 0.8 %test_region_corech%.osrm
7974
%CONFIGURATION%\osrm-partition.exe %test_region_mld%.osrm
8075
%CONFIGURATION%\osrm-customize.exe %test_region_mld%.osrm
8176
XCOPY /Y ch\*.* ..\test\data\ch\
82-
XCOPY /Y corech\*.* ..\test\data\corech\
8377
XCOPY /Y mld\*.* ..\test\data\mld\
8478
unit_tests\%CONFIGURATION%\library-tests.exe
8579
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

src/nodejs/node_osrm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Napi::Object Engine::Init(Napi::Env env, Napi::Object exports)
6464
* ```
6565
*
6666
* @param {Object|String} [options={shared_memory: true}] Options for creating an OSRM object or string to the `.osrm` file.
67-
* @param {String} [options.algorithm] The algorithm to use for routing. Can be 'CH', 'CoreCH' or 'MLD'. Default is 'CH'.
67+
* @param {String} [options.algorithm] The algorithm to use for routing. Can be 'CH', or 'MLD'. Default is 'CH'.
6868
* Make sure you prepared the dataset with the correct toolchain.
6969
* @param {Boolean} [options.shared_memory] Connects to the persistent shared memory datastore.
7070
* This requires you to run `osrm-datastore` prior to creating an `OSRM` object.

src/osrm/osrm.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,6 @@ OSRM::OSRM(engine::EngineConfig &config)
3636

3737
// Now, check that the algorithm requested can be used with the data
3838
// that's available.
39-
40-
if (config.algorithm == EngineConfig::Algorithm::CoreCH)
41-
{
42-
util::Log(logWARNING) << "Using CoreCH is deprecated. Falling back to CH";
43-
config.algorithm = EngineConfig::Algorithm::CH;
44-
}
45-
4639
switch (config.algorithm)
4740
{
4841
case EngineConfig::Algorithm::CH:

src/tools/routed.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ std::istream &operator>>(std::istream &in, EngineConfig::Algorithm &algorithm)
6161
in >> token;
6262
boost::to_lower(token);
6363

64-
if (token == "ch" || token == "corech")
64+
if (token == "ch")
6565
algorithm = EngineConfig::Algorithm::CH;
6666
else if (token == "mld")
6767
algorithm = EngineConfig::Algorithm::MLD;
@@ -159,7 +159,7 @@ inline unsigned generateServerProgramOptions(const int argc,
159159
("algorithm,a",
160160
value<EngineConfig::Algorithm>(&config.algorithm)
161161
->default_value(EngineConfig::Algorithm::CH, "CH"),
162-
"Algorithm to use for the data. Can be CH, CoreCH, MLD.") //
162+
"Algorithm to use for the data. Can be CH, MLD.") //
163163
("disable-feature-dataset",
164164
value<std::vector<storage::FeatureDataset>>(&config.disable_feature_dataset)->multitoken(),
165165
"Disables a feature dataset from being loaded into memory if not needed. Options: "

test/data/Makefile

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,16 @@ PROFILE:=$(PROFILE_ROOT)/car.lua
1414

1515
all: data
1616

17-
data: ch/$(DATA_NAME).osrm.hsgr corech/$(DATA_NAME).osrm.hsgr mld/$(DATA_NAME).osrm.partition
17+
data: ch/$(DATA_NAME).osrm.hsgr mld/$(DATA_NAME).osrm.partition
1818

1919
clean:
2020
-rm -r $(DATA_NAME).*
21-
-rm -r ch corech mld
21+
-rm -r ch mld
2222

2323
ch/$(DATA_NAME).osrm: $(DATA_NAME).osrm
2424
mkdir -p ch
2525
cp $(DATA_NAME).osrm.* ch/
2626

27-
corech/$(DATA_NAME).osrm: $(DATA_NAME).osrm
28-
mkdir -p corech
29-
cp $(DATA_NAME).osrm.* corech/
30-
3127
mld/$(DATA_NAME).osrm: $(DATA_NAME).osrm
3228
mkdir -p mld
3329
cp $(DATA_NAME).osrm.* mld/
@@ -42,10 +38,6 @@ ch/$(DATA_NAME).osrm.hsgr: ch/$(DATA_NAME).osrm $(PROFILE) $(OSRM_CONTRACT)
4238
@echo "Running osrm-contract..."
4339
$(TIMER) "osrm-contract\t$@" $(OSRM_CONTRACT) $<
4440

45-
corech/$(DATA_NAME).osrm.hsgr: corech/$(DATA_NAME).osrm $(PROFILE) $(OSRM_CONTRACT)
46-
@echo "Running osrm-contract..."
47-
$(TIMER) "osrm-contract\t$@" $(OSRM_CONTRACT) --core=0.5 $<
48-
4941
mld/$(DATA_NAME).osrm.partition: mld/$(DATA_NAME).osrm $(PROFILE) $(OSRM_PARTITION)
5042
@echo "Running osrm-partition..."
5143
$(TIMER) "osrm-partition\t$@" $(OSRM_PARTITION) $<
@@ -61,11 +53,6 @@ benchmark: data $(DATA_NAME).requests
6153
$(TIMER) "queries\tCH" "cat $(DATA_NAME).requests | xargs curl &> /dev/null"
6254
@cat osrm-routed.pid | xargs kill
6355
@rm osrm-routed.pid
64-
@/bin/sh -c '$(OSRM_ROUTED) --algorithm=CoreCH corech/$(DATA_NAME).osrm > /dev/null & echo "$$!" > osrm-routed.pid'
65-
@sleep 1
66-
$(TIMER) "queries\tCoreCH" "cat $(DATA_NAME).requests | xargs curl &> /dev/null"
67-
@cat osrm-routed.pid | xargs kill
68-
@rm osrm-routed.pid
6956
@/bin/sh -c '$(OSRM_ROUTED) --algorithm=MLD mld/$(DATA_NAME).osrm > /dev/null & echo "$$!" > osrm-routed.pid'
7057
@sleep 1
7158
$(TIMER) "queries\tMLD" "cat $(DATA_NAME).requests | xargs curl &> /dev/null"

0 commit comments

Comments
 (0)