Skip to content

Commit 1991647

Browse files
committed
setting pages
1 parent 4572642 commit 1991647

File tree

377 files changed

+15529
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

377 files changed

+15529
-1
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
bin
22
build
3-
release
43
*~
54
.externalToolBuilders
65
simu_template

lib/madkit-5.2.jar

-396 KB
Binary file not shown.

release/MaDKit-tutorials-project.zip

473 KB
Binary file not shown.

release/html/MaDKit.png

13.6 KB
Loading
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2+
<HTML>
3+
<HEAD>
4+
<META NAME="GENERATOR" CONTENT="Java2HTML Version 1.5">
5+
<TITLE>All Classes (Java2HTML)</TITLE>
6+
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
7+
</HEAD>
8+
<BODY BGCOLOR="white">
9+
<FONT ID="FrameHeadingFont" size="+1">
10+
All Classes</FONT>
11+
<BR>
12+
<FONT ID="FrameItemFont"><A HREF="communication/ex04/Agent1.java.html" TARGET="SourceFrame">Agent1</A></FONT><BR>
13+
<FONT ID="FrameItemFont"><A HREF="communication/ex04/Agent2.java.html" TARGET="SourceFrame">Agent2</A></FONT><BR>
14+
<FONT ID="FrameItemFont"><A HREF="communication/ex04/Agent3.java.html" TARGET="SourceFrame">Agent3</A></FONT><BR>
15+
<FONT ID="FrameItemFont"><A HREF="communication/ex05/Agent4.java.html" TARGET="SourceFrame">Agent4</A></FONT><BR>
16+
<FONT ID="FrameItemFont"><A HREF="communication/ex05/Agent5.java.html" TARGET="SourceFrame">Agent5</A></FONT><BR>
17+
<FONT ID="FrameItemFont"><A HREF="communication/ex06/Agent6.java.html" TARGET="SourceFrame">Agent6</A></FONT><BR>
18+
<FONT ID="FrameItemFont"><A HREF="communication/ex06/Agent7.java.html" TARGET="SourceFrame">Agent7</A></FONT><BR>
19+
<FONT ID="FrameItemFont"><A HREF="communication/ex01/PingAgent.java.html" TARGET="SourceFrame">PingAgent</A></FONT><BR>
20+
<FONT ID="FrameItemFont"><A HREF="communication/ex02_targetingRoles/PingAgent2.java.html" TARGET="SourceFrame">PingAgent2</A></FONT><BR>
21+
<FONT ID="FrameItemFont"><A HREF="communication/ex03_replyingToMessages/ReplierAgent.java.html" TARGET="SourceFrame">ReplierAgent</A></FONT><BR>
22+
<FONT ID="FrameItemFont"><A HREF="communication/ex01/Society.java.html" TARGET="SourceFrame">Society</A></FONT></BODY>
23+
</HTML>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2+
<HTML>
3+
<HEAD>
4+
<META NAME="GENERATOR" CONTENT="Java2HTML Version 1.5">
5+
<TITLE>Package communication.ex01 (Java2HTML)</TITLE>
6+
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
7+
</HEAD>
8+
<BODY>
9+
<FONT size="+1" ID="FrameHeadingFont">Package communication.ex01</FONT>
10+
<BR>
11+
<FONT ID="FrameItemFont"><A HREF="communication/ex01/PingAgent.java.html" TARGET="SourceFrame">PingAgent</A></FONT><BR>
12+
<FONT ID="FrameItemFont"><A HREF="communication/ex01/Society.java.html" TARGET="SourceFrame">Society</A></FONT></BODY>
13+
</HTML>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2+
<HTML>
3+
<HEAD>
4+
<META NAME="GENERATOR" CONTENT="Java2HTML Version 1.5">
5+
<TITLE>Package communication.ex02_targetingRoles (Java2HTML)</TITLE>
6+
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
7+
</HEAD>
8+
<BODY>
9+
<FONT size="+1" ID="FrameHeadingFont">Package communication.ex02_targetingRoles</FONT>
10+
<BR>
11+
<FONT ID="FrameItemFont"><A HREF="communication/ex02_targetingRoles/PingAgent2.java.html" TARGET="SourceFrame">PingAgent2</A></FONT></BODY>
12+
</HTML>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2+
<HTML>
3+
<HEAD>
4+
<META NAME="GENERATOR" CONTENT="Java2HTML Version 1.5">
5+
<TITLE>Package communication.ex03_replyingToMessages (Java2HTML)</TITLE>
6+
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
7+
</HEAD>
8+
<BODY>
9+
<FONT size="+1" ID="FrameHeadingFont">Package communication.ex03_replyingToMessages</FONT>
10+
<BR>
11+
<FONT ID="FrameItemFont"><A HREF="communication/ex03_replyingToMessages/ReplierAgent.java.html" TARGET="SourceFrame">ReplierAgent</A></FONT></BODY>
12+
</HTML>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2+
<HTML>
3+
<HEAD>
4+
<META NAME="GENERATOR" CONTENT="Java2HTML Version 1.5">
5+
<TITLE>Package communication.ex04 (Java2HTML)</TITLE>
6+
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
7+
</HEAD>
8+
<BODY>
9+
<FONT size="+1" ID="FrameHeadingFont">Package communication.ex04</FONT>
10+
<BR>
11+
<FONT ID="FrameItemFont"><A HREF="communication/ex04/Agent1.java.html" TARGET="SourceFrame">Agent1</A></FONT><BR>
12+
<FONT ID="FrameItemFont"><A HREF="communication/ex04/Agent2.java.html" TARGET="SourceFrame">Agent2</A></FONT><BR>
13+
<FONT ID="FrameItemFont"><A HREF="communication/ex04/Agent3.java.html" TARGET="SourceFrame">Agent3</A></FONT></BODY>
14+
</HTML>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2+
<HTML>
3+
<HEAD>
4+
<META NAME="GENERATOR" CONTENT="Java2HTML Version 1.5">
5+
<TITLE>Package communication.ex05 (Java2HTML)</TITLE>
6+
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
7+
</HEAD>
8+
<BODY>
9+
<FONT size="+1" ID="FrameHeadingFont">Package communication.ex05</FONT>
10+
<BR>
11+
<FONT ID="FrameItemFont"><A HREF="communication/ex05/Agent4.java.html" TARGET="SourceFrame">Agent4</A></FONT><BR>
12+
<FONT ID="FrameItemFont"><A HREF="communication/ex05/Agent5.java.html" TARGET="SourceFrame">Agent5</A></FONT></BODY>
13+
</HTML>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2+
<HTML>
3+
<HEAD>
4+
<META NAME="GENERATOR" CONTENT="Java2HTML Version 1.5">
5+
<TITLE>Package communication.ex06 (Java2HTML)</TITLE>
6+
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
7+
</HEAD>
8+
<BODY>
9+
<FONT size="+1" ID="FrameHeadingFont">Package communication.ex06</FONT>
10+
<BR>
11+
<FONT ID="FrameItemFont"><A HREF="communication/ex06/Agent6.java.html" TARGET="SourceFrame">Agent6</A></FONT><BR>
12+
<FONT ID="FrameItemFont"><A HREF="communication/ex06/Agent7.java.html" TARGET="SourceFrame">Agent7</A></FONT></BODY>
13+
</HTML>
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2+
<HTML>
3+
<HEAD>
4+
<LINK REL=STYLESHEET TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
5+
<META NAME="GENERATOR" CONTENT="Java2HTML Version 1.5">
6+
<TITLE>communication.ex01.PingAgent (Java2HTML)</TITLE>
7+
<script src='http://www.madkit.net/js/deployJava.js'></script></HEAD>
8+
<BODY><TABLE id="Header" border="0" cellpadding="0" cellspacing="0" width="100%">
9+
<tr>
10+
<td colspan="2" width="33%">&nbsp;</td>
11+
<td align="center" colspan="2" width="33%">
12+
<font size="4">PingAgent.java</font\> &nbsp;&nbsp;&nbsp;&nbsp; <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>
13+
</td>
14+
<td align="right" colspan="2" width="33%">&nbsp;</td>
15+
</tr>
16+
</TABLE>
17+
<pre ID="Classes">
18+
<A NAME="1"></A><FONT ID="Package">package</FONT> communication.ex01;
19+
<A NAME="2"></A>
20+
<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>;
21+
<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>;
22+
<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>;
23+
<A NAME="6"></A>
24+
<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>;
25+
<A NAME="8"></A>
26+
<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>;
27+
<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>;
28+
<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>;
29+
<A NAME="12"></A>
30+
<A NAME="13"></A><FONT ID="FormalComment">/**
31+
<A NAME="14"></A> * Shows how agents exchange messages.
32+
<A NAME="15"></A> *
33+
<A NAME="16"></A> *
34+
<A NAME="17"></A> *
35+
<A NAME="18"></A> * <script>deployJava.createWebStartLaunchButton('http://www.madkit.net/madkit/tutorials/jnlp/communication.ex01.PingAgent', '1.8.0');</script>
36+
<A NAME="19"></A> *
37+
<A NAME="20"></A> *
38+
<A NAME="21"></A> *
39+
<A NAME="22"></A> *
40+
<A NAME="23"></A> * To exchange messages, agents have to exist in an artificial society. That is, agents have to create communities
41+
<A NAME="24"></A> * containing groups and take roles within to interact with others. Doing so, agents get agent addresses which could be
42+
<A NAME="25"></A> * used to send them messages. Here, two agents take a role and ping the other one.
43+
<A NAME="26"></A> */</FONT>
44+
<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> {
45+
<A NAME="28"></A>
46+
<A NAME="29"></A> <FONT ID="FormalComment">/**
47+
<A NAME="30"></A> * Firstly, take a position in the artificial society
48+
<A NAME="31"></A> */</FONT>
49+
<A NAME="32"></A> @<A HREF="http://docs.oracle.com/javase/8/docs/api//java/lang/Override.html">Override</A>
50+
<A NAME="33"></A> <FONT ID="Protected">protected</FONT> <FONT ID="Void">void</FONT> activate() {
51+
<A NAME="34"></A>
52+
<A NAME="35"></A> getLogger().setLevel(Level.FINEST);
53+
<A NAME="36"></A>
54+
<A NAME="37"></A> createGroup(COMMUNITY, GROUP);
55+
<A NAME="38"></A> requestRole(COMMUNITY, GROUP, ROLE);
56+
<A NAME="39"></A>
57+
<A NAME="40"></A> pause(<FONT ID="IntegerLiteral">500</FONT>);
58+
<A NAME="41"></A> }
59+
<A NAME="42"></A>
60+
<A NAME="43"></A> <FONT ID="FormalComment">/**
61+
<A NAME="44"></A> * Now ping the other agent with a message
62+
<A NAME="45"></A> */</FONT>
63+
<A NAME="46"></A> @<A HREF="http://docs.oracle.com/javase/8/docs/api//java/lang/Override.html">Override</A>
64+
<A NAME="47"></A> <FONT ID="Protected">protected</FONT> <FONT ID="Void">void</FONT> live() {
65+
<A NAME="48"></A>
66+
<A NAME="49"></A> <FONT ID="SingleLineComment">// method seen in organization's tutorial
67+
<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>;
68+
<A NAME="51"></A> <FONT ID="While">while</FONT> (other == <FONT ID="Null">null</FONT>) {
69+
<A NAME="52"></A> other = getAgentWithRole(COMMUNITY, GROUP, ROLE);
70+
<A NAME="53"></A> pause(<FONT ID="IntegerLiteral">1000</FONT>);
71+
<A NAME="54"></A> }
72+
<A NAME="55"></A>
73+
<A NAME="56"></A> getLogger().info(<FONT ID="StringLiteral">"\n\tI found someone !!\n"</FONT> + other + <FONT ID="StringLiteral">"\n\n"</FONT>);
74+
<A NAME="57"></A> pause(<FONT ID="IntegerLiteral">2000</FONT>);
75+
<A NAME="58"></A>
76+
<A NAME="59"></A> <FONT ID="SingleLineComment">// sending the message to other: Success will be logged
77+
<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>());
78+
<A NAME="61"></A> pause(<FONT ID="IntegerLiteral">2000</FONT>);
79+
<A NAME="62"></A>
80+
<A NAME="63"></A> <FONT ID="SingleLineComment">// waiting other's message: The reception will be logged
81+
<A NAME="64"></A></FONT> waitNextMessage();
82+
<A NAME="65"></A> pause(<FONT ID="IntegerLiteral">20000</FONT>);
83+
<A NAME="66"></A> }
84+
<A NAME="67"></A>
85+
<A NAME="68"></A> <FONT ID="FormalComment">/**
86+
<A NAME="69"></A> * @param args
87+
<A NAME="70"></A> */</FONT>
88+
<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) {
89+
<A NAME="72"></A> executeThisAgent(<FONT ID="IntegerLiteral">2</FONT>, <FONT ID="True">true</FONT>);
90+
<A NAME="73"></A> <FONT ID="SingleLineComment">// or
91+
<A NAME="74"></A></FONT> <FONT ID="SingleLineComment">// String[] args = { "--launchAgents", PingAgent.class.getName() + ",true,2" };
92+
<A NAME="75"></A></FONT> <FONT ID="SingleLineComment">// Madkit.main(args);
93+
<A NAME="76"></A></FONT> }
94+
<A NAME="77"></A>
95+
<A NAME="78"></A>}
96+
<A NAME="79"></A></pre><TABLE id="Header" border="0" cellpadding="0" cellspacing="0" width="100%">
97+
<tr>
98+
<td colspan="2" width="33%">&nbsp;</td>
99+
<td align="center" colspan="2" width="33%">
100+
<font size="4">PingAgent.java</font\> &nbsp;&nbsp;&nbsp;&nbsp; <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>
101+
</td>
102+
<td align="right" colspan="2" width="33%">&nbsp;</td>
103+
</tr>
104+
</TABLE>
105+
106+
</BODY>
107+
</HTML>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2+
<HTML>
3+
<HEAD>
4+
<LINK REL=STYLESHEET TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
5+
<META NAME="GENERATOR" CONTENT="Java2HTML Version 1.5">
6+
<TITLE>communication.ex01.Society (Java2HTML)</TITLE>
7+
<script src='http://www.madkit.net/js/deployJava.js'></script></HEAD>
8+
<BODY><TABLE id="Header" border="0" cellpadding="0" cellspacing="0" width="100%">
9+
<tr>
10+
<td colspan="2" width="33%">&nbsp;</td>
11+
<td align="center" colspan="2" width="33%">
12+
<font size="4">Society.java</font\> &nbsp;&nbsp;&nbsp;&nbsp; <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>
13+
</td>
14+
<td align="right" colspan="2" width="33%">&nbsp;</td>
15+
</tr>
16+
</TABLE>
17+
<pre ID="Classes">
18+
<A NAME="1"></A><FONT ID="Package">package</FONT> communication.ex01;
19+
<A NAME="2"></A>
20+
<A NAME="3"></A><FONT ID="Public">public</FONT> <FONT ID="Class">class</FONT> Society {
21+
<A NAME="4"></A>
22+
<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>;
23+
<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>;
24+
<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>;
25+
<A NAME="8"></A>
26+
<A NAME="9"></A>}
27+
<A NAME="10"></A></pre><TABLE id="Header" border="0" cellpadding="0" cellspacing="0" width="100%">
28+
<tr>
29+
<td colspan="2" width="33%">&nbsp;</td>
30+
<td align="center" colspan="2" width="33%">
31+
<font size="4">Society.java</font\> &nbsp;&nbsp;&nbsp;&nbsp; <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>
32+
</td>
33+
<td align="right" colspan="2" width="33%">&nbsp;</td>
34+
</tr>
35+
</TABLE>
36+
37+
</BODY>
38+
</HTML>

0 commit comments

Comments
 (0)