demo.helicopter
Class CTFAgent

java.lang.Object
  extended bymil.navy.nps.relate.Thing
      extended bymil.navy.nps.relate.Agent
          extended bydemo.helicopter.CTFAgent

public class CTFAgent
extends Agent

CTFAgent extends the RELATE Agent. This is the core Entity that uses its assigned roles/goals/rules to determine: movement and shooting. This agent can take the roles of squad member, and squad leader. Each one of these roles comes complete with the goal/rule components.

Since:
JDK1.3
Version:
1.0, 17 Aug 00
Author:
Michael R. Dickson, Kimberly A. Roddy

Field Summary
 
Fields inherited from class mil.navy.nps.relate.Agent
relationshipManager
 
Fields inherited from class mil.navy.nps.relate.Thing
entityID, entityName
 
Constructor Summary
CTFAgent(long pID, java.lang.String pName)
          Constructor for this Agent
 
Method Summary
 void assignCredit()
          Assigns credit to current goal set.
 void drawSelf()
          drawSelf() can be used by the developer to draw the geometry of the entity if there is to be a visual representation of the entity in the simulation.
 java.util.Vector getProtocolVector()
           
 SensedEnvironment getSensedEnvironment()
          Setter and getter group
 boolean inRelationship()
          Utility method thatChecks to see if the agent is currently in a squad relationship.
 void setSensedEnvironment(SensedEnvironment pSEnv)
          Sets the agents SensedEnvironment to the passed in object
 void step()
          Updates this Object based on currently assigned private data members
 
Methods inherited from class mil.navy.nps.relate.Agent
addRelationshipName, addRelationshipNames, addRole, checkForRelationships, getActiveGoal, getActiveRole, getAgentID, getAgentName, getGoalList, getPastActiveGoal, getPersonality, getRelationshipTable, getRoleVector, getSensorList, removeRelationshipName, removeRole, setActiveGoal, setAgentID, setAgentName, setPastActiveGoal, setPersonality, setSensorList
 
Methods inherited from class mil.navy.nps.relate.Thing
getEntityID, getEntityName, setEntityID, setEntityName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CTFAgent

public CTFAgent(long pID,
                java.lang.String pName)
Constructor for this Agent

Method Detail

inRelationship

public boolean inRelationship()
Utility method thatChecks to see if the agent is currently in a squad relationship.


step

public void step()
Updates this Object based on currently assigned private data members

Specified by:
step in class Thing

getSensedEnvironment

public SensedEnvironment getSensedEnvironment()
Setter and getter group

Specified by:
getSensedEnvironment in class Agent
Returns:
A SensedEnvironment containing the perceived environement.

getProtocolVector

public java.util.Vector getProtocolVector()

setSensedEnvironment

public void setSensedEnvironment(SensedEnvironment pSEnv)
Description copied from class: Agent
Sets the agents SensedEnvironment to the passed in object

Specified by:
setSensedEnvironment in class Agent

assignCredit

public void assignCredit()
Description copied from class: Agent
Assigns credit to current goal set. This should call assignCredit() in all of the agents held goals. The result of these calls will assign weights to all goals. These weights will determine the current active goal for each goaltype held.

Specified by:
assignCredit in class Agent

drawSelf

public void drawSelf()
Description copied from class: Thing
drawSelf() can be used by the developer to draw the geometry of the entity if there is to be a visual representation of the entity in the simulation.

Specified by:
drawSelf in class Thing