OR-Tools  9.0
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
 Collection of objects used to extend the Constraint Solver library.
 

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_t)> 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_t)> start_empty_path_class) { \
return solver->RevAlloc(new OperatorClass( \
vars, secondary_vars, std::move(start_empty_path_class))); \
}

Definition at line 2292 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_t* const delta_costs_
protected

Definition at line 3400 of file local_search.cc.

◆ delta_sum_

int64_t delta_sum_
protected

Definition at line 3403 of file local_search.cc.

◆ filter_enum_

Solver::LocalSearchFilterBound filter_enum_
protected

Definition at line 3401 of file local_search.cc.

◆ incremental_

bool incremental_
protected

Definition at line 3404 of file local_search.cc.

◆ primary_vars_size_

const int primary_vars_size_
protected

Definition at line 3398 of file local_search.cc.

◆ synchronized_costs_

int64_t* const synchronized_costs_
protected

Definition at line 3399 of file local_search.cc.

◆ synchronized_sum_

int64_t synchronized_sum_
protected

Definition at line 3402 of file local_search.cc.