|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectgalatea.hla.Agent
galatea.glorias.Ag
This class is a general agent scheme with a minimal inference engine.
Ag is the main class in the package and the principal class in the agent
architectura described in [Uzcategui, 2002] and [Davila, 1997]. The current
implementation includes a very light version of the inference engine for the
agent, which only allow for condition-action rules with a simple heading.
Particular agent realization must subclass this class, adding the attributes
that may required for specific purposes. Among those, observational services
and, more importantly, the particular general goals for the agent must be
included (as attributes of the subclass of Ag).
This class also allows for two way to deal with sensing behaviour. The
constructors make up for the difference in implementing one behaviour or the
other.
Note that this class is a subclass of Agent in the galatea.hla package. This
separate package provides the wrapper for agents as to allow for different
implementation of agents in Galatea. Gloria is just one of them.
-----
Esta clase es un esquema general de agente que contiene un pequeño motor de
inferencia.
La clase Ag, almacena las observaciones, las influencias y las metas del
agente. En el caso de las observaciones y de las metas, las mismas deben
detallarse en cada uno de los agentes, los cuales debe implementarse como
instancias de sub-clases de Ag.
Esta clase tiene dos posibilidades: agentes que implementan sensores y los
agentes que no implementan sensores. La diferencia entre ambos se muestra en
los mètodos constructores implementados en esta clase.
Noten, por favor, que este clase es una subclase de la clase Agent en el
paquete galatea.hla. Este otro paquete contiene, entre otras cosas, el
"envoltorio" para los agentes, con algunos atributos generales (como las
listas de entradas y salidas). El objetivo de esta separación de atributos
generales de agentes (en galatea.hla.Agent) de los especificios de Gloria es
proveernos de una interfaz genérica para admitir otro tipo de agentes en
Galatea.
| Field Summary |
| Fields inherited from class galatea.hla.Agent |
agentId, agentType, clock, inputs, outputs, population |
| Constructor Summary | |
Ag(int n,
int m)
Constructor for agents that implements sensors. |
|
Ag(int n,
java.lang.String tipo)
Constructor for agents that does not implement sensors. |
|
| Method Summary | |
void |
activateSensor(int i)
This method activates the sensor of a determined position of the sensor`s array (which contains the total set of the agent's sensors). |
void |
addObservation(java.lang.String obs)
This method adds an observation to the agent's observation list. |
void |
addObservationSensor(int n,
java.lang.String[] obs)
This method is used for agents that implements sensors. |
void |
addPermanentGoal(java.lang.String name,
int n,
java.lang.String[] obs)
This method permits to specify the structure of each agent's goal: agent's goals name and the required observations list to activate each goal. |
void |
cycle()
The main cycle/locus of control of the agent. |
void |
rcycle()
The main cycle/locus of control of the agent. |
void |
run()
The agent's starting point when used as a thread. |
| Methods inherited from class galatea.hla.Agent |
getAgentId, input, isReasoningSuspended, resumeReasoning, stopReasoning |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Ag(int n,
java.lang.String tipo)
n - int. Number of goals that the agent may perform.
public Ag(int n,
int m)
n - int. Number of goals that the agent may perform. m - int. It indicates the quantity of agent's sensors. | Method Detail |
public void activateSensor(int i)
i - int. It is the position of the sensor at the sensor
array.
public void addPermanentGoal(java.lang.String name,
int n,
java.lang.String[] obs)
name - String. It indicates the name of the goal to be executed. n - int. It is the position of the goal at the set of agent's
goals. obs - String[]. List of the required observations to execute the
permanent goal. public void addObservation(java.lang.String obs)
obs - String. Observation that must be added to the list of
observations.
public void addObservationSensor(int n,
java.lang.String[] obs)
n - int. It is the number associated to the sensor. obs - String[]. It is an array that contains the observations
required to activate the determined sensor. public void rcycle()
public void cycle()
public void run()
run in class Agent
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||