OR-Tools  9.3
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

namespace  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, const std::string &dimension_name)
 
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 2294 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

◆ arc

int arc

Definition at line 2751 of file local_search.cc.

◆ delta_costs_

int64_t* const delta_costs_
protected

Definition at line 3451 of file local_search.cc.

◆ delta_sum_

int64_t delta_sum_
protected

Definition at line 3454 of file local_search.cc.

◆ filter_enum_

Solver::LocalSearchFilterBound filter_enum_
protected

Definition at line 3452 of file local_search.cc.

◆ head_index

int head_index

Definition at line 2747 of file local_search.cc.

◆ incremental_

bool incremental_
protected

Definition at line 3455 of file local_search.cc.

◆ index

int index
Examples
tsp.cc, and vrp.cc.

Definition at line 2750 of file local_search.cc.

◆ primary_vars_size_

const int primary_vars_size_
protected

Definition at line 3449 of file local_search.cc.

◆ synchronized_costs_

int64_t* const synchronized_costs_
protected

Definition at line 3450 of file local_search.cc.

◆ synchronized_sum_

int64_t synchronized_sum_
protected

Definition at line 3453 of file local_search.cc.

◆ tail_index

int tail_index

Definition at line 2746 of file local_search.cc.