-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
377 changed files
with
15,529 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
bin | ||
build | ||
release | ||
*~ | ||
.externalToolBuilders | ||
simu_template | ||
|
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> | ||
<HTML> | ||
<HEAD> | ||
<META NAME="GENERATOR" CONTENT="Java2HTML Version 1.5"> | ||
<TITLE>All Classes (Java2HTML)</TITLE> | ||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> | ||
</HEAD> | ||
<BODY BGCOLOR="white"> | ||
<FONT ID="FrameHeadingFont" size="+1"> | ||
All Classes</FONT> | ||
<BR> | ||
<FONT ID="FrameItemFont"><A HREF="communication/ex04/Agent1.java.html" TARGET="SourceFrame">Agent1</A></FONT><BR> | ||
<FONT ID="FrameItemFont"><A HREF="communication/ex04/Agent2.java.html" TARGET="SourceFrame">Agent2</A></FONT><BR> | ||
<FONT ID="FrameItemFont"><A HREF="communication/ex04/Agent3.java.html" TARGET="SourceFrame">Agent3</A></FONT><BR> | ||
<FONT ID="FrameItemFont"><A HREF="communication/ex05/Agent4.java.html" TARGET="SourceFrame">Agent4</A></FONT><BR> | ||
<FONT ID="FrameItemFont"><A HREF="communication/ex05/Agent5.java.html" TARGET="SourceFrame">Agent5</A></FONT><BR> | ||
<FONT ID="FrameItemFont"><A HREF="communication/ex06/Agent6.java.html" TARGET="SourceFrame">Agent6</A></FONT><BR> | ||
<FONT ID="FrameItemFont"><A HREF="communication/ex06/Agent7.java.html" TARGET="SourceFrame">Agent7</A></FONT><BR> | ||
<FONT ID="FrameItemFont"><A HREF="communication/ex01/PingAgent.java.html" TARGET="SourceFrame">PingAgent</A></FONT><BR> | ||
<FONT ID="FrameItemFont"><A HREF="communication/ex02_targetingRoles/PingAgent2.java.html" TARGET="SourceFrame">PingAgent2</A></FONT><BR> | ||
<FONT ID="FrameItemFont"><A HREF="communication/ex03_replyingToMessages/ReplierAgent.java.html" TARGET="SourceFrame">ReplierAgent</A></FONT><BR> | ||
<FONT ID="FrameItemFont"><A HREF="communication/ex01/Society.java.html" TARGET="SourceFrame">Society</A></FONT></BODY> | ||
</HTML> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> | ||
<HTML> | ||
<HEAD> | ||
<META NAME="GENERATOR" CONTENT="Java2HTML Version 1.5"> | ||
<TITLE>Package communication.ex01 (Java2HTML)</TITLE> | ||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> | ||
</HEAD> | ||
<BODY> | ||
<FONT size="+1" ID="FrameHeadingFont">Package communication.ex01</FONT> | ||
<BR> | ||
<FONT ID="FrameItemFont"><A HREF="communication/ex01/PingAgent.java.html" TARGET="SourceFrame">PingAgent</A></FONT><BR> | ||
<FONT ID="FrameItemFont"><A HREF="communication/ex01/Society.java.html" TARGET="SourceFrame">Society</A></FONT></BODY> | ||
</HTML> |
12 changes: 12 additions & 0 deletions
12
release/html/communication/communication.ex02_targetingRoles.index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> | ||
<HTML> | ||
<HEAD> | ||
<META NAME="GENERATOR" CONTENT="Java2HTML Version 1.5"> | ||
<TITLE>Package communication.ex02_targetingRoles (Java2HTML)</TITLE> | ||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> | ||
</HEAD> | ||
<BODY> | ||
<FONT size="+1" ID="FrameHeadingFont">Package communication.ex02_targetingRoles</FONT> | ||
<BR> | ||
<FONT ID="FrameItemFont"><A HREF="communication/ex02_targetingRoles/PingAgent2.java.html" TARGET="SourceFrame">PingAgent2</A></FONT></BODY> | ||
</HTML> |
12 changes: 12 additions & 0 deletions
12
release/html/communication/communication.ex03_replyingToMessages.index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> | ||
<HTML> | ||
<HEAD> | ||
<META NAME="GENERATOR" CONTENT="Java2HTML Version 1.5"> | ||
<TITLE>Package communication.ex03_replyingToMessages (Java2HTML)</TITLE> | ||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> | ||
</HEAD> | ||
<BODY> | ||
<FONT size="+1" ID="FrameHeadingFont">Package communication.ex03_replyingToMessages</FONT> | ||
<BR> | ||
<FONT ID="FrameItemFont"><A HREF="communication/ex03_replyingToMessages/ReplierAgent.java.html" TARGET="SourceFrame">ReplierAgent</A></FONT></BODY> | ||
</HTML> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> | ||
<HTML> | ||
<HEAD> | ||
<META NAME="GENERATOR" CONTENT="Java2HTML Version 1.5"> | ||
<TITLE>Package communication.ex04 (Java2HTML)</TITLE> | ||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> | ||
</HEAD> | ||
<BODY> | ||
<FONT size="+1" ID="FrameHeadingFont">Package communication.ex04</FONT> | ||
<BR> | ||
<FONT ID="FrameItemFont"><A HREF="communication/ex04/Agent1.java.html" TARGET="SourceFrame">Agent1</A></FONT><BR> | ||
<FONT ID="FrameItemFont"><A HREF="communication/ex04/Agent2.java.html" TARGET="SourceFrame">Agent2</A></FONT><BR> | ||
<FONT ID="FrameItemFont"><A HREF="communication/ex04/Agent3.java.html" TARGET="SourceFrame">Agent3</A></FONT></BODY> | ||
</HTML> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> | ||
<HTML> | ||
<HEAD> | ||
<META NAME="GENERATOR" CONTENT="Java2HTML Version 1.5"> | ||
<TITLE>Package communication.ex05 (Java2HTML)</TITLE> | ||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> | ||
</HEAD> | ||
<BODY> | ||
<FONT size="+1" ID="FrameHeadingFont">Package communication.ex05</FONT> | ||
<BR> | ||
<FONT ID="FrameItemFont"><A HREF="communication/ex05/Agent4.java.html" TARGET="SourceFrame">Agent4</A></FONT><BR> | ||
<FONT ID="FrameItemFont"><A HREF="communication/ex05/Agent5.java.html" TARGET="SourceFrame">Agent5</A></FONT></BODY> | ||
</HTML> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> | ||
<HTML> | ||
<HEAD> | ||
<META NAME="GENERATOR" CONTENT="Java2HTML Version 1.5"> | ||
<TITLE>Package communication.ex06 (Java2HTML)</TITLE> | ||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> | ||
</HEAD> | ||
<BODY> | ||
<FONT size="+1" ID="FrameHeadingFont">Package communication.ex06</FONT> | ||
<BR> | ||
<FONT ID="FrameItemFont"><A HREF="communication/ex06/Agent6.java.html" TARGET="SourceFrame">Agent6</A></FONT><BR> | ||
<FONT ID="FrameItemFont"><A HREF="communication/ex06/Agent7.java.html" TARGET="SourceFrame">Agent7</A></FONT></BODY> | ||
</HTML> |
107 changes: 107 additions & 0 deletions
107
release/html/communication/communication/ex01/PingAgent.java.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> | ||
<HTML> | ||
<HEAD> | ||
<LINK REL=STYLESHEET TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"> | ||
<META NAME="GENERATOR" CONTENT="Java2HTML Version 1.5"> | ||
<TITLE>communication.ex01.PingAgent (Java2HTML)</TITLE> | ||
<script src='http://www.madkit.net/js/deployJava.js'></script></HEAD> | ||
<BODY><TABLE id="Header" border="0" cellpadding="0" cellspacing="0" width="100%"> | ||
<tr> | ||
<td colspan="2" width="33%"> </td> | ||
<td align="center" colspan="2" width="33%"> | ||
<font size="4">PingAgent.java</font\> <a href='http://www.madkit.net/ccount212/click.php?id=MaDKit-tutorials'><img alt='download project' style='border: 0px ; width: 17px; height: 17px;' src='http://www.madkit.net/madkit/tutorials/html/download.png'></a> | ||
</td> | ||
<td align="right" colspan="2" width="33%"> </td> | ||
</tr> | ||
</TABLE> | ||
<pre ID="Classes"> | ||
<A NAME="1"></A><FONT ID="Package">package</FONT> communication.ex01; | ||
<A NAME="2"></A> | ||
<A NAME="3"></A><FONT ID="Import">import</FONT> <FONT ID="Static">static</FONT> <A HREF="../../communication/ex01/Society.java.html">communication.ex01.Society.COMMUNITY</A>; | ||
<A NAME="4"></A><FONT ID="Import">import</FONT> <FONT ID="Static">static</FONT> <A HREF="../../communication/ex01/Society.java.html">communication.ex01.Society.GROUP</A>; | ||
<A NAME="5"></A><FONT ID="Import">import</FONT> <FONT ID="Static">static</FONT> <A HREF="../../communication/ex01/Society.java.html">communication.ex01.Society.ROLE</A>; | ||
<A NAME="6"></A> | ||
<A NAME="7"></A><FONT ID="Import">import</FONT> <A HREF="http://docs.oracle.com/javase/8/docs/api//java/util/logging/Level.html">java.util.logging.Level</A>; | ||
<A NAME="8"></A> | ||
<A NAME="9"></A><FONT ID="Import">import</FONT> <A HREF="http://www.madkit.net/madkit/api/madkit/kernel/Agent.html">madkit.kernel.Agent</A>; | ||
<A NAME="10"></A><FONT ID="Import">import</FONT> <A HREF="http://www.madkit.net/madkit/api/madkit/kernel/AgentAddress.html">madkit.kernel.AgentAddress</A>; | ||
<A NAME="11"></A><FONT ID="Import">import</FONT> <A HREF="http://www.madkit.net/madkit/api/madkit/kernel/Message.html">madkit.kernel.Message</A>; | ||
<A NAME="12"></A> | ||
<A NAME="13"></A><FONT ID="FormalComment">/** | ||
<A NAME="14"></A> * Shows how agents exchange messages. | ||
<A NAME="15"></A> * | ||
<A NAME="16"></A> * | ||
<A NAME="17"></A> * | ||
<A NAME="18"></A> * <script>deployJava.createWebStartLaunchButton('http://www.madkit.net/madkit/tutorials/jnlp/communication.ex01.PingAgent', '1.8.0');</script> | ||
<A NAME="19"></A> * | ||
<A NAME="20"></A> * | ||
<A NAME="21"></A> * | ||
<A NAME="22"></A> * | ||
<A NAME="23"></A> * To exchange messages, agents have to exist in an artificial society. That is, agents have to create communities | ||
<A NAME="24"></A> * containing groups and take roles within to interact with others. Doing so, agents get agent addresses which could be | ||
<A NAME="25"></A> * used to send them messages. Here, two agents take a role and ping the other one. | ||
<A NAME="26"></A> */</FONT> | ||
<A NAME="27"></A><FONT ID="Public">public</FONT> <FONT ID="Class">class</FONT> PingAgent <FONT ID="Extends">extends</FONT> <A HREF="http://www.madkit.net/madkit/api/madkit/kernel/Agent.html">Agent</A> { | ||
<A NAME="28"></A> | ||
<A NAME="29"></A> <FONT ID="FormalComment">/** | ||
<A NAME="30"></A> * Firstly, take a position in the artificial society | ||
<A NAME="31"></A> */</FONT> | ||
<A NAME="32"></A> @<A HREF="http://docs.oracle.com/javase/8/docs/api//java/lang/Override.html">Override</A> | ||
<A NAME="33"></A> <FONT ID="Protected">protected</FONT> <FONT ID="Void">void</FONT> activate() { | ||
<A NAME="34"></A> | ||
<A NAME="35"></A> getLogger().setLevel(Level.FINEST); | ||
<A NAME="36"></A> | ||
<A NAME="37"></A> createGroup(COMMUNITY, GROUP); | ||
<A NAME="38"></A> requestRole(COMMUNITY, GROUP, ROLE); | ||
<A NAME="39"></A> | ||
<A NAME="40"></A> pause(<FONT ID="IntegerLiteral">500</FONT>); | ||
<A NAME="41"></A> } | ||
<A NAME="42"></A> | ||
<A NAME="43"></A> <FONT ID="FormalComment">/** | ||
<A NAME="44"></A> * Now ping the other agent with a message | ||
<A NAME="45"></A> */</FONT> | ||
<A NAME="46"></A> @<A HREF="http://docs.oracle.com/javase/8/docs/api//java/lang/Override.html">Override</A> | ||
<A NAME="47"></A> <FONT ID="Protected">protected</FONT> <FONT ID="Void">void</FONT> live() { | ||
<A NAME="48"></A> | ||
<A NAME="49"></A> <FONT ID="SingleLineComment">// method seen in organization's tutorial | ||
<A NAME="50"></A></FONT> <A HREF="http://www.madkit.net/madkit/api/madkit/kernel/AgentAddress.html">AgentAddress</A> other = <FONT ID="Null">null</FONT>; | ||
<A NAME="51"></A> <FONT ID="While">while</FONT> (other == <FONT ID="Null">null</FONT>) { | ||
<A NAME="52"></A> other = getAgentWithRole(COMMUNITY, GROUP, ROLE); | ||
<A NAME="53"></A> pause(<FONT ID="IntegerLiteral">1000</FONT>); | ||
<A NAME="54"></A> } | ||
<A NAME="55"></A> | ||
<A NAME="56"></A> getLogger().info(<FONT ID="StringLiteral">"\n\tI found someone !!\n"</FONT> + other + <FONT ID="StringLiteral">"\n\n"</FONT>); | ||
<A NAME="57"></A> pause(<FONT ID="IntegerLiteral">2000</FONT>); | ||
<A NAME="58"></A> | ||
<A NAME="59"></A> <FONT ID="SingleLineComment">// sending the message to other: Success will be logged | ||
<A NAME="60"></A></FONT> sendMessage(other, <FONT ID="New">new</FONT> <A HREF="http://www.madkit.net/madkit/api/madkit/kernel/Message.html">Message</A>()); | ||
<A NAME="61"></A> pause(<FONT ID="IntegerLiteral">2000</FONT>); | ||
<A NAME="62"></A> | ||
<A NAME="63"></A> <FONT ID="SingleLineComment">// waiting other's message: The reception will be logged | ||
<A NAME="64"></A></FONT> waitNextMessage(); | ||
<A NAME="65"></A> pause(<FONT ID="IntegerLiteral">20000</FONT>); | ||
<A NAME="66"></A> } | ||
<A NAME="67"></A> | ||
<A NAME="68"></A> <FONT ID="FormalComment">/** | ||
<A NAME="69"></A> * @param args | ||
<A NAME="70"></A> */</FONT> | ||
<A NAME="71"></A> <FONT ID="Public">public</FONT> <FONT ID="Static">static</FONT> <FONT ID="Void">void</FONT> main(<A HREF="http://docs.oracle.com/javase/8/docs/api//java/lang/String.html">String</A>[] argss) { | ||
<A NAME="72"></A> executeThisAgent(<FONT ID="IntegerLiteral">2</FONT>, <FONT ID="True">true</FONT>); | ||
<A NAME="73"></A> <FONT ID="SingleLineComment">// or | ||
<A NAME="74"></A></FONT> <FONT ID="SingleLineComment">// String[] args = { "--launchAgents", PingAgent.class.getName() + ",true,2" }; | ||
<A NAME="75"></A></FONT> <FONT ID="SingleLineComment">// Madkit.main(args); | ||
<A NAME="76"></A></FONT> } | ||
<A NAME="77"></A> | ||
<A NAME="78"></A>} | ||
<A NAME="79"></A></pre><TABLE id="Header" border="0" cellpadding="0" cellspacing="0" width="100%"> | ||
<tr> | ||
<td colspan="2" width="33%"> </td> | ||
<td align="center" colspan="2" width="33%"> | ||
<font size="4">PingAgent.java</font\> <a href='http://www.madkit.net/ccount212/click.php?id=MaDKit-tutorials'><img alt='download project' style='border: 0px ; width: 17px; height: 17px;' src='http://www.madkit.net/madkit/tutorials/html/download.png'></a> | ||
</td> | ||
<td align="right" colspan="2" width="33%"> </td> | ||
</tr> | ||
</TABLE> | ||
|
||
</BODY> | ||
</HTML> |
38 changes: 38 additions & 0 deletions
38
release/html/communication/communication/ex01/Society.java.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> | ||
<HTML> | ||
<HEAD> | ||
<LINK REL=STYLESHEET TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"> | ||
<META NAME="GENERATOR" CONTENT="Java2HTML Version 1.5"> | ||
<TITLE>communication.ex01.Society (Java2HTML)</TITLE> | ||
<script src='http://www.madkit.net/js/deployJava.js'></script></HEAD> | ||
<BODY><TABLE id="Header" border="0" cellpadding="0" cellspacing="0" width="100%"> | ||
<tr> | ||
<td colspan="2" width="33%"> </td> | ||
<td align="center" colspan="2" width="33%"> | ||
<font size="4">Society.java</font\> <a href='http://www.madkit.net/ccount212/click.php?id=MaDKit-tutorials'><img alt='download project' style='border: 0px ; width: 17px; height: 17px;' src='http://www.madkit.net/madkit/tutorials/html/download.png'></a> | ||
</td> | ||
<td align="right" colspan="2" width="33%"> </td> | ||
</tr> | ||
</TABLE> | ||
<pre ID="Classes"> | ||
<A NAME="1"></A><FONT ID="Package">package</FONT> communication.ex01; | ||
<A NAME="2"></A> | ||
<A NAME="3"></A><FONT ID="Public">public</FONT> <FONT ID="Class">class</FONT> Society { | ||
<A NAME="4"></A> | ||
<A NAME="5"></A> <FONT ID="Public">public</FONT> <FONT ID="Static">static</FONT> <FONT ID="Final">final</FONT> <A HREF="http://docs.oracle.com/javase/8/docs/api//java/lang/String.html">String</A> COMMUNITY = <FONT ID="StringLiteral">"communication"</FONT>; | ||
<A NAME="6"></A> <FONT ID="Public">public</FONT> <FONT ID="Static">static</FONT> <FONT ID="Final">final</FONT> <A HREF="http://docs.oracle.com/javase/8/docs/api//java/lang/String.html">String</A> GROUP = <FONT ID="StringLiteral">"ex01"</FONT>; | ||
<A NAME="7"></A> <FONT ID="Public">public</FONT> <FONT ID="Static">static</FONT> <FONT ID="Final">final</FONT> <A HREF="http://docs.oracle.com/javase/8/docs/api//java/lang/String.html">String</A> ROLE = <FONT ID="StringLiteral">"ping agent"</FONT>; | ||
<A NAME="8"></A> | ||
<A NAME="9"></A>} | ||
<A NAME="10"></A></pre><TABLE id="Header" border="0" cellpadding="0" cellspacing="0" width="100%"> | ||
<tr> | ||
<td colspan="2" width="33%"> </td> | ||
<td align="center" colspan="2" width="33%"> | ||
<font size="4">Society.java</font\> <a href='http://www.madkit.net/ccount212/click.php?id=MaDKit-tutorials'><img alt='download project' style='border: 0px ; width: 17px; height: 17px;' src='http://www.madkit.net/madkit/tutorials/html/download.png'></a> | ||
</td> | ||
<td align="right" colspan="2" width="33%"> </td> | ||
</tr> | ||
</TABLE> | ||
|
||
</BODY> | ||
</HTML> |
Oops, something went wrong.