-------— Local search operators -------— More...
#include <constraint_solveri.h>


Public Member Functions | |
| LocalSearchOperator () | |
| ~LocalSearchOperator () override | |
| virtual bool | MakeNextNeighbor (Assignment *delta, Assignment *deltadelta)=0 |
| virtual void | Start (const Assignment *assignment)=0 |
| virtual void | Reset () |
| virtual const LocalSearchOperator * | Self () const |
| virtual bool | HasFragments () const |
| virtual bool | HoldsDelta () const |
| virtual std::string | DebugString () const |
-------— Local search operators -------—
The base class for all local search operators.
A local search operator is an object that defines the neighborhood of a solution. In other words, a neighborhood is the set of solutions which can be reached from a given solution using an operator.
The behavior of the LocalSearchOperator class is similar to iterators. The operator is synchronized with an assignment (gives the current values of the variables); this is done in the Start() method.
Then one can iterate over the neighbors using the MakeNextNeighbor method. This method returns an assignment which represents the incremental changes to the current solution. It also returns a second assignment representing the changes to the last solution defined by the neighborhood operator; this assignment is empty if the neighborhood operator cannot track this information.
(user): rename Start to Synchronize ?
(user): decouple the iterating from the defining of a neighbor.
Definition at line 813 of file constraint_solveri.h.
|
inline |
Definition at line 815 of file constraint_solveri.h.
|
inlineoverride |
Definition at line 816 of file constraint_solveri.h.
|
inlinevirtualinherited |
Reimplemented in operations_research::Pack, operations_research::Assignment, operations_research::SequenceVar, operations_research::RegularLimit, operations_research::SearchLimit, operations_research::OptimizeVar, operations_research::SolutionCollector, operations_research::IntVarIterator, operations_research::Constraint, operations_research::Demon, operations_research::DecisionBuilder, operations_research::Decision, operations_research::PropagationBaseObject, operations_research::ArrayWithOffset< T >, operations_research::SearchLog, operations_research::BooleanVar, operations_research::LocalSearchMonitor, operations_research::PropagationMonitor, operations_research::LocalSearchFilterManager, operations_research::PathWithPreviousNodesOperator, operations_research::DelayedCallMethod2< T, P, Q >, operations_research::DelayedCallMethod1< T, P >, operations_research::DelayedCallMethod0< T >, operations_research::CallMethod3< T, P, Q, R >, operations_research::CallMethod2< T, P, Q >, operations_research::CallMethod1< T, P >, operations_research::ExchangeSubtrip, operations_research::CallMethod0< T >, operations_research::RelocateSubtrip, operations_research::PairNodeSwapActiveOperator< swap_first >, operations_research::RelocateExpensiveChain, operations_research::IndexPairSwapActiveOperator, operations_research::SwapIndexPairOperator, operations_research::PairExchangeRelocateOperator, operations_research::PairExchangeOperator, operations_research::LightPairRelocateOperator, operations_research::PairRelocateOperator, operations_research::MakePairInactiveOperator, operations_research::MakePairActiveOperator, and operations_research::MakeRelocateNeighborsOperator.
Definition at line 3138 of file constraint_solver.h.
|
inlinevirtual |
Reimplemented in operations_research::BaseLns.
Definition at line 823 of file constraint_solveri.h.
|
inlinevirtual |
Reimplemented in operations_research::VarLocalSearchOperator< V, Val, Handler >, and operations_research::VarLocalSearchOperator< IntVar, int64, IntVarLocalSearchHandler >.
Definition at line 824 of file constraint_solveri.h.
|
pure virtual |
|
inlinevirtual |
Reimplemented in operations_research::PathOperator.
Definition at line 819 of file constraint_solveri.h.
|
inlinevirtual |
Definition at line 821 of file constraint_solveri.h.
|
pure virtual |