OR-Tools  8.1
local_search.cc File Reference

Go to the source code of this file.

Classes

class  TwoOpt
 
class  Relocate
 
class  Exchange
 
class  Cross
 
class  BaseInactiveNodeToPathOperator
 
class  MakeActiveOperator
 
class  RelocateAndMakeActiveOperator
 
class  MakeActiveAndRelocate
 
class  MakeInactiveOperator
 
class  RelocateAndMakeInactiveOperator
 
class  MakeChainInactiveOperator
 
class  SwapActiveOperator
 
class  ExtendedSwapActiveOperator
 
class  TSPOpt
 
class  TSPLns
 
class  NearestNeighbors
 
class  LinKernighan
 
class  PathLns
 
class  NeighborhoodLimit
 
class  LocalSearchProfiler
 
class  FindOneNeighbor
 
class  LocalSearchPhaseParameters
 

Namespaces

 operations_research
 The vehicle routing library lets one model and solve generic vehicle routing problems ranging from the Traveling Salesman Problem to more complex problems such as the Capacitated Vehicle Routing Problem with Time Windows.
 

Macros

#define MAKE_LOCAL_SEARCH_OPERATOR(OperatorClass)
 

Functions

 ABSL_FLAG (int, cp_local_search_sync_frequency, 16, "Frequency of checks for better solutions in the solution pool.")
 
 ABSL_FLAG (int, cp_local_search_tsp_opt_size, 13, "Size of TSPs solved in the TSPOpt operator.")
 
 ABSL_FLAG (int, cp_local_search_tsp_lns_size, 10, "Size of TSPs solved in the TSPLns operator.")
 
 ABSL_FLAG (bool, cp_use_empty_path_symmetry_breaker, true, "If true, equivalent empty paths are removed from the neighborhood " "of PathOperators")
 
bool LocalOptimumReached (Search *const search)
 
bool AcceptDelta (Search *const search, Assignment *delta, Assignment *deltadelta)
 
void AcceptNeighbor (Search *const search)
 
void AcceptUncheckedNeighbor (Search *const search)
 
template<class T >
LocalSearchOperator * MakeLocalSearchOperator (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64)> start_empty_path_class)
 Operator Factories. More...
 
LocalSearchFilter * MakePathStateFilter (Solver *solver, std::unique_ptr< PathState > path_state, const std::vector< IntVar * > &nexts)
 
LocalSearchFilter * MakeUnaryDimensionFilter (Solver *solver, std::unique_ptr< UnaryDimensionChecker > checker)
 
void InstallLocalSearchProfiler (LocalSearchProfiler *monitor)
 
LocalSearchProfiler * BuildLocalSearchProfiler (Solver *solver)
 
void DeleteLocalSearchProfiler (LocalSearchProfiler *monitor)
 

Macro Definition Documentation

◆ MAKE_LOCAL_SEARCH_OPERATOR

#define MAKE_LOCAL_SEARCH_OPERATOR (   OperatorClass)
Value:
template <> \
LocalSearchOperator* MakeLocalSearchOperator<OperatorClass>( \
Solver * solver, const std::vector<IntVar*>& vars, \
const std::vector<IntVar*>& secondary_vars, \
std::function<int(int64)> start_empty_path_class) { \
return solver->RevAlloc(new OperatorClass( \
vars, secondary_vars, std::move(start_empty_path_class))); \
}

Definition at line 2285 of file local_search.cc.

Function Documentation

◆ ABSL_FLAG() [1/4]

ABSL_FLAG ( bool  ,
cp_use_empty_path_symmetry_breaker  ,
true  ,
"If  true,
equivalent empty paths are removed from the neighborhood " "of PathOperators"   
)

◆ ABSL_FLAG() [2/4]

ABSL_FLAG ( int  ,
cp_local_search_sync_frequency  ,
16  ,
"Frequency of checks for better solutions in the solution pool."   
)

◆ ABSL_FLAG() [3/4]

ABSL_FLAG ( int  ,
cp_local_search_tsp_lns_size  ,
10  ,
"Size of TSPs solved in the TSPLns operator."   
)

◆ ABSL_FLAG() [4/4]

ABSL_FLAG ( int  ,
cp_local_search_tsp_opt_size  ,
13  ,
"Size of TSPs solved in the TSPOpt operator."   
)

Variable Documentation

◆ delta_costs_

int64* const delta_costs_
protected

Definition at line 3390 of file local_search.cc.

◆ delta_sum_

int64 delta_sum_
protected

Definition at line 3393 of file local_search.cc.

◆ filter_enum_

Solver::LocalSearchFilterBound filter_enum_
protected

Definition at line 3391 of file local_search.cc.

◆ incremental_

bool incremental_
protected

Definition at line 3394 of file local_search.cc.

◆ primary_vars_size_

const int primary_vars_size_
protected

Definition at line 3388 of file local_search.cc.

◆ synchronized_costs_

int64* const synchronized_costs_
protected

Definition at line 3389 of file local_search.cc.

◆ synchronized_sum_

int64 synchronized_sum_
protected

Definition at line 3392 of file local_search.cc.

int64
int64_t int64
Definition: integral_types.h:34