Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class IndexPairSwapActiveOperator
Note: This documentation is automatically generated.
Operator which inserts inactive nodes into a path and makes a pair of
active nodes inactive.
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\u003eIndexPairSwapActiveOperator\u003c/code\u003e is designed for manipulating vehicle routes by inserting inactive nodes and deactivating active node pairs.\u003c/p\u003e\n"],["\u003cp\u003eIt works by selecting pairs of indices from a provided list and modifying the active/inactive status of nodes at those positions within the route.\u003c/p\u003e\n"],["\u003cp\u003eThis operator is utilized within constraint programming for tasks like vehicle routing optimization.\u003c/p\u003e\n"],["\u003cp\u003eThe operator includes methods for generating descriptions, constructing neighbors, and managing state during search.\u003c/p\u003e\n"]]],["The `IndexPairSwapActiveOperator` class manages the insertion of inactive nodes into a path and simultaneously deactivates a pair of active nodes. It has methods for creating and managing neighborhoods. Key functions include `DebugString` (returns a string representation), `MakeNeighbor` (returns a boolean), `MakeNextNeighbor` (takes two assignments as input and returns a boolean), and a constructor and destructor. It also receives variables, secondary variables, a start function, and index pairs.\n"],null,["# IndexPairSwapActiveOperator\n\nC++ Reference: class IndexPairSwapActiveOperator\n================================================\n\n\nNote: This documentation is automatically generated.\nOperator which inserts inactive nodes into a path and makes a pair of active nodes inactive.\n\n| Method ||\n|---------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [`DebugString`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/routing_neighborhoods.h#L344) | Return type: `std::string ` \u003cbr /\u003e |\n| [`IndexPairSwapActiveOperator`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/routing_neighborhoods.h#L335) | \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& index_pairs` \u003cbr /\u003e |\n| [`~IndexPairSwapActiveOperator`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/routing_neighborhoods.h#L340) | \u003cbr /\u003e |\n| [`MakeNeighbor`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/routing_neighborhoods.h#L343) | Return type: `bool ` \u003cbr /\u003e |\n| [`MakeNextNeighbor`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/routing_neighborhoods.h#L342) | Return type: `bool ` Arguments: `Assignment* delta, Assignment* deltadelta` \u003cbr /\u003e |"]]