Package fr.uga.pddl4j.problem.operator
Class IntAction
java.lang.Object
fr.uga.pddl4j.problem.operator.AbstractInstantiatedOperator
fr.uga.pddl4j.problem.operator.AbstractIntOperator
fr.uga.pddl4j.problem.operator.IntAction
- All Implemented Interfaces:
Operator,Serializable
This class implements an action. This class is used to store compact representation of an action
during the instantiation process.
Revisions:
- 20.10.2020: change the duration attribute to encode temporal problem.
- See Also:
- Serialized Form
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublegetCost()Returns the cost of the action.Return the effects of the action.voidsetCost(double cost)Sets the cost of the action.voidsetEffects(Expression<Integer> effects)Set the new effects of the action.Methods inherited from class fr.uga.pddl4j.problem.operator.AbstractIntOperator
getDuration, getPreconditions, isDurative, setDuration, setPreconditionsMethods 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_COST
public static double DEFAULT_COSTThe default cost of an action.
-
-
Constructor Details
-
IntAction
Create a new action from a specified action. This constructor create a deep copy of the specified action.- Parameters:
other- the other action.
-
IntAction
Create a new action with a specified name.- Parameters:
name- the name of the action.arity- the arity of the action. Arity must be greater than 0.
-
-
Method Details
-
getCost
public final double getCost()Returns the cost of the action.- Returns:
- the cost of the action.
-
setCost
public final void setCost(double cost)Sets the cost of the action.- Parameters:
cost- the cost to set.
-
getEffects
Return the effects of the action.- Returns:
- the effects of the action.
-
setEffects
Set the new effects of the action.- Parameters:
effects- the effects to set
-