Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
--— Local search decision builder --— More...
Public Member Functions | |
LocalSearch (Assignment *assignment, IntVar *objective, SolutionPool *pool, LocalSearchOperator *ls_operator, DecisionBuilder *sub_decision_builder, RegularLimit *limit, LocalSearchFilterManager *filter_manager) | |
LocalSearch (const std::vector< IntVar * > &vars, IntVar *objective, SolutionPool *pool, DecisionBuilder *first_solution, LocalSearchOperator *ls_operator, DecisionBuilder *sub_decision_builder, RegularLimit *limit, LocalSearchFilterManager *filter_manager) | |
LocalSearch (const std::vector< IntVar * > &vars, IntVar *objective, SolutionPool *pool, DecisionBuilder *first_solution, DecisionBuilder *first_solution_sub_decision_builder, LocalSearchOperator *ls_operator, DecisionBuilder *sub_decision_builder, RegularLimit *limit, LocalSearchFilterManager *filter_manager) | |
LocalSearch (const std::vector< SequenceVar * > &vars, IntVar *objective, SolutionPool *pool, DecisionBuilder *first_solution, LocalSearchOperator *ls_operator, DecisionBuilder *sub_decision_builder, RegularLimit *limit, LocalSearchFilterManager *filter_manager) | |
~LocalSearch () override | |
Decision * | Next (Solver *solver) override |
std::string | DebugString () const override |
-------— Decision Builder -------— | |
void | Accept (ModelVisitor *visitor) const override |
Model Visitor support. | |
Public Member Functions inherited from operations_research::DecisionBuilder | |
DecisionBuilder () | |
DecisionBuilder (const DecisionBuilder &)=delete | |
This type is neither copyable nor movable. | |
DecisionBuilder & | operator= (const DecisionBuilder &)=delete |
~DecisionBuilder () override | |
virtual void | AppendMonitors (Solver *solver, std::vector< SearchMonitor * > *extras) |
void | set_name (absl::string_view name) |
std::string | GetName () const |
Public Member Functions inherited from operations_research::BaseObject | |
BaseObject () | |
BaseObject (const BaseObject &)=delete | |
This type is neither copyable nor movable. | |
BaseObject & | operator= (const BaseObject &)=delete |
virtual | ~BaseObject () |
Protected Member Functions | |
void | PushFirstSolutionDecision (DecisionBuilder *first_solution) |
void | PushLocalSearchDecision () |
--— Local search decision builder --—
Given a first solution (resulting from either an initial assignment or the result of a decision builder), it searches for neighbors using a local search operator. The first solution corresponds to the first leaf of the search. The local search applies to the variables contained either in the assignment or the vector of variables passed.
Definition at line 5270 of file local_search.cc.
operations_research::LocalSearch::LocalSearch | ( | Assignment * | assignment, |
IntVar * | objective, | ||
SolutionPool * | pool, | ||
LocalSearchOperator * | ls_operator, | ||
DecisionBuilder * | sub_decision_builder, | ||
RegularLimit * | limit, | ||
LocalSearchFilterManager * | filter_manager ) |
Definition at line 5317 of file local_search.cc.
operations_research::LocalSearch::LocalSearch | ( | const std::vector< IntVar * > & | vars, |
IntVar * | objective, | ||
SolutionPool * | pool, | ||
DecisionBuilder * | first_solution, | ||
LocalSearchOperator * | ls_operator, | ||
DecisionBuilder * | sub_decision_builder, | ||
RegularLimit * | limit, | ||
LocalSearchFilterManager * | filter_manager ) |
Definition at line 5343 of file local_search.cc.
operations_research::LocalSearch::LocalSearch | ( | const std::vector< IntVar * > & | vars, |
IntVar * | objective, | ||
SolutionPool * | pool, | ||
DecisionBuilder * | first_solution, | ||
DecisionBuilder * | first_solution_sub_decision_builder, | ||
LocalSearchOperator * | ls_operator, | ||
DecisionBuilder * | sub_decision_builder, | ||
RegularLimit * | limit, | ||
LocalSearchFilterManager * | filter_manager ) |
Definition at line 5370 of file local_search.cc.
operations_research::LocalSearch::LocalSearch | ( | const std::vector< SequenceVar * > & | vars, |
IntVar * | objective, | ||
SolutionPool * | pool, | ||
DecisionBuilder * | first_solution, | ||
LocalSearchOperator * | ls_operator, | ||
DecisionBuilder * | sub_decision_builder, | ||
RegularLimit * | limit, | ||
LocalSearchFilterManager * | filter_manager ) |
Definition at line 5397 of file local_search.cc.
|
override |
Definition at line 5424 of file local_search.cc.
|
overridevirtual |
Model Visitor support.
We collect decision variables from the assignment.
Reimplemented from operations_research::DecisionBuilder.
Definition at line 5427 of file local_search.cc.
|
inlineoverridevirtual |
-------— Decision Builder -------—
Reimplemented from operations_research::DecisionBuilder.
Definition at line 5296 of file local_search.cc.
This is equivalent to a multi-restart decision builder
(user): abstract this from the local search part
(user): handle the case where the tree depth is not enough to hold all solutions.
A local optimum has been reached. The search will continue only if we accept up-hill moves (due to metaheuristics). In this case we need to reset neighborhood optimal routes.
Next time go to next decision
Implements operations_research::DecisionBuilder.
Definition at line 5459 of file local_search.cc.
|
protected |
Definition at line 5514 of file local_search.cc.
|
protected |
Definition at line 5527 of file local_search.cc.