|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectgalatea.hla.Agent
This is the wrapper class for agents in Galatea. It provides for a minimal
set of agent's services for the simulator. A unique identifier is attached to
each agent instance (agentId). Similarly, an attributes allows for the
identification of agent types (agentType).
Nevertheless, the most important attributes in the class are 1) the input
list, where the simulator will put input data for the agent (normally of type
String) and 2) the outputs list (of type LInfluences, as defined in this
package) from where the simulator will draw the agent's executing intentions
(i.e. its influences).
A clock attribute is provided for those implementations that may required a
clock within the agent.
-----
La clase Agent es un "envoltorio" para las implementaciones de agentes en
Galatea. La clase provee algunos servicios básicos que, para efectos del
simulador, deben prestar todas las implementaciones de agentes. En
particular, un identificador único, agentId, será mantenido automáticamente
para cada instancia de esta clase. Asimismo, las implementaciones debería
proveer mecanismos para asignar un tipo a los agentes (agentType).
No obstante, los atributos más importantes de esta clase envoltorio son 1) la
lista de entrada (inputs List), en la cual el simulador colocará las entradas
(del tipo que sean, normalmente Strings) al agente y 2) la lista de salida
(outputs de tipo LInfluence, clase de este paquete) de donde el simulador
recogerá la especificación de las acciones que el agente solicita se ejecuten
de inmediato (es decir, sus influencias).
Noten que se incluye un atributo para el reloj, clock, que podría ser
empleado cuando las implementaciones mantengan un reloj dentro del agente.
Nuestro planes de desarrollo contemplan que esta clase se convierta en el
elemento principal del COMPONENTE AGENTE.
| Field Summary | |
int |
agentId
This variable represents a unique identifier that is attached to each agent instance. |
java.lang.String |
agentType
This variable identifies the agent's type.. |
double |
clock
This variable is provided for those implementations that may required a clock within the agent.. |
java.util.ArrayList |
inputs
This variable is where the simulator will put input data for the agent (normally of type String). |
LOutputs |
outputs
This variable is the outputs list (of type LInfluences, as defined in this package) from where the simulator will draw the agent's executing intentions. |
static int |
population
This variable indicates how many instances of the Agent class are in the system. |
| Constructor Summary | |
Agent()
This constructor creates a new agent's instance. |
|
Agent(java.lang.String n)
This constructor creates an instance of the agent of n given type. |
|
| Method Summary | |
int |
getAgentId()
This method returns the value of the agent's id value. |
void |
input(java.lang.String o)
|
boolean |
isReasoningSuspended()
|
void |
resumeReasoning()
|
void |
run()
|
void |
stopReasoning()
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public int agentId
public static int population
public java.lang.String agentType
public double clock
public java.util.ArrayList inputs
public LOutputs outputs
| Constructor Detail |
public Agent()
public Agent(java.lang.String n)
n - String. It indicates agent's type. | Method Detail |
public int getAgentId()
public void run()
public void input(java.lang.String o)
o - public void stopReasoning()
public boolean isReasoningSuspended()
public void resumeReasoning()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||