public static class GraphDefinedDomain.GraphActionType extends java.lang.Object implements ActionType
Modifier and Type | Class and Description |
---|---|
static class |
GraphDefinedDomain.GraphActionType.GraphAction |
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.NodeTransitionProbability>>> |
transitionDynamics
The transition dynamics to use
|
Constructor and Description |
---|
GraphActionType(int aId,
java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbability>>> transitionDynamics)
Initializes a graph action object for the given domain and for the action of the given number.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Action> |
allApplicableActions(State s)
Returns all possible actions of this type that can be applied in the provided
State . |
protected boolean |
applicableInState(State s) |
Action |
associatedAction(java.lang.String strRep)
Returns an
Action whose parameters are specified by the given String representation (if
the ActionType manages multiple parameterizations) |
java.lang.String |
typeName()
The unique name of this
ActionType |
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.NodeTransitionProbability>>> transitionDynamics
public GraphActionType(int aId, java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbability>>> transitionDynamics)
aId
- the action identifier numbertransitionDynamics
- the underlying transition dynamics that also define the action preconditionspublic java.lang.String typeName()
ActionType
ActionType
typeName
in interface ActionType
String
name of this ActionType
public Action associatedAction(java.lang.String strRep)
ActionType
Action
whose parameters are specified by the given String
representation (if
the ActionType
manages multiple parameterizations)associatedAction
in interface ActionType
strRep
- the String
representation of the Action
parameters, if any, or null if there are no parameters.Action
public java.util.List<Action> allApplicableActions(State s)
ActionType
State
.allApplicableActions
in interface ActionType
s
- the State
in which all applicable actions of this ActionType
object should be returned.Action
s of this ActionType
object in in the given State
protected boolean applicableInState(State s)