Class LimitedDiscrepancySearch<I extends GraphSearchWithNodeRecommenderInput<N,A>,N,A,V extends java.lang.Comparable<V>>
- java.lang.Object
-
- ai.libs.jaicore.basic.algorithm.AAlgorithm<I,O>
-
- ai.libs.jaicore.basic.algorithm.ASolutionCandidateIterator<I,O>
-
- ai.libs.jaicore.basic.algorithm.AOptimizer<I,EvaluatedSearchGraphPath<N,A,V>,V>
-
- ai.libs.jaicore.search.core.interfaces.AOptimalPathInORGraphSearch<I,N,A,V>
-
- ai.libs.jaicore.search.algorithms.standard.lds.LimitedDiscrepancySearch<I,N,A,V>
-
- All Implemented Interfaces:
java.lang.Iterable<org.api4.java.algorithm.events.IAlgorithmEvent>,java.util.concurrent.Callable<EvaluatedSearchGraphPath<N,A,V>>,java.util.Iterator<org.api4.java.algorithm.events.IAlgorithmEvent>,org.api4.java.ai.graphsearch.problem.IOptimalPathInORGraphSearch<I,EvaluatedSearchGraphPath<N,A,V>,N,A,V>,org.api4.java.ai.graphsearch.problem.IPathInORGraphSearch<I,EvaluatedSearchGraphPath<N,A,V>,N,A>,org.api4.java.ai.graphsearch.problem.IPathSearch<I,EvaluatedSearchGraphPath<N,A,V>,N,A>,org.api4.java.algorithm.IAlgorithm<I,EvaluatedSearchGraphPath<N,A,V>>,org.api4.java.algorithm.IOptimizationAlgorithm<I,EvaluatedSearchGraphPath<N,A,V>,V>,org.api4.java.algorithm.ISolutionCandidateIterator<I,EvaluatedSearchGraphPath<N,A,V>>,org.api4.java.common.control.ICancelable,org.api4.java.common.control.ILoggingCustomizable
public class LimitedDiscrepancySearch<I extends GraphSearchWithNodeRecommenderInput<N,A>,N,A,V extends java.lang.Comparable<V>> extends AOptimalPathInORGraphSearch<I,N,A,V>
Implementation of the algorithm presented in
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<N,A>actionToNodeprotected java.util.Collection<ai.libs.jaicore.graph.TreeNode<N>>exhaustedprotected java.util.Collection<ai.libs.jaicore.graph.TreeNode<N>>expandedprotected java.util.Comparator<N>heuristicprotected org.api4.java.ai.graphsearch.problem.implicit.graphgenerator.IPathGoalTester<N,A>pathGoalTesterprotected org.api4.java.datastructure.graph.implicit.ISingleRootGenerator<N>rootGeneratorprotected org.api4.java.datastructure.graph.implicit.ISuccessorGenerator<N,A>successorGeneratorprotected ai.libs.jaicore.graph.TreeNode<N>traversalTree
-
Constructor Summary
Constructors Constructor Description LimitedDiscrepancySearch(I problemInput)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetLoggerName()protected ai.libs.jaicore.graph.TreeNode<N>newNode(ai.libs.jaicore.graph.TreeNode<N> parent, N newNode)org.api4.java.algorithm.events.IAlgorithmEventnextWithException()voidsetLoggerName(java.lang.String name)-
Methods inherited from class ai.libs.jaicore.search.core.interfaces.AOptimalPathInORGraphSearch
getGoalTester, getGraphGenerator, nextSolutionCandidateEvent, registerSolution
-
Methods inherited from class ai.libs.jaicore.basic.algorithm.AOptimizer
call, getBestScoreKnownToExist, getBestSeenSolution, nextSolutionCandidate, setBestSeenSolution, tellAboutBestScoreKnownToExist, updateBestSeenSolution
-
Methods inherited from class ai.libs.jaicore.basic.algorithm.ASolutionCandidateIterator
collectAllSolutions
-
Methods inherited from class ai.libs.jaicore.basic.algorithm.AAlgorithm
activate, announceTimeoutDetected, avoidReinterruptionOnShutdownOnCurrentThread, cancel, checkAndConductTermination, checkTermination, computeTimeoutAware, getActivationTime, getConfig, getId, getInput, getListeners, getNumCPUs, getRemainingTimeToDeadline, getState, getTimeout, getTimeoutPrecautionOffset, hasNext, hasThreadBeenInterruptedDuringShutdown, interruptThreadAsPartOfShutdown, isCanceled, isShutdownInitialized, isStopCriterionSatisfied, isTimeouted, iterator, next, post, registerActiveThread, registerListener, resolveShutdownInterruptOnCurrentThread, setConfig, setDeadline, setMaxNumThreads, setNumCPUs, setState, setTimeout, setTimeout, setTimeoutPrecautionOffset, shutdown, terminate, unregisterActiveThread, unregisterThreadAndShutdown
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.api4.java.algorithm.IAlgorithm
call, getConfig, getId, getInput, getNumCPUs, getTimeout, registerListener, setMaxNumThreads, setNumCPUs, setTimeout, setTimeout
-
-
-
-
Field Detail
-
traversalTree
protected ai.libs.jaicore.graph.TreeNode<N> traversalTree
-
expanded
protected java.util.Collection<ai.libs.jaicore.graph.TreeNode<N>> expanded
-
exhausted
protected java.util.Collection<ai.libs.jaicore.graph.TreeNode<N>> exhausted
-
rootGenerator
protected final org.api4.java.datastructure.graph.implicit.ISingleRootGenerator<N> rootGenerator
-
successorGenerator
protected final org.api4.java.datastructure.graph.implicit.ISuccessorGenerator<N,A> successorGenerator
-
pathGoalTester
protected final org.api4.java.ai.graphsearch.problem.implicit.graphgenerator.IPathGoalTester<N,A> pathGoalTester
-
heuristic
protected final java.util.Comparator<N> heuristic
-
-
Constructor Detail
-
LimitedDiscrepancySearch
public LimitedDiscrepancySearch(I problemInput)
-
-
Method Detail
-
nextWithException
public org.api4.java.algorithm.events.IAlgorithmEvent nextWithException() throws java.lang.InterruptedException, org.api4.java.algorithm.exceptions.AlgorithmTimeoutedException, org.api4.java.algorithm.exceptions.AlgorithmExecutionCanceledException, org.api4.java.algorithm.exceptions.AlgorithmException- Throws:
java.lang.InterruptedExceptionorg.api4.java.algorithm.exceptions.AlgorithmTimeoutedExceptionorg.api4.java.algorithm.exceptions.AlgorithmExecutionCanceledExceptionorg.api4.java.algorithm.exceptions.AlgorithmException
-
newNode
protected ai.libs.jaicore.graph.TreeNode<N> newNode(ai.libs.jaicore.graph.TreeNode<N> parent, N newNode)
-
getLoggerName
public java.lang.String getLoggerName()
- Specified by:
getLoggerNamein interfaceorg.api4.java.common.control.ILoggingCustomizable- Overrides:
getLoggerNamein classAOptimalPathInORGraphSearch<I extends GraphSearchWithNodeRecommenderInput<N,A>,N,A,V extends java.lang.Comparable<V>>
-
setLoggerName
public void setLoggerName(java.lang.String name)
- Specified by:
setLoggerNamein interfaceorg.api4.java.common.control.ILoggingCustomizable- Overrides:
setLoggerNamein classAOptimalPathInORGraphSearch<I extends GraphSearchWithNodeRecommenderInput<N,A>,N,A,V extends java.lang.Comparable<V>>
-
-