Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <algorithm>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <limits>
#include <memory>
#include <numeric>
#include <optional>
#include <random>
#include <string>
#include <utility>
#include <vector>
#include "absl/algorithm/container.h"
#include "absl/container/flat_hash_map.h"
#include "absl/container/flat_hash_set.h"
#include "absl/flags/flag.h"
#include "absl/log/check.h"
#include "absl/random/distributions.h"
#include "absl/random/random.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"
#include "absl/strings/string_view.h"
#include "absl/time/time.h"
#include "absl/types/span.h"
#include "ortools/base/iterator_adaptors.h"
#include "ortools/base/logging.h"
#include "ortools/base/map_util.h"
#include "ortools/base/strong_int.h"
#include "ortools/base/strong_vector.h"
#include "ortools/base/timer.h"
#include "ortools/constraint_solver/constraint_solver.h"
#include "ortools/constraint_solver/constraint_solveri.h"
#include "ortools/graph/hamiltonian_path.h"
#include "ortools/util/bitset.h"
#include "ortools/util/saturated_arithmetic.h"
Go to the source code of this file.
Namespaces | |
namespace | operations_research |
In SWIG mode, we don't want anything besides these top-level includes. | |
Macros | |
#define | MAKE_LOCAL_SEARCH_OPERATOR(OperatorClass) |
#define | MAKE_LOCAL_SEARCH_OPERATOR_WITH_NEIGHBORS(OperatorClass) |
Typedefs | |
using | operations_research::VariableDomainId = LocalSearchState::VariableDomainId |
using | operations_research::NodeId = SubDagComputer::NodeId |
using | operations_research::ArcId = SubDagComputer::ArcId |
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 | operations_research::LocalOptimumReached (Search *search) |
Returns true if a local optimum has been reached and cannot be improved. | |
bool | operations_research::AcceptDelta (Search *search, Assignment *delta, Assignment *deltadelta) |
void | operations_research::AcceptNeighbor (Search *search) |
Notifies the search that a neighbor has been accepted by local search. | |
void | operations_research::AcceptUncheckedNeighbor (Search *search) |
template<class T > | |
LocalSearchOperator * | operations_research::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. | |
template<class T > | |
LocalSearchOperator * | operations_research::MakeLocalSearchOperatorWithNeighbors (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, std::function< const std::vector< int > &(int, int)> get_neighbors) |
LocalSearchFilter * | operations_research::MakePathStateFilter (Solver *solver, std::unique_ptr< PathState > path_state, const std::vector< IntVar * > &nexts) |
LocalSearchFilter * | operations_research::MakeDimensionFilter (Solver *solver, std::unique_ptr< DimensionChecker > checker, const std::string &dimension_name) |
void | operations_research::InstallLocalSearchProfiler (LocalSearchProfiler *monitor) |
LocalSearchProfiler * | operations_research::BuildLocalSearchProfiler (Solver *solver) |
void | operations_research::DeleteLocalSearchProfiler (LocalSearchProfiler *monitor) |
#define MAKE_LOCAL_SEARCH_OPERATOR | ( | OperatorClass | ) |
Definition at line 2444 of file local_search.cc.
#define MAKE_LOCAL_SEARCH_OPERATOR_WITH_NEIGHBORS | ( | OperatorClass | ) |
Definition at line 2454 of file local_search.cc.
ABSL_FLAG | ( | bool | , |
cp_use_empty_path_symmetry_breaker | , | ||
true | , | ||
"If | true, | ||
equivalent empty paths are removed from the neighborhood " "of PathOperators" | ) |
ABSL_FLAG | ( | int | , |
cp_local_search_sync_frequency | , | ||
16 | , | ||
"Frequency of checks for better solutions in the solution pool." | ) |
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
ABSL_FLAG | ( | int | , |
cp_local_search_tsp_lns_size | , | ||
10 | , | ||
"Size of TSPs solved in the TSPLns operator." | ) |
ABSL_FLAG | ( | int | , |
cp_local_search_tsp_opt_size | , | ||
13 | , | ||
"Size of TSPs solved in the TSPOpt operator." | ) |
int arc |
Definition at line 2839 of file local_search.cc.
|
protected |
Definition at line 3563 of file local_search.cc.
|
protected |
Definition at line 3566 of file local_search.cc.
|
protected |
Definition at line 3564 of file local_search.cc.
int head_index |
Definition at line 2835 of file local_search.cc.
|
protected |
Definition at line 3567 of file local_search.cc.
int index |
Definition at line 2838 of file local_search.cc.
|
protected |
Definition at line 3561 of file local_search.cc.
|
protected |
Definition at line 3562 of file local_search.cc.
|
protected |
Definition at line 3565 of file local_search.cc.
int tail_index |
Definition at line 2834 of file local_search.cc.