Class HASCO<N,​A,​V extends java.lang.Comparable<V>>

  • Type Parameters:
    N - Type of nodes in the search graph to which the problem is reduced
    A - Type of arc labels in the search graph to which the problem is reduced
    V - 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
      • Methods inherited from interface org.api4.java.algorithm.IAlgorithm

        getId, getInput, getNumCPUs, getTimeout, registerListener, setMaxNumThreads, setNumCPUs, setTimeout, setTimeout
      • Methods inherited from interface java.lang.Iterable

        forEach, iterator, spliterator
      • Methods inherited from interface java.util.Iterator

        forEachRemaining, hasNext, next, remove
    • 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 interface org.api4.java.common.control.ICancelable
        Overrides:
        cancel in class ai.libs.jaicore.basic.algorithm.AAlgorithm<ai.libs.jaicore.components.model.RefinementConfiguredSoftwareConfigurationProblem<V extends java.lang.Comparable<V>>,​HASCOSolutionCandidate<V extends java.lang.Comparable<V>>>
      • shutdown

        protected void shutdown()
        Overrides:
        shutdown in class ai.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 interface org.api4.java.algorithm.IAlgorithm<N,​A>
        Overrides:
        getConfig in class ai.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 interface org.api4.java.common.control.ILoggingCustomizable
        Overrides:
        getLoggerName in class ai.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 interface org.api4.java.common.control.ILoggingCustomizable
        Overrides:
        setLoggerName in class ai.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 class java.lang.Object
      • registerSolutionEventListener

        public void registerSolutionEventListener​(java.util.function.Consumer<HASCOSolutionEvent<V>> listener)