Java Reference
Java Reference
Detailed Description
This filter accepts deltas for which the assignment satisfies the constraints of the Solver.
This is verified by keeping an internal copy of the assignment with all Next vars and their updated values, and calling RestoreAssignment() on the assignment+delta. exception of Next Vars (woud fail on large instances). WARNING: In the case of mandatory nodes, when all vehicles are currently being used in the solution but uninserted nodes still remain, this filter will reject the solution, even if the node could be inserted on one of these routes, because all Next vars of vehicle starts are already instantiated.
Definition at line 14 of file CPFeasibilityFilter.java.
Public Member Functions | |
| synchronized void | delete () |
| CPFeasibilityFilter (RoutingModel routing_model) | |
| String | toString () |
| 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... | |
| void | onSynchronize (Assignment delta) |
| void | swigReleaseOwnership () |
| void | swigTakeOwnership () |
| void | synchronize (Assignment assignment, Assignment delta) |
| This method should not be overridden. More... | |
| void | addVars (IntVar[] vars) |
| Add variables to "track" to the filter. More... | |
| int | size () |
| IntVar | var (int index) |
| long | value (int index) |
| int | index (IntVar var) |
| void | Relax (Assignment delta, Assignment deltadelta) |
| Lets the filter know what delta and deltadelta will be passed in the next Accept(). More... | |
| boolean | isIncremental () |
| 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... | |
Protected Member Functions | |
| CPFeasibilityFilter (long cPtr, boolean cMemoryOwn) | |
| void | swigDirectorDisconnect () |
Constructor & Destructor Documentation
◆ CPFeasibilityFilter() [1/2]
|
inlineprotected |
Definition at line 17 of file CPFeasibilityFilter.java.
◆ CPFeasibilityFilter() [2/2]
|
inline |
Definition at line 42 of file CPFeasibilityFilter.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 from LocalSearchFilter.
Definition at line 50 of file CPFeasibilityFilter.java.
◆ addVars()
|
inlineinherited |
Add variables to "track" to the filter.
Definition at line 73 of file IntVarLocalSearchFilter.java.
◆ delete()
|
inline |
Reimplemented from IntVarLocalSearchFilter.
Definition at line 31 of file CPFeasibilityFilter.java.
◆ getAcceptedObjectiveValue()
|
inlineinherited |
Objective value from the last time Accept() was called and returned true.
Definition at line 99 of file LocalSearchFilter.java.
◆ getSynchronizedObjectiveValue()
|
inlineinherited |
Objective value from last time Synchronize() was called.
Definition at line 92 of file LocalSearchFilter.java.
◆ index()
|
inlineinherited |
Definition at line 94 of file IntVarLocalSearchFilter.java.
◆ isIncremental()
|
inlineinherited |
Definition at line 71 of file LocalSearchFilter.java.
◆ onSynchronize()
|
inline |
Reimplemented from IntVarLocalSearchFilter.
Definition at line 54 of file CPFeasibilityFilter.java.
◆ Relax()
|
inlineinherited |
Lets the filter know what delta and deltadelta will be passed in the next Accept().
Definition at line 60 of file LocalSearchFilter.java.
◆ Revert()
|
inlineinherited |
Cancels the changes made by the last Relax()/Accept() calls.
Definition at line 85 of file LocalSearchFilter.java.
◆ size()
|
inlineinherited |
Definition at line 77 of file IntVarLocalSearchFilter.java.
◆ swigDirectorDisconnect()
|
inlineprotectedinherited |
Reimplemented from LocalSearchFilter.
Definition at line 43 of file IntVarLocalSearchFilter.java.
◆ swigReleaseOwnership()
|
inlineinherited |
Reimplemented from LocalSearchFilter.
Definition at line 48 of file IntVarLocalSearchFilter.java.
◆ swigTakeOwnership()
|
inlineinherited |
Reimplemented from LocalSearchFilter.
Definition at line 53 of file IntVarLocalSearchFilter.java.
◆ synchronize()
|
inlineinherited |
This method should not be overridden.
Override OnSynchronize() instead which is called before exiting this method.
Reimplemented from LocalSearchFilter.
Definition at line 66 of file IntVarLocalSearchFilter.java.
◆ toString()
|
inline |
Reimplemented from BaseObject.
Definition at line 46 of file CPFeasibilityFilter.java.
◆ value()
|
inlineinherited |
Definition at line 86 of file IntVarLocalSearchFilter.java.
◆ var()
|
inlineinherited |
Definition at line 81 of file IntVarLocalSearchFilter.java.
The documentation for this class was generated from the following file: