Interface DdoStopCriterion
- All Superinterfaces:
Predicate<SearchStatistics>,StopCriterion
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Interface representing a stop criterion specifically for Decision Diagram Optimization (DDO)
solvers.
This extends StopCriterion to provide access to DDO-specific statistics such as the
total number of MDD nodes or the explored depth.
-
Method Summary
Modifier and TypeMethodDescriptionstatic DdoStopCriterionmaxExploredDepth(int maxDepth) Creates a stop criterion that terminates the search when the depth of the subproblem root being explored (the node popped from the frontier) reaches or exceeds a specified limit.static DdoStopCriterionmaxIterWithoutLowerBoundImprovement(int maxIter) Creates a stop criterion that terminates the search when the number of iterations without any lower bound improvement exceeds a specified limit.static DdoStopCriterionmaxTotalMddNodes(long maxNodes) Creates a stop criterion that terminates the search when the total number of MDD nodes created exceeds a specified limit.default booleantest(SearchStatistics stats) booleantestDdoStats(DdoStats stats) Evaluates this criterion against the given DDO search statistics.
-
Method Details
-
maxTotalMddNodes
Creates a stop criterion that terminates the search when the total number of MDD nodes created exceeds a specified limit.- Parameters:
maxNodes- the maximum allowed number of MDD nodes- Returns:
- a DdoStopCriterion for maximum total nodes
-
maxIterWithoutLowerBoundImprovement
Creates a stop criterion that terminates the search when the number of iterations without any lower bound improvement exceeds a specified limit.- Parameters:
maxIter- the maximum allowed number of iterations since the last lower bound improvement- Returns:
- a DdoStopCriterion based on iterations since last lower bound improvement
-
maxExploredDepth
Creates a stop criterion that terminates the search when the depth of the subproblem root being explored (the node popped from the frontier) reaches or exceeds a specified limit.- Parameters:
maxDepth- the maximum allowed depth for a subproblem root- Returns:
- a DdoStopCriterion for maximum explored depth
-
testDdoStats
Evaluates this criterion against the given DDO search statistics.- Parameters:
stats- the DDO search statistics- Returns:
trueif the search should be terminated,falseotherwise
-
test
- Specified by:
testin interfacePredicate<SearchStatistics>- Throws:
IllegalArgumentException- if the provided statistics are not an instance ofDdoStats
-