cz.cuni.amis.pogamut.episodic.decisions
Class AtomicAction

Package class diagram package AtomicAction
java.lang.Object
  extended by cz.cuni.amis.pogamut.episodic.decisions.Node
      extended by cz.cuni.amis.pogamut.episodic.decisions.AtomicAction
All Implemented Interfaces:
INode, Serializable

public class AtomicAction
extends Node
implements Serializable

AtomicAction is a type node node that represents an execution of an atomic action by the agent. An atomic action does not have any more subnodes. It is always attached the Action node and it is executed when performing the parent action.

Atomic action is always a leaf of a decision tree and mirrors similar structure in the pogamut end project, where decisions are executed. Each time an agent executes an atomic action, this action and trace to it in the decision tree is sent to agent's memory module and its creates new nodes in the given episode tree. The EpisodeNode representing atomic action is always associated with the equivalent AtomicAction node in the decision tree. Usually more episode nodes will be associated with one decision node.

Author:
Michal Cermak
See Also:
Serialized Form

Field Summary
 
Fields inherited from class cz.cuni.amis.pogamut.episodic.decisions.Node
parent
 
Constructor Summary
AtomicAction(String name, int attractivity)
          Instantiate the class by providing its name.
 
Method Summary
 Collection<Node> getAllChildrenNodes()
          Since AtomicAction will always be a leaf in the decision tree, it will have no sub-nodes.
 Node getSubNode(String name)
          Since AtomicAction will always be a leaf in the decision tree, it will have no sub-nodes.
 
Methods inherited from class cz.cuni.amis.pogamut.episodic.decisions.Node
addAffordance, getAffordance, getAffordances, getAssociatedNode, getAttractivity, getId, getName, getType, setAssociatedSchemaNode, setId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AtomicAction

public AtomicAction(String name,
                    int attractivity)
Instantiate the class by providing its name.

There can be several atomic actions with identical name in the decistion tree, but no two atomic actions that are attached to one parent node can share the same name.

Parameters:
name - The describing the atomic action.
Method Detail

getSubNode

public Node getSubNode(String name)
Since AtomicAction will always be a leaf in the decision tree, it will have no sub-nodes. Therefore this method always returns null. It has to be implemented though, because AtomicAction needs to implement this method of the INode interface.

Specified by:
getSubNode in interface INode
Parameters:
name - The name of the wanted subnode.
Returns:
Returns null.

getAllChildrenNodes

public Collection<Node> getAllChildrenNodes()
Since AtomicAction will always be a leaf in the decision tree, it will have no sub-nodes. Therefore this method always returns empty collection. It has to be implemented though, because AtomicAction needs to implement this method of the INode interface.

Specified by:
getAllChildrenNodes in interface INode
Returns:
Returns empty collection.


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.