Java Reference
Java Reference
Detailed Description
Usual limit based on wall_time, number of explored branches and number of failures in the search tree.
Definition at line 14 of file RegularLimit.java.
Public Member Functions | |
| synchronized void | delete () |
| RegularLimit (Solver s, SWIGTYPE_p_absl__Duration time, long branches, long failures, long solutions, boolean smart_time_check, boolean cumulative) | |
| void | copy (SearchLimit limit) |
| Copy a limit. More... | |
| SearchLimit | makeClone () |
| Allocates a clone of the limit. More... | |
| RegularLimit | MakeIdenticalClone () |
| boolean | check () |
| This method is called to check the status of the limit. More... | |
| void | init () |
| This method is called when the search limit is initialized. More... | |
| void | exitSearch () |
| End of the search. More... | |
| void | UpdateLimits (long time, long branches, long failures, long solutions) |
| long | wall_time () |
| long | branches () |
| long | failures () |
| long | solutions () |
| boolean | IsUncheckedSolutionLimitReached () |
| Returns true if the limit of solutions has been reached including unchecked solutions. More... | |
| int | progressPercent () |
| Returns a percentage representing the propress of the search before reaching limits. More... | |
| String | toString () |
| void | accept (ModelVisitor visitor) |
| Accepts the given model visitor. More... | |
| boolean | crossed () |
| Returns true if the limit has been crossed. More... | |
| void | enterSearch () |
| Internal methods. More... | |
| void | beginNextDecision (DecisionBuilder b) |
| Before calling DecisionBuilder::Next. More... | |
| void | periodicCheck () |
| Periodic call to check limits in long running methods. More... | |
| void | refuteDecision (Decision d) |
| Before refuting the decision. More... | |
| void | swigReleaseOwnership () |
| void | swigTakeOwnership () |
| void | restartSearch () |
| Restart the search. More... | |
| void | endNextDecision (DecisionBuilder b, Decision d) |
| After calling DecisionBuilder::Next, along with the returned decision. More... | |
| void | applyDecision (Decision d) |
| Before applying the decision. More... | |
| void | afterDecision (Decision d, boolean apply) |
| Just after refuting or applying the decision, apply is true after Apply. More... | |
| void | beginFail () |
| Just when the failure occurs. More... | |
| void | endFail () |
| After completing the backtrack. More... | |
| void | beginInitialPropagation () |
| Before the initial propagation. More... | |
| void | endInitialPropagation () |
| After the initial propagation. More... | |
| boolean | acceptSolution () |
| This method is called when a solution is found. More... | |
| boolean | atSolution () |
| This method is called when a valid solution is found. More... | |
| void | noMoreSolutions () |
| When the search tree is finished. More... | |
| boolean | localOptimum () |
| When a local optimum is reached. More... | |
| boolean | acceptDelta (Assignment delta, Assignment deltadelta) |
| void | acceptNeighbor () |
| After accepting a neighbor during local search. More... | |
| void | AcceptUncheckedNeighbor () |
| After accepting an unchecked neighbor during local search. More... | |
| Solver | solver () |
| void | install () |
| Registers itself on the solver such that it gets notified of the search and propagation events. More... | |
Static Public Attributes | |
| static final int | kNoProgress = mainJNI.SearchMonitor_kNoProgress_get() |
Protected Member Functions | |
| RegularLimit (long cPtr, boolean cMemoryOwn) | |
| void | swigDirectorDisconnect () |
Constructor & Destructor Documentation
◆ RegularLimit() [1/2]
|
inlineprotected |
Definition at line 17 of file RegularLimit.java.
◆ RegularLimit() [2/2]
|
inline |
Definition at line 42 of file RegularLimit.java.
Member Function Documentation
◆ accept()
|
inline |
Accepts the given model visitor.
Reimplemented from SearchMonitor.
Definition at line 104 of file RegularLimit.java.
◆ acceptDelta()
|
inlineinherited |
Reimplemented in OptimizeVar.
Definition at line 174 of file SearchMonitor.java.
◆ acceptNeighbor()
|
inlineinherited |
After accepting a neighbor during local search.
Definition at line 181 of file SearchMonitor.java.
◆ acceptSolution()
|
inlineinherited |
This method is called when a solution is found.
It asserts whether the solution is valid. A value of false indicates that the solution should be discarded.
Reimplemented in OptimizeVar.
Definition at line 149 of file SearchMonitor.java.
◆ AcceptUncheckedNeighbor()
|
inlineinherited |
After accepting an unchecked neighbor during local search.
Reimplemented in SearchLog.
Definition at line 188 of file SearchMonitor.java.
◆ afterDecision()
|
inlineinherited |
Just after refuting or applying the decision, apply is true after Apply.
This is called only if the Apply() or Refute() methods have not failed.
Definition at line 114 of file SearchMonitor.java.
◆ applyDecision()
|
inlineinherited |
Before applying the decision.
Reimplemented in SearchLog.
Definition at line 100 of file SearchMonitor.java.
◆ atSolution()
|
inlineinherited |
This method is called when a valid solution is found.
If the return value is true, then search will resume after. If the result is false, then search will stop there.
Reimplemented in OptimizeVar, and SearchLog.
Definition at line 156 of file SearchMonitor.java.
◆ beginFail()
|
inlineinherited |
Just when the failure occurs.
Reimplemented in SearchLog.
Definition at line 121 of file SearchMonitor.java.
◆ beginInitialPropagation()
|
inlineinherited |
Before the initial propagation.
Reimplemented in SearchLog.
Definition at line 135 of file SearchMonitor.java.
◆ beginNextDecision()
|
inlineinherited |
Before calling DecisionBuilder::Next.
Reimplemented from SearchMonitor.
Definition at line 85 of file SearchLimit.java.
◆ branches()
|
inline |
Definition at line 80 of file RegularLimit.java.
◆ check()
|
inline |
This method is called to check the status of the limit.
A return value of true indicates that we have indeed crossed the limit. In that case, this method will not be called again and the remaining search will be discarded.
Reimplemented from SearchLimit.
Definition at line 60 of file RegularLimit.java.
◆ copy()
|
inline |
Copy a limit.
Warning: leads to a direct (no check) downcasting of 'limit' so one needs to be sure both SearchLimits are of the same type.
Reimplemented from SearchLimit.
Definition at line 46 of file RegularLimit.java.
◆ crossed()
|
inlineinherited |
Returns true if the limit has been crossed.
Definition at line 45 of file SearchLimit.java.
◆ delete()
|
inline |
Reimplemented from SearchLimit.
Definition at line 31 of file RegularLimit.java.
◆ endFail()
|
inlineinherited |
After completing the backtrack.
Definition at line 128 of file SearchMonitor.java.
◆ endInitialPropagation()
|
inlineinherited |
After the initial propagation.
Reimplemented in SearchLog.
Definition at line 142 of file SearchMonitor.java.
◆ endNextDecision()
|
inlineinherited |
After calling DecisionBuilder::Next, along with the returned decision.
Definition at line 93 of file SearchMonitor.java.
◆ enterSearch()
|
inlineinherited |
◆ exitSearch()
|
inline |
End of the search.
Reimplemented from SearchMonitor.
Definition at line 68 of file RegularLimit.java.
◆ failures()
|
inline |
Definition at line 84 of file RegularLimit.java.
◆ init()
|
inline |
This method is called when the search limit is initialized.
Reimplemented from SearchLimit.
Definition at line 64 of file RegularLimit.java.
◆ install()
|
inlineinherited |
Registers itself on the solver such that it gets notified of the search and propagation events.
Reimplemented in PropagationMonitor, and LocalSearchMonitor.
Definition at line 228 of file SearchMonitor.java.
◆ IsUncheckedSolutionLimitReached()
|
inline |
Returns true if the limit of solutions has been reached including unchecked solutions.
Reimplemented from SearchMonitor.
Definition at line 92 of file RegularLimit.java.
◆ localOptimum()
|
inlineinherited |
When a local optimum is reached.
If 'true' is returned, the last solution is discarded and the search proceeds with the next one.
Definition at line 170 of file SearchMonitor.java.
◆ makeClone()
|
inline |
Allocates a clone of the limit.
Reimplemented from SearchLimit.
Definition at line 50 of file RegularLimit.java.
◆ MakeIdenticalClone()
|
inline |
Definition at line 55 of file RegularLimit.java.
◆ noMoreSolutions()
|
inlineinherited |
When the search tree is finished.
Reimplemented in SearchLog.
Definition at line 163 of file SearchMonitor.java.
◆ periodicCheck()
|
inlineinherited |
Periodic call to check limits in long running methods.
Reimplemented from SearchMonitor.
Definition at line 89 of file SearchLimit.java.
◆ progressPercent()
|
inline |
Returns a percentage representing the propress of the search before reaching limits.
Reimplemented from SearchMonitor.
Definition at line 96 of file RegularLimit.java.
◆ refuteDecision()
|
inlineinherited |
Before refuting the decision.
Reimplemented from SearchMonitor.
Definition at line 93 of file SearchLimit.java.
◆ restartSearch()
|
inlineinherited |
Restart the search.
Definition at line 72 of file SearchMonitor.java.
◆ solutions()
|
inline |
Definition at line 88 of file RegularLimit.java.
◆ solver()
|
inlineinherited |
Definition at line 199 of file SearchMonitor.java.
◆ swigDirectorDisconnect()
|
inlineprotectedinherited |
Definition at line 42 of file SearchMonitor.java.
◆ swigReleaseOwnership()
|
inlineinherited |
Definition at line 47 of file SearchMonitor.java.
◆ swigTakeOwnership()
|
inlineinherited |
Definition at line 52 of file SearchMonitor.java.
◆ toString()
|
inline |
Reimplemented from SearchLimit.
Definition at line 100 of file RegularLimit.java.
◆ UpdateLimits()
|
inline |
Definition at line 72 of file RegularLimit.java.
◆ wall_time()
|
inline |
Definition at line 76 of file RegularLimit.java.
Member Data Documentation
◆ kNoProgress
|
staticinherited |
Definition at line 232 of file SearchMonitor.java.
The documentation for this class was generated from the following file: