Ontology
Author: Giovanni Caire (TILab S.p.a)
Date: 17/09/2001
This examples shows how to use the support for application specific ontologies provided by JADE.
A very simple ontology (the employment-ontology)including concepts related to the employment of people into companies is defined in the package examples.ontology.employment. The roles in this ontology are
Concepts:
PERSON
COMPANY
ADDRESS
Predicates
WORKS-FOR – meaning that a person is working for a company
Actions
ENGAGE – meaning that a person is being engaged by a company
Propositions
ENGAGEMENT-ERROR – meaning that an error occurred in performing the engage action
PERSON-TOO-OLD – meaning that a person cannot be engaged by a company because he is too old.
The employment subdirectory contains one class for each ontological role plus the static class EmploymentOntology that creates an ontology
object and adds to it all the roles described above.
The employment-ontology is used by two agents:
RequesterAgent |
Description: |
The RequesterAgent gets the details of people to engage from the user and asks the EngagerAgent to actually engage them. It has a single cyclic complex behaviour in which
– The details of a person to engage are got from the user. This is done in the onStart() method.
– A query is sent to the EngagerAgent to check that the indicated person is not already working for the indicated company. This is done by following the FIPA-Query protocol and it is implemented through a SimpleAchieveREInitiator that is added as a sub-behaviour of the main agent behaviour.
– According to the result of the query, A request is sent to the EngagerAgent to actually perform the engagement. This is done following the FIPA-Request protocol and is implemented through another SimpleAchieveREInitiator that is added as a sub-behaviour.
– In the onEnd() method the main agent behaviour is reset so that it is performed cyclicallyIn the agent setup, besides the addition of the main behaviour, the name of the EngagerAgent and the detail of the company where to engage people are requested to the user. |
Jade classes used: |
SequentialBehaviour, SimpleAchieveREInitiator |
Source |
\src\examples\ontology\RequesterAgent.java |
EngagerAgent |
Description: |
The EngagerAgent actually performs the engagement. The Agent has two behaviours:
– A SimpleAchieveREResponder to handle queries about people working for a company following a FIPA-Query protocol.
– Another SimpleAchieveREResponder to handle engagement requests following a FIPA-Request protocol.
Both behaviours are cyclic.
The company whose engagement are handled by the EngagerAgent is fixed:
CSELT
Via Reiss Romoli 274
Turin |
Jade classes used: |
SimpleAchieveREResponder |
Source |
\src\examples\ontology\EngagerAgent.java |