Package fr.uga.pddl4j.problem.operator
Class DurativeAction
java.lang.Object
fr.uga.pddl4j.problem.operator.AbstractInstantiatedOperator
fr.uga.pddl4j.problem.operator.AbstractDurativeOperator
fr.uga.pddl4j.problem.operator.DurativeAction
- All Implemented Interfaces:
Operator
,Serializable
This class implements a compact representation for a durative action.
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDurativeAction(DurativeAction other)
Creates a new action from another durative action.DurativeAction(String name, int arity)
Creates a new action.DurativeAction(String name, int arity, TemporalCondition precondition, TemporalEffect effect)
Creates a new action. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a conditional effect to the action.Returns the effects of the action.Returns the unconditional effect of the action.void
setConditionalEffects(List<TemporalConditionalEffect> effects)
Returns the conditional effects to the action.Methods inherited from class fr.uga.pddl4j.problem.operator.AbstractDurativeOperator
getDuration, getDurationConstraints, getPrecondition, setDuration, setDurationConstraints, 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_DURATION
The default duration of the method.
-
-
Constructor Details
-
DurativeAction
Creates a new action from another durative action. This constructor is the copy constructor.- Parameters:
other
- the other action.
-
DurativeAction
Creates a new action.- Parameters:
name
- the name of the action.arity
- the arity of the action.
-
DurativeAction
public DurativeAction(String name, int arity, TemporalCondition precondition, TemporalEffect effect)Creates a new action.- Parameters:
name
- the name of the action.arity
- the arity of the action.precondition
- the precondition of the action.effect
- the effects of the action.
-
-
Method Details
-
getConditionalEffects
Returns the effects of the action.- Returns:
- the effects of the action.
-
setConditionalEffects
Returns the conditional effects to the action.- Parameters:
effects
- the conditional effects of the action.
-
addConditionalEffect
Adds a conditional effect to the action.- Parameters:
effect
- the conditional effect to addValue.
-
getUnconditionalEffect
Returns the unconditional effect of the action.- Returns:
- the unconditional effect of the action.
-