![]() |
OR-Tools
9.6
|
Local Search Filters are used for fast neighbor pruning.
Filtering a move is done in several phases:
Definition at line 1724 of file constraint_solveri.h.
Public Member Functions | |
| virtual void | Relax (const Assignment *delta, const Assignment *deltadelta) |
| Lets the filter know what delta and deltadelta will be passed in the next Accept(). More... | |
| virtual void | Commit (const Assignment *delta, const Assignment *deltadelta) |
| Dual of Relax(), lets the filter know that the delta was accepted. More... | |
| virtual bool | Accept (const Assignment *delta, const Assignment *deltadelta, int64_t objective_min, int64_t objective_max)=0 |
| Accepts a "delta" given the assignment with which the filter has been synchronized; the delta holds the variables which have been modified and their new value. More... | |
| virtual bool | IsIncremental () const |
| virtual void | Synchronize (const Assignment *assignment, const Assignment *delta)=0 |
| Synchronizes the filter with the current solution, delta being the difference with the solution passed to the previous call to Synchronize() or IncrementalSynchronize(). More... | |
| virtual void | Revert () |
| Cancels the changes made by the last Relax()/Accept() calls. More... | |
| virtual void | Reset () |
| Sets the filter to empty solution. More... | |
| virtual int64_t | GetSynchronizedObjectiveValue () const |
| Objective value from last time Synchronize() was called. More... | |
| virtual int64_t | GetAcceptedObjectiveValue () const |
| Objective value from the last time Accept() was called and returned true. More... | |
| virtual std::string | DebugString () const |
|
pure virtual |
Accepts a "delta" given the assignment with which the filter has been synchronized; the delta holds the variables which have been modified and their new value.
If the filter represents a part of the global objective, its contribution must be between objective_min and objective_max. Sample: supposing one wants to maintain a[0,1] + b[0,1] <= 1, for the assignment (a,1), (b,0), the delta (b,1) will be rejected but the delta (a,0) will be accepted. TODO(user): Remove arguments when there are no more need for those.
Implemented in BasePathFilter.
|
inlinevirtual |
Dual of Relax(), lets the filter know that the delta was accepted.
Definition at line 1730 of file constraint_solveri.h.
|
inlinevirtualinherited |
Reimplemented in SymmetryManager, IntVarFilteredDecisionBuilder, ExchangeSubtrip, RelocateSubtrip, PairNodeSwapActiveOperator< swap_first >, RelocateExpensiveChain, FilteredHeuristicCloseNodesLNSOperator, FilteredHeuristicExpensiveChainLNSOperator, RelocatePathAndHeuristicInsertUnperformedOperator, FilteredHeuristicPathLNSOperator, IndexPairSwapActiveOperator, SwapIndexPairOperator, PairExchangeRelocateOperator, PairExchangeOperator, LightPairRelocateOperator, GroupPairAndRelocateOperator, PairRelocateOperator, MakePairInactiveOperator, MakePairActiveOperator, SwapActiveToShortestPathOperator, MakeRelocateNeighborsOperator, GlobalVehicleBreaksConstraint, Dimension, LocalSearchPhaseParameters, FindOneNeighbor, LocalSearchProfiler, NeighborhoodLimit, PathLns, LinKernighan, TSPLns, TSPOpt, ExtendedSwapActiveOperator, SwapActiveOperator, MakeChainInactiveOperator, RelocateAndMakeInactiveOperator, MakeInactiveOperator, MakeActiveAndRelocate, RelocateAndMakeActiveOperator, MakeActiveOperator, Cross, Exchange, Relocate, TwoOpt, PiecewiseLinearExpr, IfThenElseCt, DemonProfiler, ArrayWithOffset< T >, SearchLog, BooleanVar, LocalSearchMonitor, PropagationMonitor, LocalSearchFilterManager, LightIntIntFunctionElementCt< F >, LightIntFunctionElementCt< F >, DelayedCallMethod2< T, P, Q >, DelayedCallMethod1< T, P >, DelayedCallMethod0< T >, CallMethod3< T, P, Q, R >, CallMethod2< T, P, Q >, CallMethod1< T, P >, CallMethod0< T >, Pack, Assignment, SequenceVar, RegularLimit, SearchLimit, OptimizeVar, SolutionCollector, IntVarIterator, Constraint, Demon, ProfiledDecisionBuilder, DecisionBuilder, Decision, PropagationBaseObject, LocalSearchMonitorPrimary, and Trace.
Definition at line 3251 of file constraint_solver.h.
|
inlinevirtual |
Objective value from the last time Accept() was called and returned true.
Definition at line 1762 of file constraint_solveri.h.
|
inlinevirtual |
Objective value from last time Synchronize() was called.
Definition at line 1759 of file constraint_solveri.h.
|
inlinevirtual |
Definition at line 1743 of file constraint_solveri.h.
|
inlinevirtual |
Lets the filter know what delta and deltadelta will be passed in the next Accept().
Definition at line 1728 of file constraint_solveri.h.
|
inlinevirtual |
Sets the filter to empty solution.
Definition at line 1756 of file constraint_solveri.h.
|
inlinevirtual |
Cancels the changes made by the last Relax()/Accept() calls.
Definition at line 1753 of file constraint_solveri.h.
|
pure virtual |
Synchronizes the filter with the current solution, delta being the difference with the solution passed to the previous call to Synchronize() or IncrementalSynchronize().
'delta' can be used to incrementally synchronizing the filter with the new solution by only considering the changes in delta.
Implemented in IntVarLocalSearchFilter.