Package ai.libs.hasco.core
Class HASCO<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<P,O,V>
-
- ai.libs.jaicore.components.optimizingfactory.SoftwareConfigurationAlgorithm<ai.libs.jaicore.components.model.RefinementConfiguredSoftwareConfigurationProblem<V>,HASCOSolutionCandidate<V>,V>
-
- ai.libs.hasco.core.HASCO<N,A,V>
-
- Type Parameters:
N
- Type of nodes in the search graph to which the problem is reducedA
- Type of arc labels in the search graph to which the problem is reducedV
- Type of scores of solutions
- All Implemented Interfaces:
java.lang.Iterable<org.api4.java.algorithm.events.IAlgorithmEvent>
,java.util.concurrent.Callable<HASCOSolutionCandidate<V>>
,java.util.Iterator<org.api4.java.algorithm.events.IAlgorithmEvent>
,org.api4.java.algorithm.IAlgorithm<ai.libs.jaicore.components.model.RefinementConfiguredSoftwareConfigurationProblem<V>,HASCOSolutionCandidate<V>>
,org.api4.java.algorithm.IOptimizationAlgorithm<ai.libs.jaicore.components.model.RefinementConfiguredSoftwareConfigurationProblem<V>,HASCOSolutionCandidate<V>,V>
,org.api4.java.algorithm.ISolutionCandidateIterator<ai.libs.jaicore.components.model.RefinementConfiguredSoftwareConfigurationProblem<V>,HASCOSolutionCandidate<V>>
,org.api4.java.common.control.ICancelable
,org.api4.java.common.control.ILoggingCustomizable
- Direct Known Subclasses:
HASCOViaFD
public class HASCO<N,A,V extends java.lang.Comparable<V>> extends ai.libs.jaicore.components.optimizingfactory.SoftwareConfigurationAlgorithm<ai.libs.jaicore.components.model.RefinementConfiguredSoftwareConfigurationProblem<V>,HASCOSolutionCandidate<V>,V>
Hierarchically create an object of type T
-
-
Constructor Summary
Constructors Constructor Description HASCO(HASCOConfig algorithmConfig, ai.libs.jaicore.components.model.RefinementConfiguredSoftwareConfigurationProblem<V> configurationProblem, IHASCOPlanningReduction<N,A> planning2searchReduction, org.api4.java.ai.graphsearch.problem.IOptimalPathInORGraphSearchFactory<org.api4.java.ai.graphsearch.problem.IPathSearchWithPathEvaluationsInput<N,A,V>,ai.libs.jaicore.search.model.other.EvaluatedSearchGraphPath<N,A,V>,N,A,V,?> searchFactory)
HASCO(ai.libs.jaicore.components.model.RefinementConfiguredSoftwareConfigurationProblem<V> configurationProblem, IHASCOPlanningReduction<N,A> planningGraphGeneratorDeriver, org.api4.java.ai.graphsearch.problem.IOptimalPathInORGraphSearchFactory<org.api4.java.ai.graphsearch.problem.IPathSearchWithPathEvaluationsInput<N,A,V>,ai.libs.jaicore.search.model.other.EvaluatedSearchGraphPath<N,A,V>,N,A,V,?> searchFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
HASCOConfig
getConfig()
org.api4.java.datastructure.graph.implicit.IGraphGenerator<N,A>
getGraphGenerator()
java.lang.String
getLoggerName()
IHASCOPlanningReduction<N,A>
getPlanningGraphGeneratorDeriver()
ai.libs.jaicore.planning.hierarchical.problems.htn.CostSensitiveHTNPlanningProblem<ai.libs.jaicore.planning.hierarchical.problems.ceocipstn.CEOCIPSTNPlanningProblem,V>
getPlanningProblem()
HASCORunReport<V>
getReport()
org.api4.java.ai.graphsearch.problem.IOptimalPathInORGraphSearch<org.api4.java.ai.graphsearch.problem.IPathSearchWithPathEvaluationsInput<N,A,V>,ai.libs.jaicore.search.model.other.EvaluatedSearchGraphPath<N,A,V>,N,A,V>
getSearch()
org.api4.java.ai.graphsearch.problem.IOptimalPathInORGraphSearchFactory<org.api4.java.ai.graphsearch.problem.IPathSearchWithPathEvaluationsInput<N,A,V>,ai.libs.jaicore.search.model.other.EvaluatedSearchGraphPath<N,A,V>,N,A,V,?>
getSearchFactory()
org.api4.java.algorithm.events.IAlgorithmEvent
nextWithException()
void
registerSolutionEventListener(java.util.function.Consumer<HASCOSolutionEvent<V>> listener)
void
setCreateComponentInstancesFromNodesInsteadOfPlans(boolean cIsFromNodes)
void
setLoggerName(java.lang.String name)
protected void
shutdown()
java.lang.String
toString()
-
Methods inherited from class ai.libs.jaicore.basic.algorithm.AOptimizer
call, getBestScoreKnownToExist, getBestSeenSolution, nextSolutionCandidate, nextSolutionCandidateEvent, 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, checkAndConductTermination, checkTermination, computeTimeoutAware, getActivationTime, 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, terminate, unregisterActiveThread, unregisterThreadAndShutdown
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Constructor Detail
-
HASCO
public HASCO(ai.libs.jaicore.components.model.RefinementConfiguredSoftwareConfigurationProblem<V> configurationProblem, IHASCOPlanningReduction<N,A> planningGraphGeneratorDeriver, org.api4.java.ai.graphsearch.problem.IOptimalPathInORGraphSearchFactory<org.api4.java.ai.graphsearch.problem.IPathSearchWithPathEvaluationsInput<N,A,V>,ai.libs.jaicore.search.model.other.EvaluatedSearchGraphPath<N,A,V>,N,A,V,?> searchFactory)
-
HASCO
public HASCO(HASCOConfig algorithmConfig, ai.libs.jaicore.components.model.RefinementConfiguredSoftwareConfigurationProblem<V> configurationProblem, IHASCOPlanningReduction<N,A> planning2searchReduction, org.api4.java.ai.graphsearch.problem.IOptimalPathInORGraphSearchFactory<org.api4.java.ai.graphsearch.problem.IPathSearchWithPathEvaluationsInput<N,A,V>,ai.libs.jaicore.search.model.other.EvaluatedSearchGraphPath<N,A,V>,N,A,V,?> searchFactory)
-
-
Method Detail
-
nextWithException
public org.api4.java.algorithm.events.IAlgorithmEvent nextWithException() throws java.lang.InterruptedException, org.api4.java.algorithm.exceptions.AlgorithmExecutionCanceledException, org.api4.java.algorithm.exceptions.AlgorithmTimeoutedException, org.api4.java.algorithm.exceptions.AlgorithmException
- Throws:
java.lang.InterruptedException
org.api4.java.algorithm.exceptions.AlgorithmExecutionCanceledException
org.api4.java.algorithm.exceptions.AlgorithmTimeoutedException
org.api4.java.algorithm.exceptions.AlgorithmException
-
getGraphGenerator
public org.api4.java.datastructure.graph.implicit.IGraphGenerator<N,A> getGraphGenerator()
-
getPlanningProblem
public ai.libs.jaicore.planning.hierarchical.problems.htn.CostSensitiveHTNPlanningProblem<ai.libs.jaicore.planning.hierarchical.problems.ceocipstn.CEOCIPSTNPlanningProblem,V> getPlanningProblem()
-
cancel
public void cancel()
- Specified by:
cancel
in interfaceorg.api4.java.common.control.ICancelable
- Overrides:
cancel
in classai.libs.jaicore.basic.algorithm.AAlgorithm<ai.libs.jaicore.components.model.RefinementConfiguredSoftwareConfigurationProblem<V extends java.lang.Comparable<V>>,HASCOSolutionCandidate<V extends java.lang.Comparable<V>>>
-
getPlanningGraphGeneratorDeriver
public IHASCOPlanningReduction<N,A> getPlanningGraphGeneratorDeriver()
-
getReport
public HASCORunReport<V> getReport()
-
shutdown
protected void shutdown()
- Overrides:
shutdown
in classai.libs.jaicore.basic.algorithm.AAlgorithm<ai.libs.jaicore.components.model.RefinementConfiguredSoftwareConfigurationProblem<V extends java.lang.Comparable<V>>,HASCOSolutionCandidate<V extends java.lang.Comparable<V>>>
-
getConfig
public HASCOConfig getConfig()
- Specified by:
getConfig
in interfaceorg.api4.java.algorithm.IAlgorithm<N,A>
- Overrides:
getConfig
in classai.libs.jaicore.basic.algorithm.AAlgorithm<ai.libs.jaicore.components.model.RefinementConfiguredSoftwareConfigurationProblem<V extends java.lang.Comparable<V>>,HASCOSolutionCandidate<V extends java.lang.Comparable<V>>>
-
getSearchFactory
public org.api4.java.ai.graphsearch.problem.IOptimalPathInORGraphSearchFactory<org.api4.java.ai.graphsearch.problem.IPathSearchWithPathEvaluationsInput<N,A,V>,ai.libs.jaicore.search.model.other.EvaluatedSearchGraphPath<N,A,V>,N,A,V,?> getSearchFactory()
-
getSearch
public org.api4.java.ai.graphsearch.problem.IOptimalPathInORGraphSearch<org.api4.java.ai.graphsearch.problem.IPathSearchWithPathEvaluationsInput<N,A,V>,ai.libs.jaicore.search.model.other.EvaluatedSearchGraphPath<N,A,V>,N,A,V> getSearch()
-
getLoggerName
public java.lang.String getLoggerName()
- Specified by:
getLoggerName
in interfaceorg.api4.java.common.control.ILoggingCustomizable
- Overrides:
getLoggerName
in classai.libs.jaicore.basic.algorithm.AOptimizer<ai.libs.jaicore.components.model.RefinementConfiguredSoftwareConfigurationProblem<V extends java.lang.Comparable<V>>,HASCOSolutionCandidate<V extends java.lang.Comparable<V>>,V extends java.lang.Comparable<V>>
-
setLoggerName
public void setLoggerName(java.lang.String name)
- Specified by:
setLoggerName
in interfaceorg.api4.java.common.control.ILoggingCustomizable
- Overrides:
setLoggerName
in classai.libs.jaicore.basic.algorithm.AOptimizer<ai.libs.jaicore.components.model.RefinementConfiguredSoftwareConfigurationProblem<V extends java.lang.Comparable<V>>,HASCOSolutionCandidate<V extends java.lang.Comparable<V>>,V extends java.lang.Comparable<V>>
-
setCreateComponentInstancesFromNodesInsteadOfPlans
public void setCreateComponentInstancesFromNodesInsteadOfPlans(boolean cIsFromNodes)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
registerSolutionEventListener
public void registerSolutionEventListener(java.util.function.Consumer<HASCOSolutionEvent<V>> listener)
-
-