google / google/or-tools

use_relocate_neighbors is bypassed in GetNeighborhoodOperators

Open
#5,132 1 comment 0 reactions 3 assignees Claimed by @StevenGay View on GitHub
Bug Solver: Routing
Dominant language
C++
Stars
14.1k
Forks
2.5k
Avg merge
8h 39m
Merged PRs (30d)
72

Description

Version: stable
Language: C++

Method `LocalSearchOperator* Model::GetNeighborhoodOperators()`

**What did you expect to see**
```c++
if (!pickup_delivery_pairs_.empty() and
search_parameters.local_search_operators().use_relocate_neighbors() ==
BOOL_TRUE) {
operators.push_back(local_search_operators_[RELOCATE_NEIGHBORS]);
}
```
**What did you see instead?**
```c++
if (!pickup_delivery_pairs_.empty() ||
search_parameters.local_search_operators().use_relocate_neighbors() ==
BOOL_TRUE) {
operators.push_back(local_search_operators_[RELOCATE_NEIGHBORS]);
}
```

**Issue**

I cannot controll the neighborhood operator, since one of them (see above) is bypassing the search parameters.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.