Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class PairRelocateOperator
Note: This documentation is automatically generated.
Operator which moves a pair of nodes to another position where the first
node of the pair must be before the second node on the same path.
Possible neighbors for the path 1 -> A -> B -> 2 -> 3 (where (1, 3) are
first and last nodes of the path and can therefore not be moved, and (A, B)
is a pair of nodes):
1 -> [A] -> 2 -> [B] -> 3
1 -> 2 -> [A] -> [B] -> 3
The pair can be moved to another path.
[[["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 PairRelocateOperator moves two connected nodes to a different position within the same route or to another route."],["The first node of the pair must precede the second node on the same path after the move."],["This operator is used within the constraint solver for vehicle routing problems."],["The operator's behavior can be customized by specifying index pairs and empty path classes."]]],["The `PairRelocateOperator` class allows moving a pair of nodes within a path or to a different path, ensuring the first node precedes the second. It defines methods `MakeNeighbor` (to perform the move operation) and `DebugString` (to return a string representation). The constructor `PairRelocateOperator` takes variables, secondary variables, a function for empty path classes, and index pairs. A destructor `~PairRelocateOperator` is also included. Valid moves include relocating the pair within the same path.\n"]]