Java Reference
Java Reference
Detailed Description
Local Search Filters are used for fast neighbor pruning.
Filtering a move is done in several phases: - in the Relax phase, filters determine which parts of their internals will be changed by the candidate, and modify intermediary State - in the Accept phase, filters check that the candidate is feasible, - if the Accept phase succeeds, the solver may decide to trigger a Synchronize phase that makes filters change their internal representation to the last candidate, - otherwise (Accept fails or the solver does not want to synchronize), a Revert phase makes filters erase any intermediary State generated by the Relax and Accept phases. A given filter has phases called with the following pattern: (Relax.Accept.Synchronize | Relax.Accept.Revert | Relax.Revert)*. Filters's Revert() is always called in the reverse order their Accept() was called, to allow late filters to use state done/undone by early filters' Accept()/Revert().
Definition at line 14 of file LocalSearchFilter.java.
Public Member Functions | |
| synchronized void | delete () |
| void | swigReleaseOwnership () |
| void | swigTakeOwnership () |
| void | Relax (Assignment delta, Assignment deltadelta) |
| Lets the filter know what delta and deltadelta will be passed in the next Accept(). More... | |
| boolean | accept (Assignment delta, Assignment deltadelta, long objective_min, long objective_max) |
| 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... | |
| boolean | isIncremental () |
| void | synchronize (Assignment assignment, Assignment delta) |
| Synchronizes the filter with the current solution, delta being the difference with the solution passed to the previous call to Synchronize() or IncrementalSynchronize(). More... | |
| void | Revert () |
| Cancels the changes made by the last Relax()/Accept() calls. More... | |
| long | getSynchronizedObjectiveValue () |
| Objective value from last time Synchronize() was called. More... | |
| long | getAcceptedObjectiveValue () |
| Objective value from the last time Accept() was called and returned true. More... | |
| LocalSearchFilter () | |
| String | toString () |
Protected Member Functions | |
| LocalSearchFilter (long cPtr, boolean cMemoryOwn) | |
| void | swigDirectorDisconnect () |
Constructor & Destructor Documentation
◆ LocalSearchFilter() [1/2]
|
inlineprotected |
Definition at line 17 of file LocalSearchFilter.java.
◆ LocalSearchFilter() [2/2]
|
inline |
Definition at line 103 of file LocalSearchFilter.java.
Member Function Documentation
◆ accept()
|
inline |
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.
Reimplemented in CPFeasibilityFilter, and BasePathFilter.
Definition at line 67 of file LocalSearchFilter.java.
◆ delete()
|
inline |
Reimplemented from BaseObject.
Reimplemented in IntVarLocalSearchFilter, BasePathFilter, and CPFeasibilityFilter.
Definition at line 31 of file LocalSearchFilter.java.
◆ getAcceptedObjectiveValue()
|
inline |
Objective value from the last time Accept() was called and returned true.
Definition at line 99 of file LocalSearchFilter.java.
◆ getSynchronizedObjectiveValue()
|
inline |
Objective value from last time Synchronize() was called.
Definition at line 92 of file LocalSearchFilter.java.
◆ isIncremental()
|
inline |
Definition at line 71 of file LocalSearchFilter.java.
◆ Relax()
|
inline |
Lets the filter know what delta and deltadelta will be passed in the next Accept().
Definition at line 60 of file LocalSearchFilter.java.
◆ Revert()
|
inline |
Cancels the changes made by the last Relax()/Accept() calls.
Definition at line 85 of file LocalSearchFilter.java.
◆ swigDirectorDisconnect()
|
inlineprotected |
Reimplemented in IntVarLocalSearchFilter.
Definition at line 42 of file LocalSearchFilter.java.
◆ swigReleaseOwnership()
|
inline |
Reimplemented in IntVarLocalSearchFilter.
Definition at line 47 of file LocalSearchFilter.java.
◆ swigTakeOwnership()
|
inline |
Reimplemented in IntVarLocalSearchFilter.
Definition at line 52 of file LocalSearchFilter.java.
◆ synchronize()
|
inline |
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.
Reimplemented in IntVarLocalSearchFilter.
Definition at line 78 of file LocalSearchFilter.java.
◆ toString()
|
inlineinherited |
Reimplemented in Assignment, Pack, BooleanVar, RegularLimit, SearchLog, SearchLimit, OptimizeVar, Decision, IntVarIterator, DecisionBuilder, Constraint, Demon, SolutionCollector, CPFeasibilityFilter, GlobalVehicleBreaksConstraint, PropagationBaseObject, SequenceVar, LocalSearchMonitor, and PropagationMonitor.
Definition at line 46 of file BaseObject.java.
The documentation for this class was generated from the following file: