C++ Reference
C++ Reference: Routing
routing_neighborhoods.h
FilteredHeuristicExpensiveChainLNSOperator(std::unique_ptr< RoutingFilteredHeuristic > heuristic, int num_arcs_to_consider, std::function< int64(int64, int64, int64)> arc_cost_for_route_start)
Pair-based neighborhood operators, designed to move nodes by pairs (pairs are static and given).
Definition: routing_neighborhoods.h:102
std::string DebugString() const override
Definition: routing_neighborhoods.h:455
std::string DebugString() const override
Definition: routing_neighborhoods.h:613
PairRelocateOperator(const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64)> start_empty_path_class, const RoutingIndexPairs &index_pairs)
bool MakeNeighbor() override
RelocateSubtrip(const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64)> start_empty_path_class, const RoutingIndexPairs &pairs)
Relocate neighborhood which moves chains of neighbors.
Definition: routing_neighborhoods.h:45
~IndexPairSwapActiveOperator() override
Definition: routing_neighborhoods.h:326
Similar to the move above, but instead of removing one route entirely, the destruction phase consists...
Definition: routing_neighborhoods.h:387
~MakePairActiveOperator() override
Definition: routing_neighborhoods.h:108
std::string DebugString() const override
Definition: routing_neighborhoods.h:196
bool MakeNeighbor() override
std::string DebugString() const override
Definition: routing_neighborhoods.h:291
int64 GetBaseNodeRestartPosition(int base_index) override
Returns the index of the node to which the base node of index base_index must be set to when it reach...
IndexPairSwapActiveOperator(const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64)> start_empty_path_class, const RoutingIndexPairs &index_pairs)
PairExchangeOperator(const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64)> start_empty_path_class, const RoutingIndexPairs &index_pairs)
bool OnSamePathAsPreviousBase(int64 base_index) override
Returns true if a base node has to be on the same path as the "previous" base node (base node of inde...
Operator which iterates through each alternative of a set of pairs.
Definition: routing_neighborhoods.h:282
~PairNodeSwapActiveOperator() override
Definition: routing_neighborhoods.h:496
bool MakeNeighbor() override
ExchangeSubtrip(const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64)> start_empty_path_class, const RoutingIndexPairs &pairs)
bool MakeNeighbor() override
Base class of the local search operators dedicated to path modifications (a path is a set of nodes li...
Definition: constraint_solveri.h:1324
The vehicle routing library lets one model and solve generic vehicle routing problems ranging from th...
Definition: constraint_solveri.h:78
bool MakeNextNeighbor(Assignment *delta, Assignment *deltadelta) override
Redefines MakeNextNeighbor to export a simpler interface.
bool MakeNeighbor() override
std::string DebugString() const override
Definition: routing_neighborhoods.h:166
bool MakeNeighbor() override
std::string DebugString() const override
Definition: routing_neighborhoods.h:55
Operator which exchanges the position of two pairs; for both pairs the first node of the pair must be...
Definition: routing_neighborhoods.h:207
std::string DebugString() const override
Definition: routing_neighborhoods.h:330
~PairExchangeRelocateOperator() override
Definition: routing_neighborhoods.h:244
bool MakeNeighbor() override
Specialization of LocalSearchOperator built from an array of IntVars which specifies the scope of the...
Definition: constraint_solveri.h:1033
~FilteredHeuristicPathLNSOperator() override
Definition: routing_neighborhoods.h:346
MakePairActiveOperator(const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64)> start_empty_path_class, const RoutingIndexPairs &pairs)
bool OnSamePathAsPreviousBase(int64 base_index) override
Returns true if a base node has to be on the same path as the "previous" base node (base node of inde...
Definition: routing_neighborhoods.h:505
bool MakeNeighbor() override
std::string DebugString() const override
Definition: routing_neighborhoods.h:640
PairExchangeRelocateOperator(const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64)> start_empty_path_class, const RoutingIndexPairs &index_pairs)
std::string DebugString() const override
Definition: routing_neighborhoods.h:216
std::string DebugString() const override
Definition: routing_neighborhoods.h:247
Operator which inserts inactive nodes into a path and makes a pair of active nodes inactive.
Definition: routing_neighborhoods.h:320
std::string DebugString() const override
Definition: routing_neighborhoods.h:110
LightPairRelocateOperator(const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64)> start_empty_path_class, const RoutingIndexPairs &index_pairs)
PairNodeSwapActiveOperator(const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64)> start_empty_path_class, const RoutingIndexPairs &index_pairs)
Definition: routing_neighborhoods.h:528
Operator which moves a pair of nodes to another position where the first node of the pair must be bef...
Definition: routing_neighborhoods.h:157
bool RestartAtPathStartOnSynchronize() override
Required to ensure that after synchronization the operator is in a state compatible with GetBaseNodeR...
Definition: routing_neighborhoods.h:124
SwapIndexPairOperator(const std::vector< IntVar * > &vars, const std::vector< IntVar * > &path_vars, const RoutingIndexPairs &index_pairs)
FilteredHeuristicPathLNSOperator(std::unique_ptr< RoutingFilteredHeuristic > heuristic)
bool RestartAtPathStartOnSynchronize() override
Required to ensure that after synchronization the operator is in a state compatible with GetBaseNodeR...
Definition: routing_neighborhoods.h:515
MakePairInactiveOperator(const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64)> start_empty_path_class, const RoutingIndexPairs &index_pairs)
~SwapIndexPairOperator() override
Definition: routing_neighborhoods.h:287
bool MakeOneNeighbor() override
This method should not be overridden. Override MakeNeighbor() instead.
bool MakeNextNeighbor(Assignment *delta, Assignment *deltadelta) override
Redefines MakeNextNeighbor to export a simpler interface.
Definition: routing_neighborhoods.h:561
Operator which makes pairs of active nodes inactive.
Definition: routing_neighborhoods.h:138
~PairExchangeOperator() override
Definition: routing_neighborhoods.h:213
Operator which exchanges the paths of two pairs (path have to be different).
Definition: routing_neighborhoods.h:238
int64 GetBaseNodeRestartPosition(int base_index) override
Returns the index of the node to which the base node of index base_index must be set to when it reach...
Definition: routing_neighborhoods.h:539
bool MakeNeighbor() override
int64 GetBaseNodeRestartPosition(int base_index) override
Returns the index of the node to which the base node of index base_index must be set to when it reach...
Tries to move subtrips after an insertion node.
Definition: routing_neighborhoods.h:606
std::vector< RoutingIndexPair > RoutingIndexPairs
Definition: routing_types.h:45
std::string DebugString() const override
Definition: routing_neighborhoods.h:395
bool MakeNeighbor() override
Definition: routing_neighborhoods.h:577
LNS-like operator based on a filtered first solution heuristic to rebuild the solution,...
Definition: routing_neighborhoods.h:342
~PairRelocateOperator() override
Definition: routing_neighborhoods.h:163
int Size() const
Definition: constraint_solveri.h:847
RelocateExpensiveChain(const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64)> start_empty_path_class, int num_arcs_to_consider, std::function< int64(int64, int64, int64)> arc_cost_for_path_start)
~MakeRelocateNeighborsOperator() override
Definition: routing_neighborhoods.h:52
int64 GetBaseNodeRestartPosition(int base_index) override
Returns the index of the node to which the base node of index base_index must be set to when it reach...
bool OnSamePathAsPreviousBase(int64 base_index) override
Returns true if a base node has to be on the same path as the "previous" base node (base node of inde...
Definition: routing_neighborhoods.h:114
std::string DebugString() const override
Definition: routing_neighborhoods.h:500
bool MakeOneNeighbor() override
This method should not be overridden. Override MakeNeighbor() instead.
~RelocateExpensiveChain() override
Definition: routing_neighborhoods.h:451
MakeRelocateNeighborsOperator(const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64)> start_empty_path_class, RoutingTransitCallback2 arc_evaluator)
bool OnSamePathAsPreviousBase(int64 base_index) override
Returns true if a base node has to be on the same path as the "previous" base node (base node of inde...
Definition: routing_neighborhoods.h:169
bool ConsiderAlternatives(int64 base_index) const override
Indicates if alternatives should be considered when iterating over base nodes.
Definition: routing_neighborhoods.h:175
std::string DebugString() const override
Definition: routing_neighborhoods.h:146
std::string DebugString() const override
Definition: routing_neighborhoods.h:348
void OnStart() override
Called by Start() after synchronizing the operator with the current assignment.
bool MakeNeighbor() override
void SetValue(int64 index, const int64 &value)
Definition: constraint_solveri.h:858
Operator which inserts pairs of inactive nodes into a path and makes an active node inactive.
Definition: routing_neighborhoods.h:490
RelocateExpensiveChain.
Definition: routing_neighborhoods.h:443
bool MakeNeighbor() override
~FilteredHeuristicExpensiveChainLNSOperator() override
Definition: routing_neighborhoods.h:393
std::function< int64(int64, int64)> RoutingTransitCallback2
Definition: routing_types.h:42
~LightPairRelocateOperator() override
Definition: routing_neighborhoods.h:193
bool MakeNextNeighbor(Assignment *delta, Assignment *deltadelta) override
Redefines MakeNextNeighbor to export a simpler interface.
bool MakeNextNeighbor(Assignment *delta, Assignment *deltadelta) override
Redefines MakeNextNeighbor to export a simpler interface.