Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class RelocateSubtrip
Note: This documentation is automatically generated.
Tries to move subtrips after an insertion node.
A subtrip is a subsequence that contains only matched pickup and delivery
nodes, or pickup-only nodes, i.e. it cannot contain a pickup without a
corresponding delivery or vice-versa.
For a given subtrip given by path indices i_1 ... i_k, we call 'rejected'
the nodes with indices i_1 < j < i_k that are not in the subtrip. If the
base_node is a pickup, this operator selects the smallest subtrip starting
at base_node such that rejected nodes are only deliveries. If the base_node
is a delivery, it selects the smallest subtrip ending at base_node such that
rejected nodes are only pickups.
[[["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 `RelocateSubtrip` class in C++ aims to efficiently move subtrips (sequences of matched pickup/delivery or pickup-only nodes) within a route after a new node is inserted."],["It identifies the smallest valid subtrip starting or ending at a given node (`base_node`) ensuring that bypassed nodes are either all deliveries (if `base_node` is a pickup) or all pickups (if `base_node` is a delivery)."],["The class provides methods like `DebugString` for debugging and `MakeNeighbor` for applying the relocation to create a neighboring solution."],["`RelocateSubtrip` utilizes path indices and node classifications (pickup, delivery) to determine subtrip boundaries and ensure the move's validity based on the `base_node` type."]]],["The `RelocateSubtrip` class in C++ aims to move subtrips after an insertion node. Subtrips are sequences of matched pickup/delivery nodes or pickup-only nodes. The method identifies the smallest subtrip starting or ending at a given `base_node`. If the `base_node` is a pickup, rejected nodes (outside the subtrip) must be deliveries; if it's a delivery, rejected nodes must be pickups. Key methods include `MakeNeighbor` (for performing the move) and `DebugString` for a string representation. The class is constructed using path variables, secondary variables, a function to determine the class of an empty path, and routing index pairs.\n"]]