CoPS.agents
Class CoPSDecomposer

java.lang.Object
  extended byAgent
      extended byCoPS.agents.CoPSAgent
          extended byCoPS.agents.CoPSDecomposer
Direct Known Subclasses:
CheckUpDecomposer

public abstract class CoPSDecomposer
extends CoPSAgent

This class represent a decomposer agent. Modified by Kari Roessland.

See Also:
Serialized Form

Field Summary
 TMST library
           
static int teamID
           
 
Constructor Summary
CoPSDecomposer()
           
 
Method Summary
protected abstract  boolean correctFormat(java.lang.String task)
          Method called by the ReviewTask behaviour.
protected abstract  TMST decomposeProblem(java.lang.String task)
          Abstract method which define how a task is supposed to be decomposed.
protected static int getTeamID()
          Method for getting a new (by incrementing) teamId.
protected abstract  TMST setTaskStructureLibrary()
          Method for initializing the knowledge model (task structure tree) of a decomposer.
 void setup()
          The method setup initializes the desomposing agent.
 
Methods inherited from class CoPS.agents.CoPSAgent
setServiceDescription
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

library

public TMST library

teamID

public static int teamID
Constructor Detail

CoPSDecomposer

public CoPSDecomposer()
Method Detail

setup

public void setup()
The method setup initializes the desomposing agent. First it registers with the service description provided by the setSereviceDescription. Then it enters a state where it waits for new tasks to decompose.


decomposeProblem

protected abstract TMST decomposeProblem(java.lang.String task)
                                  throws NotAbleToDecomposeTaskException
Abstract method which define how a task is supposed to be decomposed.

Returns:
LocalKnowledgeModel Returns a decomposition which is represented as a jCreek model composed of entities and relations.
Throws:
NotAbleToDecomposeTaskException

correctFormat

protected abstract boolean correctFormat(java.lang.String task)
Method called by the ReviewTask behaviour.

Returns:
boolean Returns true if, the task is understandable and follows a format the decomposer understands

setTaskStructureLibrary

protected abstract TMST setTaskStructureLibrary()
Method for initializing the knowledge model (task structure tree) of a decomposer. Called in the setup() method.


getTeamID

protected static int getTeamID()
Method for getting a new (by incrementing) teamId. Added by Kari Roessland.

Returns:
A team-id that is unique no matter what Decomposer returns it