public class Percept extends SystemAgent implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
PseudoTree |
tree
The tree.
|
Constructor and Description |
---|
Percept(Percept p)
Instantiates a new percept.
|
Percept(World world)
Instantiates a new percept.
|
Modifier and Type | Method and Description |
---|---|
void |
addTarget(Agent a)
Adds the target.
|
void |
ajustMinMax()
Allow the percept to record the lower and higher value perceived.
|
void |
computeAMessage(Message m)
Compute A message.
|
java.util.ArrayList<Agent> |
getActivatedContext()
Gets the activated context.
|
java.util.ArrayList<Context> |
getContextIncluding(double v)
Gets the context including.
|
double |
getMinMaxDistance()
Gets the min max distance.
|
double |
getOldValue()
Gets the old value.
|
BlackBoxAgent |
getSensor()
Gets the sensor.
|
java.util.ArrayList<? extends Agent> |
getTargets()
Gets the targets.
|
PseudoTree |
getTree()
Gets the tree.
|
double |
getValue()
Gets the value.
|
boolean |
isEnum()
Checks if is enum.
|
void |
play()
This is the core behaviour of the percept agent.
|
void |
setActivatedContext(java.util.ArrayList<Agent> activatedContext)
Sets the activated context.
|
void |
setEnum(boolean isEnum)
Sets the enum.
|
void |
setOldValue(double oldValue)
Sets the old value.
|
void |
setSensor(BlackBoxAgent sensor)
Sets the sensor.
|
void |
setTargets(java.util.ArrayList<Agent> targets)
Sets the targets.
|
void |
setTree(PseudoTree tree)
Sets the tree.
|
void |
setValue(double value)
Sets the value.
|
getWorld, setWorld
die, getID, getMessages, getMessagesBin, getName, isDying, readMessage, sendExpressMessage, sendMessage, sendMessage, setDying, setID, setMessages, setMessagesBin, setName
public PseudoTree tree
public Percept(World world)
world
- the worldpublic Percept(Percept p)
p
- the ppublic void play()
play
in class SystemAgent
public java.util.ArrayList<Context> getContextIncluding(double v)
v
- the vpublic void computeAMessage(Message m)
Agent
computeAMessage
in class Agent
m
- the mpublic void ajustMinMax()
public double getMinMaxDistance()
public java.util.ArrayList<Agent> getActivatedContext()
public void setActivatedContext(java.util.ArrayList<Agent> activatedContext)
activatedContext
- the new activated contextpublic double getValue()
public void setValue(double value)
value
- the new valuepublic BlackBoxAgent getSensor()
public void setSensor(BlackBoxAgent sensor)
sensor
- the new sensorpublic java.util.ArrayList<? extends Agent> getTargets()
SystemAgent
getTargets
in class SystemAgent
public void setTargets(java.util.ArrayList<Agent> targets)
targets
- the new targetspublic void addTarget(Agent a)
a
- the apublic double getOldValue()
public void setOldValue(double oldValue)
oldValue
- the new old valuepublic PseudoTree getTree()
public void setTree(PseudoTree tree)
tree
- the new treepublic boolean isEnum()
public void setEnum(boolean isEnum)
isEnum
- the new enum