public static class GraphDefinedDomain.GraphAction extends Action
Modifier and Type | Field and Description |
---|---|
protected int |
aId
The action number of this action
|
protected java.util.Random |
rand
Random object for sampling the stochastic graph transitions
|
protected java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbibility>>> |
transitionDynamics
The transition dynamics to use
|
actionObservers, domain, name, parameterClasses, parameterOrderGroup
Constructor and Description |
---|
GraphDefinedDomain.GraphAction(Domain domain,
int aId,
java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbibility>>> transitionDynamics)
Initializes a graph action object for the given domain and for the action of the given number.
|
Modifier and Type | Method and Description |
---|---|
boolean |
applicableInState(State st,
java.lang.String[] params)
Returns true if this action can be applied in this specified state with the specified parameters.
|
java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbibility>>> |
getTransitionDynamics() |
java.util.List<TransitionProbability> |
getTransitions(State st,
java.lang.String[] params)
Returns the transition probabilities for applying this action in the given state with the given set of parameters.
|
protected State |
performActionHelper(State st,
java.lang.String[] params)
This method determines what happens when an action is applied in the given state with the given parameters.
|
void |
setTransitionDynamics(java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbibility>>> transitionDynamics) |
addActionObserver, applicableInState, clearAllActionsObservers, deterministicTransition, equals, getAllApplicableGroundedActions, getAllApplicableGroundedActionsFromActionList, getDomain, getName, getParameterClasses, getParameterOrderGroups, getTransitions, hashCode, init, isPrimitive, parametersAreObjects, performAction, performAction
protected java.util.Random rand
protected int aId
protected java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbibility>>> transitionDynamics
public GraphDefinedDomain.GraphAction(Domain domain, int aId, java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbibility>>> transitionDynamics)
domain
- the domain of the actionaId
- the action identifier numberpublic boolean applicableInState(State st, java.lang.String[] params)
Action
applicableInState
in class Action
st
- the state to perform the action onparams
- a String array specifying the action object parametersprotected State performActionHelper(State st, java.lang.String[] params)
Action
performActionHelper
in class Action
st
- the state to perform the action onparams
- a String array specifying the action object parameterspublic java.util.List<TransitionProbability> getTransitions(State st, java.lang.String[] params)
Action
TransitionProbability
objects. The list
is only required to contain transitions with non-zero probability. Since not all planning algorithms require
the full transition dynamics (and since it's impossible to enumerate them in some infinite state space domains),
this method is not requried to be implemented. However, it will throw an UnsupportedOperationException
if it is not overriden by the Action subclass if it is called by an algorithm that requires it.getTransitions
in class Action
st
- the state from which the transition probabilities when applying this action will be returned.params
- a String array specifying the action object parameterspublic java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbibility>>> getTransitionDynamics()
public void setTransitionDynamics(java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbibility>>> transitionDynamics)