Package fr.uga.pddl4j.problem.operator
Class Method
java.lang.Object
fr.uga.pddl4j.problem.operator.AbstractInstantiatedOperator
fr.uga.pddl4j.problem.operator.AbstractOperator
fr.uga.pddl4j.problem.operator.Method
- All Implemented Interfaces:
Operator
,Serializable
This class implements an method. This class is used to store compact representation of a method in a planning
problem.
- Since:
- 4.0
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAfterConstraints(int task)
Returns the condition that must hold after a specific task of the task network of the method.getBeforeConstraints(int task)
Returns the condition that must hold before a specific task of the task network of the method.getBetweenConstraints(int task1, int task2)
Returns the condition that must hold between two specific tasks of the task network of the method.Return the ordering constraints of the method.Return the subtasks of the method.int
getTask()
Return the task that is carried out by the method.Returns the task network of this method.void
setOrderingConstraints(DefaultOrderingConstraintNetwork constraints)
Set the new ordering constraints of the method.void
setSubTasks(List<Integer> tasks)
Set the subtasks of the method.void
setTask(int task)
Set the task carried out by the method.void
setTaskNetwork(TaskNetwork taskNetwork)
Set the task network of this method.Methods inherited from class fr.uga.pddl4j.problem.operator.AbstractOperator
getPrecondition, setPrecondition
Methods inherited from class fr.uga.pddl4j.problem.operator.AbstractInstantiatedOperator
arity, equals, getInstantiations, getName, getParameters, getTypeOfParameters, getValueOfParameter, hashCode, isAlreadyInstantiatedWith, isDummy, setDummy, setName, setTypeOfParameter, setValueOfParameter
-
Field Details
-
DEFAULT_TASK_INDEX
public static final int DEFAULT_TASK_INDEXThe default task index.- See Also:
- Constant Field Values
-
-
Constructor Details
-
Method
Create a new method from a specified method. This constructor create a deep copy of the specified method.- Parameters:
other
- the other method.
-
Method
Create a new method with a specified name. The task is set to the DEFAULT_TASK_INDEX and the task network is set to an empty task network with no orderings constraints.- Parameters:
name
- the name of the method.arity
- the arity of the method. The arity cannot be less that 0.
-
-
Method Details
-
getTask
public final int getTask()Return the task that is carried out by the method.- Returns:
- the task carried out by the method.
-
setTask
public final void setTask(int task)Set the task carried out by the method.- Parameters:
task
- the task the carried out by the method.
-
getSubTasks
Return the subtasks of the method.- Returns:
- the subtasks of the method.
-
setSubTasks
Set the subtasks of the method.- Parameters:
tasks
- the subtasks to set.
-
getOrderingConstraints
Return the ordering constraints of the method.- Returns:
- the ordering constraints of the method.
-
setOrderingConstraints
Set the new ordering constraints of the method.- Parameters:
constraints
- the orderings constraints to set
-
getTaskNetwork
Returns the task network of this method.- Returns:
- the task network of this method.
-
setTaskNetwork
Set the task network of this method.- Parameters:
taskNetwork
- the task network to set.
-
getBeforeConstraints
Returns the condition that must hold before a specific task of the task network of the method.- Parameters:
task
- the task.- Returns:
- the condition that must hold before a task or null if the task is not a task of the task network.
-
getAfterConstraints
Returns the condition that must hold after a specific task of the task network of the method.- Parameters:
task
- the task.- Returns:
- the condition that must hold after a task or null if the task is not a task of the task network.
-
getBetweenConstraints
Returns the condition that must hold between two specific tasks of the task network of the method.- Parameters:
task1
- the first task.task2
- the second task.- Returns:
- the condition that must hold between two tasks or null if t1 or t2 task is not a task of the task network.
-