Module org.chocosolver
Interface ISearchMonitorFactory
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
attach(Solution solution)
Attach a solution recorder to this solverdefault void
limitBacktrack(long limit)
Defines a limit over the number of backtracks allowed during the resolution.default void
limitFail(long limit)
Defines a limit over the number of fails allowed during the resolution.default void
limitNode(long limit)
Defines a limit on the number of nodes allowed in the tree search.default void
limitSearch(Criterion aStopCriterion)
Limit the exploration of the search space with the help of aaStopCriterion
.default void
limitSolution(long limit)
Defines a limit over the number of solutions found during the resolution.default void
limitTime(long limit)
Defines a limit over the run time.default void
limitTime(String duration)
Defines a limit over the run time.default void
setNoGoodRecordingFromRestarts()
* Record nogoods from restart, that is, anytime the search restarts, a nogood is produced, based on the decision path, to prevent from scanning the same sub-search tree.default void
setNoGoodRecordingFromSolutions(IntVar... vars)
Record nogoods from solution, that is, anytime a solution is found, a nogood is produced to prevent from finding the same solution later during the search.
-
-
-
Method Detail
-
setNoGoodRecordingFromSolutions
default void setNoGoodRecordingFromSolutions(IntVar... vars)
Record nogoods from solution, that is, anytime a solution is found, a nogood is produced to prevent from finding the same solution later during the search.vars
are the decision variables (to reduce ng size).- Parameters:
vars
- array of decision variables
-
setNoGoodRecordingFromRestarts
default void setNoGoodRecordingFromRestarts()
* Record nogoods from restart, that is, anytime the search restarts, a nogood is produced, based on the decision path, to prevent from scanning the same sub-search tree.
-
limitSearch
default void limitSearch(Criterion aStopCriterion)
Limit the exploration of the search space with the help of aaStopCriterion
. When the condition depicted in the criterion is met, the search stops.- Parameters:
aStopCriterion
- the stop criterion which, when met, stops the search.
-
limitNode
default void limitNode(long limit)
Defines a limit on the number of nodes allowed in the tree search. When the limit is reached, the resolution is stopped.- Parameters:
limit
- maximal number of nodes to open
-
limitFail
default void limitFail(long limit)
Defines a limit over the number of fails allowed during the resolution. WHen the limit is reached, the resolution is stopped.- Parameters:
limit
- maximal number of fails
-
limitBacktrack
default void limitBacktrack(long limit)
Defines a limit over the number of backtracks allowed during the resolution. WHen the limit is reached, the resolution is stopped.- Parameters:
limit
- maximal number of backtracks
-
limitSolution
default void limitSolution(long limit)
Defines a limit over the number of solutions found during the resolution. WHen the limit is reached, the resolution is stopped.- Parameters:
limit
- maximal number of solutions
-
limitTime
default void limitTime(long limit)
Defines a limit over the run time. When the limit is reached, the resolution is stopped.
One must consider alsoSearchMonitorFactory.limitThreadTime(long)
, that runs the limit in a separated thread.- Parameters:
limit
- maximal resolution time in millisecond
-
limitTime
default void limitTime(String duration)
Defines a limit over the run time. When the limit is reached, the resolution is stopped.
One must consider alsoSearchMonitorFactory.limitThreadTime(String)
, that runs the limit in a separated thread.Based on
SearchMonitorFactory.convertInMilliseconds(String duration)
- Parameters:
duration
- a String which states the duration like "WWd XXh YYm ZZs".- See Also:
TimeUtils.convertInMilliseconds(String)
-
attach
default void attach(Solution solution)
Attach a solution recorder to this solver- Parameters:
solution
- solution object to be filled on solutions.
-
-