Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: routing_neighborhoods
Note: 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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["The `routing_neighborhoods` in C++ focuses on defining operators for local search in route optimization."],["These operators primarily modify routes by relocating nodes or chains of nodes to improve solution quality."],["A key operator, `RelocateExpensiveChain`, moves chains of nodes based on cost considerations, aiming for better routes."],["Several classes are provided for implementing various neighborhood search strategies, including exchange, relocation, and swapping operations."],["The documentation outlines a set of specific neighborhood operators, each designed for targeted route modifications."]]],[]]