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.
Method |
DebugString | Return type: std::string |
MakeNeighbor | Return type: bool |
RelocateSubtrip | Arguments: const std::vector<IntVar*>& vars,
const std::vector<IntVar*>& secondary_vars,
std::function<int(int64_t)> start_empty_path_class,
const RoutingIndexPairs& pairs |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-06 UTC.
[null,null,["Last updated 2024-08-06 UTC."],[],["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"],null,[]]