Skip to content

use_relocate_neighbors is bypassed in GetNeighborhoodOperators #5132

@N40

Description

@N40

Version: stable
Language: C++

Method LocalSearchOperator* Model::GetNeighborhoodOperators()

What did you expect to see

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?

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.

Metadata

Metadata

Labels

BugSolver: RoutingUses the Routing library and the original CP solver

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions