# C++ Reference: class MakeRelocateNeighborsOperator

This documentation is automatically generated.

Relocate neighborhood which moves chains of neighbors. The operator starts by relocating a node n after a node m, then continues moving nodes which were after n as long as the "cost" added is less than the "cost" of the arc (m, n). If the new chain doesn't respect the domain of next variables, it will try reordering the nodes. Possible neighbors for path 1 -> A -> B -> C -> D -> E -> 2 (where (1, 2) are first and last nodes of the path and can therefore not be moved, A must be performed before B, and A, D and E are located at the same place): 1 -> A -> C -> [B] -> D -> E -> 2 1 -> A -> C -> D -> [B] -> E -> 2 1 -> A -> C -> D -> E -> [B] -> 2 1 -> A -> B -> D -> [C] -> E -> 2 1 -> A -> B -> D -> E -> [C] -> 2 1 -> A -> [D] -> [E] -> B -> C -> 2 1 -> A -> B -> [D] -> [E] -> C -> 2 1 -> A -> [E] -> B -> C -> D -> 2 1 -> A -> B -> [E] -> C -> D -> 2 1 -> A -> B -> C -> [E] -> D -> 2 This operator is extremely useful to move chains of nodes which are located at the same place (for instance nodes part of a same stop). TODO(user): Consider merging with standard Relocate in local_search.cc.Method | |
---|---|

`DebugString` | Return type: |

`MakeNeighbor` | Return type: |

`MakeRelocateNeighborsOperator` | Arguments: |

`~MakeRelocateNeighborsOperator` |