Package fr.uga.pddl4j.problem.operator
Class AbstractDurativeOperator
java.lang.Object
fr.uga.pddl4j.problem.operator.AbstractInstantiatedOperator
fr.uga.pddl4j.problem.operator.AbstractDurativeOperator
- All Implemented Interfaces:
Operator
,Serializable
- Direct Known Subclasses:
DurativeAction
,DurativeMethod
This abstract class implements the common part of a durative operator.
- See Also:
- Serialized Form
-
Field Summary
Modifier and TypeFieldDescriptionstatic NumericVariable
The default duration of the operator (0.0). -
Constructor Summary
ModifierConstructorDescriptionprotected
Creates a new operator from an other.protected
AbstractDurativeOperator(String name, int arity)
Creates a new operator.protected
AbstractDurativeOperator(String name, int[] parameters, int[] instantiations, TemporalCondition preconditions)
Creates a new operator. -
Method Summary
Modifier and TypeMethodDescriptionReturns the duration of the action.Returns the duration of the action.Return the precondition of the operator.void
setDuration(NumericVariable duration)
Sets the duration of the action.void
setDurationConstraints(List<NumericConstraint> constraints)
Sets the duration of the action.void
setPrecondition(TemporalCondition precondition)
Set the precondition of the operator.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_DURATION
The default duration of the operator (0.0).
-
-
Constructor Details
-
AbstractDurativeOperator
Creates a new operator from an other.- Parameters:
other
- the other operator.
-
AbstractDurativeOperator
Creates a new operator.- Parameters:
name
- the name of the operator.arity
- the arity of the operator.
-
AbstractDurativeOperator
protected AbstractDurativeOperator(String name, int[] parameters, int[] instantiations, TemporalCondition preconditions)Creates a new operator. The length of the parameters and the length of instantiations must be the same.- Parameters:
name
- the name of the operator.parameters
- the types of the parameters.instantiations
- the values of the parameters.preconditions
- the precondition of the operator.
-
-
Method Details
-
getPrecondition
Return the precondition of the operator.- Returns:
- the precondition of the operator.
-
setPrecondition
Set the precondition of the operator.- Parameters:
precondition
- the precondition to set.
-
getDurationConstraints
Returns the duration of the action.- Returns:
- the duration of the action.
-
setDurationConstraints
Sets the duration of the action.- Parameters:
constraints
- the duration to set.
-
getDuration
Returns the duration of the action.- Returns:
- the duration of the action.
-
setDuration
Sets the duration of the action.- Parameters:
duration
- the duration to set.
-