Package fr.uga.pddl4j.parser
Interface ParsedProblem
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
DefaultParsedProblem
This interface defines the methods of a planning problem read by the parser.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addInitialFact(Expression<String> fact)
Adds an initial fact to the problem.boolean
addObject(TypedSymbol<String> object)
Adds an object to the problem.boolean
addRequirement(RequireKey requirement)
Adds a requirements to the domain.Returns the constraints loaded in the domain file.Returns the name of the domain.getGoal()
Returns the list of goal defined in the problem file.getInit()
Returns the list of initial facts defined in the problem file.Returns the task network of the problem.Returns the metric of the problem ornull
if the problem has no metric specification.Returns the object from a specified symbol.Returns the list of objects declared in the problem file.Return the name of the problem.Returns the set of requirements.void
Normalize the problem.void
setConstraints(Expression<String> constraints)
Sets the constraints to the domain.void
setDomainName(Symbol<String> name)
Sets a name to the domain.void
setGoal(Expression<String> goal)
Set the goal of this problem.void
setInitialTaskNetwork(ParsedTaskNetwork network)
Set the initial task network of the problem.void
setMetric(Expression<String> metric)
Sets the metric of the problem.void
setProblemName(Symbol<String> name)
Sets the name of the problem.toString()
Returns a string representation of this problem.
-
Method Details
-
getDomainName
Returns the name of the domain.- Returns:
- the name of the domain.
-
setDomainName
Sets a name to the domain.- Parameters:
name
- the name to set.
-
getProblemName
Return the name of the problem.- Returns:
- the name of the problem.
-
setProblemName
Sets the name of the problem.- Parameters:
name
- the name to set.
-
getRequirements
Set<RequireKey> getRequirements()Returns the set of requirements.- Returns:
- the set of requirements.
-
addRequirement
Adds a requirements to the domain.- Parameters:
requirement
- the requirement to add.- Returns:
true
if the requirement was added;false
otherwise.
-
getObjects
List<TypedSymbol<String>> getObjects()Returns the list of objects declared in the problem file.- Returns:
- the list of objects declared in the problem file.
-
addObject
Adds an object to the problem.- Parameters:
object
- the object to add.- Returns:
true
if the object was added;false
otherwise.
-
setInitialTaskNetwork
Set the initial task network of the problem.- Parameters:
network
- The task network to set.
-
getInitialTaskNetwork
ParsedTaskNetwork getInitialTaskNetwork()Returns the task network of the problem.- Returns:
- the task network of the problem. The task network may null if it is not defined.
-
getInit
List<Expression<String>> getInit()Returns the list of initial facts defined in the problem file.- Returns:
- the list of initial facts defined in the problem file.
-
addInitialFact
Adds an initial fact to the problem.- Parameters:
fact
- the fact to add.- Returns:
true
if the fact was added;false
otherwise.
-
getGoal
Expression<String> getGoal()Returns the list of goal defined in the problem file.- Returns:
- the list of goal defined in the problem file.
-
setGoal
Set the goal of this problem.- Parameters:
goal
- the goal of this problem.
-
getMetric
Expression<String> getMetric()Returns the metric of the problem ornull
if the problem has no metric specification.- Returns:
- the metric of the problem or
null
if the problem has no metric specification.
-
getConstraints
Expression<String> getConstraints()Returns the constraints loaded in the domain file.- Returns:
- the constraints loaded in the domain file or null if the domain has no constraints.
-
setConstraints
Sets the constraints to the domain.- Parameters:
constraints
- the constraint of the domain.
-
setMetric
Sets the metric of the problem.- Parameters:
metric
- the metric to set.
-
getObject
Returns the object from a specified symbol.- Parameters:
symbol
- The symbol.- Returns:
- the object from a specified symbol or
null
if no object with this symbol was declared.
-
normalize
void normalize()Normalize the problem. This method renames the variables and then move inward the negation of the goal and the constraints of the problem. -
toString
String toString()Returns a string representation of this problem.
-