Package fr.uga.pddl4j.parser
Class ParsedMethod
java.lang.Object
fr.uga.pddl4j.parser.AbstractParsedObject
fr.uga.pddl4j.parser.ParsedAbstractOperator
fr.uga.pddl4j.parser.ParsedMethod
- All Implemented Interfaces:
ParsedObject
,ParsedOperator
,Serializable
This class implements a method for htn planning operator parsed.
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from interface fr.uga.pddl4j.parser.ParsedObject
DEFAULT_BEGIN_LINE, DEFAULT_BEGING_COLUMN, DEFAULT_END_COLUMN, DEFAULT_END_LINE
-
Constructor Summary
ConstructorDescriptionParsedMethod(ParsedMethod other)
Create a new method from another.ParsedMethod(Symbol<String> name, List<TypedSymbol<String>> parameters, Expression<String> task, Expression<String> preconditions, Expression<String> tasks, Expression<String> ordering, Expression<String> constraints, boolean ordered, boolean durative)
Creates method with a specified name, parameter, task performed, precondition and task network.ParsedMethod(Symbol<String> name, List<TypedSymbol<String>> parameters, Expression<String> task, Expression<String> duration, Expression<String> preconditions, Expression<String> tasks, Expression<String> ordering, Expression<String> constraints, boolean ordered, boolean durative)
Creates method with a specified name, parameter, task performed, precondition and task network.ParsedMethod(Symbol<String> name, List<TypedSymbol<String>> parameters, Expression<String> task, Expression<String> duration, Expression<String> preconditions, ParsedTaskNetwork network)
Creates method with a specified name, parameter, task performed, precondition and task network.ParsedMethod(Symbol<String> name, List<TypedSymbol<String>> parameters, Expression<String> task, Expression<String> preconditions, ParsedTaskNetwork network)
Creates method with a specified name, parameter, task performed, precondition and task network. -
Method Summary
Modifier and TypeMethodDescriptionReturns the logical constraints between the tasks of the task network.Returns the ordering constraints between the tasks of the task network.Returns the tasks of the task network.getTask()
Returns the task performed by the method.Returns the task network of this method.boolean
Returns if the task network is total ordered or not.void
setLogicalConstraints(Expression<String> constraints)
Sets the logical constraints between the tasks of the task network.void
setOrdering(Expression<String> constraints)
Sets the ordering constraints between the tasks of the task network.void
setSubTasks(Expression<String> tasks)
Sets the tasks of the task network.void
setTask(Expression<String> task)
Sets the task performed by the method.void
setTaskNetwork(ParsedTaskNetwork tasknetwork)
Sets the task network of this method.void
setTotallyOrdered(boolean flag)
Set the boolean totally ordered flag of the task network to a specified value.toString()
Returns a PDDL string representation of the method.Methods inherited from class fr.uga.pddl4j.parser.ParsedAbstractOperator
equals, getArity, getDuration, getName, getParameter, getParameters, getPreconditions, hashCode, isDurative, setDuration, setName, setParameters, setPreconditions, toTask
Methods inherited from class fr.uga.pddl4j.parser.AbstractParsedObject
getBeginColumn, getBeginLine, getEndColumn, getEndLine, setBegin, setBeginColumn, setBeginLine, setEnd, setEndColumn, setEndLine
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface fr.uga.pddl4j.parser.ParsedObject
getBeginColumn, getBeginLine, getEndColumn, getEndLine, setBegin, setBeginColumn, setBeginLine, setEnd, setEndColumn, setEndLine
-
Constructor Details
-
ParsedMethod
Create a new method from another.- Parameters:
other
- the other method.
-
ParsedMethod
public ParsedMethod(Symbol<String> name, List<TypedSymbol<String>> parameters, Expression<String> task, Expression<String> duration, Expression<String> preconditions, Expression<String> tasks, Expression<String> ordering, Expression<String> constraints, boolean ordered, boolean durative)Creates method with a specified name, parameter, task performed, precondition and task network.- Parameters:
name
- The name of the method.parameters
- The list of the method parameters.task
- The task performed by the method.duration
- The duration constraints of the method.preconditions
- The preconditions of the task. This parameter can be null.tasks
- The subtasks of the method.ordering
- The ordering constraints between the subtasks of the method.constraints
- The constraint on the subtasks of the method.ordered
- The flag to indicate if the subtasks of the method is total ordered or not.durative
- The flag to indicate if the method is durative or not.
-
ParsedMethod
public ParsedMethod(Symbol<String> name, List<TypedSymbol<String>> parameters, Expression<String> task, Expression<String> preconditions, Expression<String> tasks, Expression<String> ordering, Expression<String> constraints, boolean ordered, boolean durative)Creates method with a specified name, parameter, task performed, precondition and task network.- Parameters:
name
- The name of the method.parameters
- The list of the method parameters.task
- The task performed by the method.preconditions
- The preconditions of the task. This parameter can be null.tasks
- The subtasks of the method.ordering
- The ordering constraints between the subtasks of the method.constraints
- The constraint on the subtasks of the method.ordered
- The flag to indicate if the subtasks of the method is total ordered or not.durative
- The flag to indicate if the method is durative or not.
-
ParsedMethod
public ParsedMethod(Symbol<String> name, List<TypedSymbol<String>> parameters, Expression<String> task, Expression<String> duration, Expression<String> preconditions, ParsedTaskNetwork network)Creates method with a specified name, parameter, task performed, precondition and task network.- Parameters:
name
- The name of the method.parameters
- The list of the method parameters.task
- The task performed by the method.duration
- The duration constraints of the method.preconditions
- The preconditions of the task. This parameter can be null.network
- the task network of the method.
-
ParsedMethod
public ParsedMethod(Symbol<String> name, List<TypedSymbol<String>> parameters, Expression<String> task, Expression<String> preconditions, ParsedTaskNetwork network)Creates method with a specified name, parameter, task performed, precondition and task network.- Parameters:
name
- The name of the method.parameters
- The list of the method parameters.task
- The task performed by the method.preconditions
- The preconditions of the task. This parameter can be null.network
- the task network of the method.
-
-
Method Details
-
getTask
Returns the task performed by the method.- Returns:
- the method tasks.
-
setTask
Sets the task performed by the method.- Parameters:
task
- The task performed by the method.
-
getSubTasks
Returns the tasks of the task network.- Returns:
- the tasks of the task network.
-
setSubTasks
Sets the tasks of the task network.- Parameters:
tasks
- The tasks to set.
-
getOrdering
Returns the ordering constraints between the tasks of the task network.- Returns:
- the ordering constraints of the task network.
-
setOrdering
Sets the ordering constraints between the tasks of the task network.- Parameters:
constraints
- The constraints to set.
-
getConstraints
Returns the logical constraints between the tasks of the task network.- Returns:
- the logical constraints of the task network.
-
setLogicalConstraints
Sets the logical constraints between the tasks of the task network.- Parameters:
constraints
- The constraints to set.
-
isTotallyOrdered
public final boolean isTotallyOrdered()Returns if the task network is total ordered or not.- Returns:
- true the method is total ordered or not, false otherwise.
-
setTotallyOrdered
public final void setTotallyOrdered(boolean flag)Set the boolean totally ordered flag of the task network to a specified value.- Parameters:
flag
- The flag to set.
-
getTaskNetwork
Returns the task network of this method.- Returns:
- the tasknetwork of this method.
-
setTaskNetwork
Sets the task network of this method.- Parameters:
tasknetwork
- the tasknetwork to set.
-
toString
Returns a PDDL string representation of the method.
-