Package fr.uga.pddl4j.planners
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
This interface defines the main methods of to access a planner.
- Since:
- 3.0
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic String
The default value of DOMAIN setting used for planner configuration.static LogLevel
The default value of the LOG_LEVEL setting used for planner configuration.static String
The default value of PROBLEM setting used for planner configuration.static int
The default value of TIME_OUT (in seconds) setting used for planner configuration.static String
The DOMAIN setting used for planner configuration.static String
The LOG_LEVEL setting used for planner configuration.static String
The PROBLEM setting used for planner configuration.static String
The TIME_OUT setting used for planner configuration. -
Method Summary
Modifier and TypeMethodDescriptionReturns the configuration of the planner.static PlannerConfiguration
This method return the default arguments of the planner.Returns the path to the PDDL domain file.Returns the domain file containing the PDDL domain description.static Planner
getInstance(Planner.Name name, PlannerConfiguration configuration)
Create an instance of a planner from a specified configuration.Returns the trace level of the planner.Returns the parser error manager to get the messages generated while parsing.Returns the path to the PDDL problem description.Returns the problem file containing the PDDL problem description.Returns the statistics of the planner.int
Returns the timeout of the planner.boolean
Returns if the planner configuration is valid or not.instantiate(DefaultParsedProblem problem)
Instantiates the planning problem from a parsed problem.boolean
isSupported(Problem problem)
Returns if a specified problem is supported by the planner.parse()
Parses the domain and the problem description given ine the planner configuration.Parses the domain and the problem description specified in parameters.void
setConfiguration(PlannerConfiguration configuration)
Sets the configuration of the planner.void
Sets the domain of the planner.void
setLogLevel(LogLevel level)
Sets the trace level of the planner.void
setProblem(String problem)
Sets the path to the PDDL problem description.void
setTimeout(int timeout)
Sets the timeout of the planner.solve()
Search a plan for the current planner configuration.Search a plan for the specified planning problem.
-
Field Details
-
DOMAIN_SETTING
The DOMAIN setting used for planner configuration.- See Also:
- Constant Field Values
-
DEFAULT_DOMAIN
The default value of DOMAIN setting used for planner configuration.- See Also:
- Constant Field Values
-
PROBLEM_SETTING
The PROBLEM setting used for planner configuration.- See Also:
- Constant Field Values
-
DEFAULT_PROBLEM
The default value of PROBLEM setting used for planner configuration.- See Also:
- Constant Field Values
-
TIME_OUT_SETTING
The TIME_OUT setting used for planner configuration.- See Also:
- Constant Field Values
-
DEFAULT_TIME_OUT
static final int DEFAULT_TIME_OUTThe default value of TIME_OUT (in seconds) setting used for planner configuration.- See Also:
- Constant Field Values
-
LOG_LEVEL_SETTING
The LOG_LEVEL setting used for planner configuration.- See Also:
- Constant Field Values
-
DEFAULT_LOG_LEVEL
The default value of the LOG_LEVEL setting used for planner configuration.
-
-
Method Details
-
setDomain
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
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
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
Sets the configuration of the planner.- Parameters:
configuration
- the configuration to set.
-
getDefaultConfiguration
This method return the default arguments of the planner.- Returns:
- the default arguments of the planner.
- See Also:
PlannerConfiguration
-
parse
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
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
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 validefalse
otherwise.
-
isSupported
Returns if a specified problem is supported by the planner.- Parameters:
problem
- the problem to test.- Returns:
true
if the problem is supportedfalse
otherwise.
-
getInstance
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.
-