Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class ExchangeSubtrip
Note: This documentation is automatically generated.
Method |
DebugString | Return type: std::string |
ExchangeSubtrip | Arguments: const std::vector<IntVar*>& vars,
const std::vector<IntVar*>& secondary_vars,
std::function<int(int64_t)> start_empty_path_class,
const RoutingIndexPairs& pairs |
MakeNeighbor | Return type: bool |
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."],[[["\u003cp\u003eThe \u003ccode\u003eExchangeSubtrip\u003c/code\u003e class in C++ facilitates exchanging sub-sequences (subtrips) within a route, primarily for Vehicle Routing Problem solutions.\u003c/p\u003e\n"],["\u003cp\u003eIt utilizes primary and secondary decision variables (\u003ccode\u003evars\u003c/code\u003e, \u003ccode\u003esecondary_vars\u003c/code\u003e) alongside routing index pairs (\u003ccode\u003epairs\u003c/code\u003e) to define and execute the exchange.\u003c/p\u003e\n"],["\u003cp\u003eThe class offers methods for debugging (\u003ccode\u003eDebugString\u003c/code\u003e) and applying the exchange to create a neighboring solution (\u003ccode\u003eMakeNeighbor\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eA user-defined function (\u003ccode\u003estart_empty_path_class\u003c/code\u003e) helps manage empty paths during the exchange process.\u003c/p\u003e\n"]]],["The `ExchangeSubtrip` class in C++ has methods for manipulating routing variables. The `ExchangeSubtrip` constructor takes vectors of `IntVar*` (primary and secondary), a function `start_empty_path_class`, and `RoutingIndexPairs`. `DebugString` returns a string representation of the object. `MakeNeighbor` returns a boolean, presumably indicating if a neighboring solution was successfully created. These methods suggest functionalities for defining and exploring neighborhood solutions in routing optimization.\n"],null,["# ExchangeSubtrip\n\nC++ Reference: class ExchangeSubtrip\n====================================\n\n\nNote: This documentation is automatically generated.\n\n| Method ||\n|--------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [`DebugString`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/routing_neighborhoods.h#L768) | Return type: `std::string ` \u003cbr /\u003e |\n| [`ExchangeSubtrip`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/routing_neighborhoods.h#L763) | \u003cbr /\u003e Arguments: `const std::vector\u003cIntVar*\u003e& vars, const std::vector\u003cIntVar*\u003e& secondary_vars, std::function\u003cint(int64_t)\u003e start_empty_path_class, const RoutingIndexPairs& pairs` \u003cbr /\u003e |\n| [`MakeNeighbor`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/routing_neighborhoods.h#L769) | Return type: `bool ` \u003cbr /\u003e |"]]