325 linhas
12 KiB
HTML
325 linhas
12 KiB
HTML
<html>
|
|
|
|
<head>
|
|
<meta http-equiv="Content-Type"
|
|
content="text/html; charset=iso-8859-1">
|
|
<meta name="ProgId" content="FrontPage.Editor.Document">
|
|
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
|
|
<title>Protocols</title>
|
|
<link rel="stylesheet" type="text/css" href="stylesheet.css"
|
|
title="Style">
|
|
<!-- created by Alessandro Beneventi, Universita' degli Studi di Parma -->
|
|
<!-- alessandro.beneventi@re.nettuno.it -->
|
|
</head>
|
|
|
|
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF"
|
|
vlink="#0000FF" alink="#0000FF">
|
|
|
|
<table border="0" cellspacing="0" width="100%">
|
|
<tr>
|
|
<td bgcolor="#EEEEFF" id="NavBarCell1"><a
|
|
name="navbar_top_firstrow"></a> <table border="0"
|
|
cellpadding="0" cellspacing="3">
|
|
<tr>
|
|
<td align="center" valign="top" bgcolor="#EEEEFF"
|
|
id="NavBarCell1">Sections:</td>
|
|
<td align="center" valign="top" bgcolor="#EEEEFF"
|
|
id="NavBarCell1"><a href="index.html"><b>Index</b></a></td>
|
|
<td align="center" valign="top" bgcolor="#FFFFFF"
|
|
id="NavBarCell1Rev"> <b>Introduction</b></td>
|
|
<td align="center" valign="top" bgcolor="#EEEEFF"
|
|
id="NavBarCell1"><b>More Info.</b></td>
|
|
<td align="center" valign="top" bgcolor="#EEEEFF"
|
|
id="NavBarCell1"><b>Visual Index</b></td>
|
|
<td align="center" valign="top" bgcolor="#EEEEFF"
|
|
id="NavBarCell1"><a
|
|
href="file:///C|/jade/jade/doc/api/index.html"><b>Class
|
|
by Class</b></a></td>
|
|
<td align="center" valign="top" bgcolor="#EEEEFF"
|
|
id="NavBarCell1"><a
|
|
href="file:///C|/jade/jade/doc/links.htm"><b>Links</b></a></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td align="right" valign="top" rowspan="2"> </td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p><font size="6" face="Arial"><b>Protocols</b></font> </p>
|
|
|
|
<p><font face="Arial,Helvetica">The following examples show how to use
|
|
the support provided JADE to implement interaction protocols.
|
|
</font></p>
|
|
|
|
<ul>
|
|
<li><a href="#target1"><font size="4">FIPARequestInitiatorAgent</font></a><font
|
|
size="4"><br>
|
|
<br>
|
|
</font><font size="3">Author: Giovanni Caire (TILab
|
|
S.p.a)<br>
|
|
Date: 26/11/2003<br>
|
|
</font></li>
|
|
</ul>
|
|
|
|
<ul>
|
|
<li><a href="#target2"><font size="4">FIPARequestResponderAgent</font></a><font
|
|
size="4"><br>
|
|
<br>
|
|
</font><font size="3">Author: Giovanni Caire (TILab
|
|
S.p.a)<br>
|
|
Date: 26/11/2003<br>
|
|
</font></li>
|
|
</ul>
|
|
|
|
<ul>
|
|
<li><a href="#target3"><font size="4">ContractNetInitiatorAgent</font></a><font
|
|
size="4"><br>
|
|
<br>
|
|
</font><font size="3">Author: Giovanni Caire (TILab
|
|
S.p.a)<br>
|
|
Date: 26/11/2003<br>
|
|
</font></li>
|
|
</ul>
|
|
|
|
<ul>
|
|
<li><a href="#target4"><font size="4">ContractNetResponderAgent</font></a><font
|
|
size="4"><br>
|
|
<br>
|
|
</font><font size="3">Author: Giovanni Caire (TILab
|
|
S.p.a)<br>
|
|
Date: 26/11/2003<br>
|
|
</font></li>
|
|
</ul>
|
|
|
|
<ul>
|
|
<li><a href="#target5"><font size="4">BrokerAgent</font></a><font
|
|
size="4"><br>
|
|
<br>
|
|
</font><font size="3">Author: Giovanni Caire (TILab
|
|
S.p.a)<br>
|
|
Date: 26/11/2003<br>
|
|
</font></li>
|
|
</ul>
|
|
|
|
<p> </p>
|
|
|
|
<table border="1" cellpadding="3" cellspacing="0" width="100%">
|
|
<tr>
|
|
<td colspan="2" bgcolor="#CCCCFF"><a name="target1"><font
|
|
size="5"><b>FIPARequestInitiatorAgent</b></font></a></td>
|
|
</tr>
|
|
<tr>
|
|
<td bgcolor="#FFFFFF"><strong>Description:</strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td><font face="Arial,Helvetica">
|
|
This example shows how to implement the initiator role in
|
|
a FIPA-request interaction protocol. In this case in particular
|
|
we use an <code>AchieveREInitiator</code> ("Achieve Rational effect")
|
|
to request a dummy action to a number of agents (whose local
|
|
names must be specified as arguments).
|
|
<br><br>
|
|
This example should be used together with the <a href="#target2"><font size="4">FIPARequestResponderAgent</font></a>
|
|
as described below.<br>
|
|
Start the JADE runtime (with the management GUI) and launch some
|
|
FIPARequestResponderAgent on it.<br>
|
|
java jade.Boot -gui r1:examples.protocols.FIPARequestResponderAgent r2:examples.protocols.FIPARequestResponderAgent<br>
|
|
Then, from another window (or from the management GUI), launch an
|
|
FIPARequestInitiatorAgent specifying the local names of the responder as arguments.<br>
|
|
java jade.Boot -container i:examples.protocols.FIPARequestInitiatorAgent(r1
|
|
r2)<br>
|
|
</font> </td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Jade classes used: </strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Agent, ACLMessage, AchieveREInitiator</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Source</strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>\src\examples\protocols\FIPARequestInitiatorAgent.java</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p> </p>
|
|
|
|
<table border="1" cellpadding="3" cellspacing="0" width="100%">
|
|
<tr>
|
|
<td colspan="2" bgcolor="#CCCCFF"><a name="target2"><font
|
|
size="5"><b>FIPARequestResponderAgent</b></font></a></td>
|
|
</tr>
|
|
<tr>
|
|
<td bgcolor="#FFFFFF"><strong>Description:</strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td><font face="Arial,Helvetica">
|
|
This example shows how to implement the responder role in
|
|
a FIPA-request interaction protocol. In this case in particular
|
|
we use an <code>AchieveREResponder</code> ("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.
|
|
<br><br>
|
|
This example should be used together with the <a href="#target1"><font size="4">FIPARequestInitiatorAgent</font></a>
|
|
as described <a href="#target1">here.</a>
|
|
</font> </td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Jade classes used: </strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Agent, ACLMessage, MessageTemplate, AchieveREResponder</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Source</strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>\src\examples\protocols\FIPARequestResponderAgent.java</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p> </p>
|
|
|
|
<table border="1" cellpadding="3" cellspacing="0" width="100%">
|
|
<tr>
|
|
<td colspan="2" bgcolor="#CCCCFF"><a name="target3"><font
|
|
size="5"><b>ContractNetInitiatorAgent</b></font></a></td>
|
|
</tr>
|
|
<tr>
|
|
<td bgcolor="#FFFFFF"><strong>Description:</strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td><font face="Arial,Helvetica">
|
|
This example shows how to implement the initiator role in
|
|
a FIPA-contract-net interaction protocol. In this case in particular
|
|
we use a <code>ContractNetInitiator</code>
|
|
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).
|
|
<br><br>
|
|
This example should be used together with the <a href="#target4"><font size="4">ContractNetResponderAgent</font></a>
|
|
as described below.<br>
|
|
Start the JADE runtime (with the management GUI) and launch some
|
|
ContractNetResponderAgent on it.<br>
|
|
java jade.Boot -gui r1:examples.protocols.ContractNetResponderAgent r2:examples.protocols.ContractNetResponderAgent<br>
|
|
Then, from another window (or from the management GUI), launch an
|
|
ContractNetInitiatorAgent specifying the local names of the responder as arguments.<br>
|
|
java jade.Boot -container i:examples.protocols.ContractNetInitiatorAgent(r1
|
|
r2)<br>
|
|
</font> </td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Jade classes used: </strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Agent, ACLMessage, ContractNetInitiator</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Source</strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>\src\examples\protocols\ContractNetInitiatorAgent.java</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p> </p>
|
|
|
|
<table border="1" cellpadding="3" cellspacing="0" width="100%">
|
|
<tr>
|
|
<td colspan="2" bgcolor="#CCCCFF"><a name="target4"><font
|
|
size="5"><b>ContractNetResponderAgent</b></font></a></td>
|
|
</tr>
|
|
<tr>
|
|
<td bgcolor="#FFFFFF"><strong>Description:</strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td><font face="Arial,Helvetica">
|
|
This example shows how to implement the responder role in
|
|
a FIPA-contract-net interaction protocol. In this case in particular
|
|
we use a <code>ContractNetResponder</code>
|
|
to participate into a negotiation where an initiator needs to assign
|
|
a task to an agent among a set of candidates.
|
|
<br><br>
|
|
This example should be used together with the <a href="#target3"><font size="4">ContractNetInitiatorAgent</font></a>
|
|
as described <a href="#target3">here.</a>
|
|
</font> </td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Jade classes used: </strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Agent, ACLMessage, MessageTemplate, ContractNetResponder</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Source</strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>\src\examples\protocols\ContractNetResponderAgent.java</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p> </p>
|
|
|
|
<table border="1" cellpadding="3" cellspacing="0" width="100%">
|
|
<tr>
|
|
<td colspan="2" bgcolor="#CCCCFF"><a name="target5"><font
|
|
size="5"><b>BrokerAgent</b></font></a></td>
|
|
</tr>
|
|
<tr>
|
|
<td bgcolor="#FFFFFF"><strong>Description:</strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td><font face="Arial,Helvetica">
|
|
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 <code>AchieveREResponder</code> ("Achieve Rational effect")
|
|
and we register an <code>AchieveREInitiator</code> in the state where the
|
|
requested action has to be performed.
|
|
<br><br>
|
|
This example should be used together with the <a href="#target1"><font size="4">FIPARequestInitiatorAgent</font></a>
|
|
and the <a href="#target4"><font size="4">FIPARequestResponderAgent</font></a>
|
|
as described below.<br>
|
|
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.<br>
|
|
java jade.Boot -gui r:examples.protocols.FIPARequestResponderAgent b:examples.protocols.BrokerAgent(r)<br>
|
|
Then, from another window (or from the management GUI), launch a
|
|
FIPARequestInitiatorAgent specifying the local name of the broker as argument.<br>
|
|
java jade.Boot -container i:examples.protocols.FIPARequestInitiatorAgent(b)<br>
|
|
</font> </td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Jade classes used: </strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Agent, ACLMessage, MessageTemplate, AchieveREResponder, AchieveContractNetInitiator</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Source</strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>\src\examples\protocols\BrokerAgent.java</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p> </p>
|
|
|
|
<p> </p>
|
|
|
|
<hr>
|
|
|
|
<p align="left"><a href="http://jade.cselt.it/"><font face="Arial" size="2">JADE</font></a><font face="Arial" size="2">
|
|
is a trademark of <a href="http://www.telecomitalialab.com">TILAB</a> (formerly </font><a href="http://www.cselt.it"><font face="Arial" size="2">CSELT</font></a><font face="Arial" size="2">). </font><a href="http://jade.cselt.it/"><font face="Arial" size="2"><br>
|
|
JADE</font></a><font face="Arial" size="2"> has been developed jointly by <a href="http://www.telecomitalialab.com">TILAB</a>
|
|
(formerly </font><a href="http://www.cselt.it"><font face="Arial" size="2">CSELT</font></a><font face="Arial" size="2">)
|
|
and the </font><a href="http://www.ce.unipr.it"><font face="Arial" size="2">Computer
|
|
Engineering Group</font></a><font face="Arial" size="2"> of the </font><a href="http://www.unipr.it"><font face="Arial" size="2">University
|
|
of Parma</font></a> </p>
|
|
|
|
</body>
|
|
</html>
|