C++ Reference
C++ Reference: Routing
Detailed Description
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.
Definition at line 805 of file 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 |
Constructor & Destructor Documentation
◆ LocalSearchOperator()
|
inline |
Definition at line 807 of file constraint_solveri.h.
◆ ~LocalSearchOperator()
|
inlineoverride |
Definition at line 808 of file constraint_solveri.h.
Member Function Documentation
◆ HasFragments()
|
inlinevirtual |
Reimplemented in BaseLns.
Definition at line 815 of file constraint_solveri.h.
◆ HoldsDelta()
|
inlinevirtual |
Reimplemented in VarLocalSearchOperator< V, Val, Handler >.
Definition at line 816 of file constraint_solveri.h.
◆ MakeNextNeighbor()
|
pure virtual |
◆ Reset()
|
inlinevirtual |
Reimplemented in PathOperator.
Definition at line 811 of file constraint_solveri.h.
◆ Self()
|
inlinevirtual |
Definition at line 813 of file constraint_solveri.h.
◆ Start()
|
pure virtual |
The documentation for this class was generated from the following file: