![]() |
OR-Tools
8.2
|
Base operator class for operators manipulating variables.
Definition at line 814 of file constraint_solveri.h.
Public Member Functions | |
VarLocalSearchOperator () | |
VarLocalSearchOperator (Handler var_handler) | |
~VarLocalSearchOperator () override | |
bool | HoldsDelta () const override |
void | Start (const Assignment *assignment) override |
This method should not be overridden. More... | |
virtual bool | IsIncremental () const |
int | Size () const |
const Val & | Value (int64 index) const |
Returns the value in the current assignment of the variable of given index. More... | |
V * | Var (int64 index) const |
Returns the variable of given index. More... | |
virtual bool | SkipUnchanged (int index) const |
const Val & | OldValue (int64 index) const |
void | SetValue (int64 index, const Val &value) |
bool | Activated (int64 index) const |
void | Activate (int64 index) |
void | Deactivate (int64 index) |
bool | ApplyChanges (Assignment *delta, Assignment *deltadelta) const |
void | RevertChanges (bool incremental) |
void | AddVars (const std::vector< V * > &vars) |
virtual void | OnStart () |
Called by Start() after synchronizing the operator with the current assignment. More... | |
virtual bool | MakeNextNeighbor (Assignment *delta, Assignment *deltadelta)=0 |
virtual void | Reset () |
virtual const LocalSearchOperator * | Self () const |
virtual bool | HasFragments () const |
virtual std::string | DebugString () const |
Protected Member Functions | |
void | MarkChange (int64 index) |
OnStart() should really be protected, but then SWIG doesn't see it. More... | |
Protected Attributes | |
std::vector< V * > | vars_ |
std::vector< Val > | values_ |
std::vector< Val > | old_values_ |
std::vector< Val > | prev_values_ |
std::vector< int > | assignment_indices_ |
Bitset64 | activated_ |
Bitset64 | was_activated_ |
SparseBitset | changes_ |
SparseBitset | delta_changes_ |
bool | cleared_ |
Handler | var_handler_ |
|
inline |
Definition at line 816 of file constraint_solveri.h.
|
inlineexplicit |
Definition at line 817 of file constraint_solveri.h.
|
inlineoverride |
Definition at line 822 of file constraint_solveri.h.
|
inline |
Definition at line 856 of file constraint_solveri.h.
|
inline |
Definition at line 855 of file constraint_solveri.h.
|
inline |
Definition at line 901 of file constraint_solveri.h.
|
inline |
Definition at line 864 of file constraint_solveri.h.
|
inline |
Definition at line 860 of file constraint_solveri.h.
|
inlinevirtualinherited |
Reimplemented in Trace, LocalSearchMonitorMaster, PropagationBaseObject, Decision, DecisionBuilder, Demon, Constraint, IntVarIterator, SolutionCollector, OptimizeVar, SearchLimit, RegularLimit, SequenceVar, Assignment, Pack, CallMethod0< T >, CallMethod1< T, P >, CallMethod2< T, P, Q >, CallMethod3< T, P, Q, R >, DelayedCallMethod0< T >, DelayedCallMethod1< T, P >, DelayedCallMethod2< T, P, Q >, LocalSearchFilterManager, PropagationMonitor, LocalSearchMonitor, BooleanVar, SearchLog, ArrayWithOffset< T >, DemonProfiler, IfThenElseCt, PiecewiseLinearExpr, TwoOpt, Relocate, Exchange, Cross, MakeActiveOperator, RelocateAndMakeActiveOperator, MakeActiveAndRelocate, MakeInactiveOperator, RelocateAndMakeInactiveOperator, MakeChainInactiveOperator, SwapActiveOperator, ExtendedSwapActiveOperator, TSPOpt, TSPLns, LinKernighan, PathLns, NeighborhoodLimit, LocalSearchProfiler, FindOneNeighbor, LocalSearchPhaseParameters, Dimension, GlobalVehicleBreaksConstraint, IntVarFilteredDecisionBuilder, CPFeasibilityFilter, MakeRelocateNeighborsOperator, MakePairActiveOperator, MakePairInactiveOperator, PairRelocateOperator, LightPairRelocateOperator, PairExchangeOperator, PairExchangeRelocateOperator, SwapIndexPairOperator, IndexPairSwapActiveOperator, FilteredHeuristicPathLNSOperator, RelocatePathAndHeuristicInsertUnperformedOperator, FilteredHeuristicExpensiveChainLNSOperator, FilteredHeuristicCloseNodesLNSOperator, RelocateExpensiveChain, PairNodeSwapActiveOperator< swap_first >, RelocateSubtrip, ExchangeSubtrip, and SymmetryManager.
Definition at line 3156 of file constraint_solver.h.
|
inlinevirtualinherited |
Reimplemented in BaseLns, and PathLns.
Definition at line 808 of file constraint_solveri.h.
|
inlineoverridevirtual |
Reimplemented from LocalSearchOperator.
Definition at line 823 of file constraint_solveri.h.
|
inlinevirtual |
Reimplemented in TwoOpt.
Definition at line 839 of file constraint_solveri.h.
|
pure virtualinherited |
|
inlineprotected |
OnStart() should really be protected, but then SWIG doesn't see it.
So we make it public, but only subclasses should access to it (to override it).
Definition at line 925 of file constraint_solveri.h.
|
inline |
Definition at line 850 of file constraint_solveri.h.
|
inlinevirtual |
Called by Start() after synchronizing the operator with the current assignment.
Should be overridden instead of Start() to avoid calling VarLocalSearchOperator::Start explicitly.
Reimplemented in SwapIndexPairOperator.
Definition at line 920 of file constraint_solveri.h.
|
inlinevirtualinherited |
Reimplemented in PathOperator.
Definition at line 804 of file constraint_solveri.h.
|
inline |
Definition at line 888 of file constraint_solveri.h.
|
inlinevirtualinherited |
Definition at line 806 of file constraint_solveri.h.
|
inline |
Definition at line 851 of file constraint_solveri.h.
|
inline |
Definition at line 840 of file constraint_solveri.h.
|
inlinevirtual |
Reimplemented in PathOperator.
Definition at line 849 of file constraint_solveri.h.
|
inlineoverridevirtual |
This method should not be overridden.
Override OnStart() instead which is called before exiting this method.
Implements LocalSearchOperator.
Definition at line 826 of file constraint_solveri.h.
|
inline |
Returns the value in the current assignment of the variable of given index.
Definition at line 843 of file constraint_solveri.h.
|
inline |
Returns the variable of given index.
Definition at line 848 of file constraint_solveri.h.
|
protected |
Definition at line 935 of file constraint_solveri.h.
|
mutableprotected |
Definition at line 934 of file constraint_solveri.h.
|
protected |
Definition at line 937 of file constraint_solveri.h.
|
protected |
Definition at line 939 of file constraint_solveri.h.
|
protected |
Definition at line 938 of file constraint_solveri.h.
|
protected |
Definition at line 932 of file constraint_solveri.h.
|
protected |
Definition at line 933 of file constraint_solveri.h.
|
protected |
Definition at line 931 of file constraint_solveri.h.
|
protected |
Definition at line 940 of file constraint_solveri.h.
|
protected |
Definition at line 930 of file constraint_solveri.h.
|
protected |
Definition at line 936 of file constraint_solveri.h.