Interface Planner

All Superinterfaces:
Callable<Integer>, Serializable
All Known Subinterfaces:
HTNPlanner, StateSpacePlanner, STNPlanner
All Known Implementing Classes:
AbstractHTNPlanner, AbstractPlanner, AbstractStateSpacePlanner, AbstractSTNPlanner, ASP, FF, GSP, HSP, PFD, TFD

public interface Planner extends Serializable, Callable<Integer>
This interface defines the main methods of to access a planner.
Since:
3.0
  • Field Details

    • DOMAIN_SETTING

      static final String DOMAIN_SETTING
      The DOMAIN setting used for planner configuration.
      See Also:
      Constant Field Values
    • DEFAULT_DOMAIN

      static final String DEFAULT_DOMAIN
      The default value of DOMAIN setting used for planner configuration.
      See Also:
      Constant Field Values
    • PROBLEM_SETTING

      static final String PROBLEM_SETTING
      The PROBLEM setting used for planner configuration.
      See Also:
      Constant Field Values
    • DEFAULT_PROBLEM

      static final String DEFAULT_PROBLEM
      The default value of PROBLEM setting used for planner configuration.
      See Also:
      Constant Field Values
    • TIME_OUT_SETTING

      static final String TIME_OUT_SETTING
      The TIME_OUT setting used for planner configuration.
      See Also:
      Constant Field Values
    • DEFAULT_TIME_OUT

      static final int DEFAULT_TIME_OUT
      The default value of TIME_OUT (in seconds) setting used for planner configuration.
      See Also:
      Constant Field Values
    • LOG_LEVEL_SETTING

      static final String LOG_LEVEL_SETTING
      The LOG_LEVEL setting used for planner configuration.
      See Also:
      Constant Field Values
    • DEFAULT_LOG_LEVEL

      static final LogLevel DEFAULT_LOG_LEVEL
      The default value of the LOG_LEVEL setting used for planner configuration.
  • Method Details

    • setDomain

      void setDomain(String domain)
      Sets the domain of the planner.
      Parameters:
      domain - the path to the PDDL domain file.
    • getDomain

      String getDomain()
      Returns the path to the PDDL domain file.
      Returns:
      the path to the PDDL domain file of the configuration.
    • getDomainFile

      File getDomainFile()
      Returns the domain file containing the PDDL domain description.
      Returns:
      the domain file containing the PDDL domain description.
    • setProblem

      void setProblem(String problem)
      Sets the path to the PDDL problem description.
      Parameters:
      problem - the path to the PDDL problem description.
    • getProblem

      String getProblem()
      Returns the path to the PDDL problem description.
      Returns:
      the path to the PDDL problem description.
    • getProblemFile

      File getProblemFile()
      Returns the problem file containing the PDDL problem description.
      Returns:
      the problem file containing the PDDL problem description.
    • setLogLevel

      void setLogLevel(LogLevel level)
      Sets the trace level of the planner.
      Parameters:
      level - the trace level of the planner.
      See Also:
      Level
    • getLogLevel

      LogLevel getLogLevel()
      Returns the trace level of the planner.
      Returns:
      the trace level declared of the planner.
      See Also:
      Level
    • setTimeout

      void setTimeout(int timeout)
      Sets the timeout of the planner.
      Parameters:
      timeout - to use by the planner in second.
    • getTimeout

      int getTimeout()
      Returns the timeout of the planner.
      Returns:
      the timeout of the planner
    • getConfiguration

      PlannerConfiguration getConfiguration()
      Returns the configuration of the planner.
      Returns:
      the configuration of the planner.
    • setConfiguration

      void setConfiguration(PlannerConfiguration configuration)
      Sets the configuration of the planner.
      Parameters:
      configuration - the configuration to set.
    • getDefaultConfiguration

      static PlannerConfiguration getDefaultConfiguration()
      This method return the default arguments of the planner.
      Returns:
      the default arguments of the planner.
      See Also:
      PlannerConfiguration
    • parse

      DefaultParsedProblem parse(String domain, String problem) throws IOException
      Parses the domain and the problem description specified in parameters.
      Parameters:
      domain - the path to the PDDL domain file.
      problem - the path to the PDDL problem file.
      Returns:
      the problem parsed or null if an error occurred while parsing.
      Throws:
      FileNotFoundException - if the domain or the problem file was not found.
      IOException - if an error occur during parsing.
    • parse

      Parses the domain and the problem description given ine the planner configuration.
      Returns:
      the problem parsed or null if an error occurred while parsing.
      Throws:
      FileNotFoundException - if the domain or the problem file was not found.
      IOException - if an error occur during parsing.
    • getParserErrorManager

      ErrorManager getParserErrorManager()
      Returns the parser error manager to get the messages generated while parsing.
      Returns:
      the parser error manger.
    • instantiate

      Problem instantiate(DefaultParsedProblem problem)
      Instantiates the planning problem from a parsed problem.
      Parameters:
      problem - the problem to instantiate.
      Returns:
      the instantiated planning problem or null if the problem cannot be instantiated.
    • solve

      Plan solve(Problem problem) throws ProblemNotSupportedException
      Search a plan for the specified planning problem.
      Parameters:
      problem - the problem to be solved. The problem cannot be null.
      Returns:
      the solution plan or null is no solution was found.
      Throws:
      ProblemNotSupportedException - if the problem to solve is not supported.
    • solve

      Search a plan for the current planner configuration.
      Returns:
      the solution plan or null is no solution was found.
      Throws:
      InvalidConfigurationException - if the planner has an invalid configuration to run.
    • getStatistics

      Statistics getStatistics()
      Returns the statistics of the planner.
      Returns:
      the statistics of the planner.
      See Also:
      Statistics
    • hasValidConfiguration

      boolean hasValidConfiguration()
      Returns if the planner configuration is valid or not.
      Returns:
      true if the configuration is valide false otherwise.
    • isSupported

      boolean isSupported(Problem problem)
      Returns if a specified problem is supported by the planner.
      Parameters:
      problem - the problem to test.
      Returns:
      true if the problem is supported false otherwise.
    • getInstance

      static Planner getInstance(Planner.Name name, PlannerConfiguration configuration)
      Create an instance of a planner from a specified configuration.
      Parameters:
      name - the name of the planner to create.
      configuration - the configuration of the planner.
      Returns:
      the planner created.