Protocols

The following examples show how to use the support provided JADE to implement interaction protocols.

 

FIPARequestInitiatorAgent
Description:
This example shows how to implement the initiator role in a FIPA-request interaction protocol. In this case in particular we use an AchieveREInitiator ("Achieve Rational effect") to request a dummy action to a number of agents (whose local names must be specified as arguments).

This example should be used together with the FIPARequestResponderAgent as described below.
Start the JADE runtime (with the management GUI) and launch some FIPARequestResponderAgent on it.
java jade.Boot -gui r1:examples.protocols.FIPARequestResponderAgent r2:examples.protocols.FIPARequestResponderAgent
Then, from another window (or from the management GUI), launch an FIPARequestInitiatorAgent specifying the local names of the responder as arguments.
java jade.Boot -container i:examples.protocols.FIPARequestInitiatorAgent(r1 r2)
Jade classes used:
Agent, ACLMessage, AchieveREInitiator
Source
\src\examples\protocols\FIPARequestInitiatorAgent.java

 

FIPARequestResponderAgent
Description:
This example shows how to implement the responder role in a FIPA-request interaction protocol. In this case in particular we use an AchieveREResponder ("Achieve Rational effect") to serve requests to perform actions from other agents. We use a random generator to simulate request refusals and action execution failures.

This example should be used together with the FIPARequestInitiatorAgent as described here.
Jade classes used:
Agent, ACLMessage, MessageTemplate, AchieveREResponder
Source
\src\examples\protocols\FIPARequestResponderAgent.java

 

ContractNetInitiatorAgent
Description:
This example shows how to implement the initiator role in a FIPA-contract-net interaction protocol. In this case in particular we use a ContractNetInitiator to assign a dummy task to the agent that provides the best offer among a set of agents (whose local names must be specified as arguments).

This example should be used together with the ContractNetResponderAgent as described below.
Start the JADE runtime (with the management GUI) and launch some ContractNetResponderAgent on it.
java jade.Boot -gui r1:examples.protocols.ContractNetResponderAgent r2:examples.protocols.ContractNetResponderAgent
Then, from another window (or from the management GUI), launch an ContractNetInitiatorAgent specifying the local names of the responder as arguments.
java jade.Boot -container i:examples.protocols.ContractNetInitiatorAgent(r1 r2)
Jade classes used:
Agent, ACLMessage, ContractNetInitiator
Source
\src\examples\protocols\ContractNetInitiatorAgent.java

 

ContractNetResponderAgent
Description:
This example shows how to implement the responder role in a FIPA-contract-net interaction protocol. In this case in particular we use a ContractNetResponder to participate into a negotiation where an initiator needs to assign a task to an agent among a set of candidates.

This example should be used together with the ContractNetInitiatorAgent as described here.
Jade classes used:
Agent, ACLMessage, MessageTemplate, ContractNetResponder
Source
\src\examples\protocols\ContractNetResponderAgent.java

 

BrokerAgent
Description:
This example shows how to implement nested protocols. In this case in particular we want to implement a broker agent that forwards incoming requests to perform actions to another agent. To implement that we use an AchieveREResponder ("Achieve Rational effect") and we register an AchieveREInitiator in the state where the requested action has to be performed.

This example should be used together with the FIPARequestInitiatorAgent and the FIPARequestResponderAgent as described below.
Start the JADE runtime (with the management GUI) and launch one FIPARequestResponderAgent and one BrokerAgent on it. Specify the name of the responder as an argument to the broker.
java jade.Boot -gui r:examples.protocols.FIPARequestResponderAgent b:examples.protocols.BrokerAgent(r)
Then, from another window (or from the management GUI), launch a FIPARequestInitiatorAgent specifying the local name of the broker as argument.
java jade.Boot -container i:examples.protocols.FIPARequestInitiatorAgent(b)
Jade classes used:
Agent, ACLMessage, MessageTemplate, AchieveREResponder, AchieveContractNetInitiator
Source
\src\examples\protocols\BrokerAgent.java

 

 


JADE is a trademark of TILAB (formerly CSELT). 
JADE
has been developed jointly by TILAB (formerly CSELT) and the Computer Engineering Group of the University of Parma