1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
---|
2 | <!-- NewPage -->
|
---|
3 | <html lang="en">
|
---|
4 | <head>
|
---|
5 | <!-- Generated by javadoc (1.8.0_112) on Thu Jun 21 12:05:57 CEST 2018 -->
|
---|
6 | <title>MultilateralProtocol (Genius Core Documentation)</title>
|
---|
7 | <meta name="date" content="2018-06-21">
|
---|
8 | <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
---|
9 | <script type="text/javascript" src="../../../script.js"></script>
|
---|
10 | </head>
|
---|
11 | <body>
|
---|
12 | <script type="text/javascript"><!--
|
---|
13 | try {
|
---|
14 | if (location.href.indexOf('is-external=true') == -1) {
|
---|
15 | parent.document.title="MultilateralProtocol (Genius Core Documentation)";
|
---|
16 | }
|
---|
17 | }
|
---|
18 | catch(err) {
|
---|
19 | }
|
---|
20 | //-->
|
---|
21 | var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6};
|
---|
22 | var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
|
---|
23 | var altColor = "altColor";
|
---|
24 | var rowColor = "rowColor";
|
---|
25 | var tableTab = "tableTab";
|
---|
26 | var activeTableTab = "activeTableTab";
|
---|
27 | </script>
|
---|
28 | <noscript>
|
---|
29 | <div>JavaScript is disabled on your browser.</div>
|
---|
30 | </noscript>
|
---|
31 | <!-- ========= START OF TOP NAVBAR ======= -->
|
---|
32 | <div class="topNav"><a name="navbar.top">
|
---|
33 | <!-- -->
|
---|
34 | </a>
|
---|
35 | <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
---|
36 | <a name="navbar.top.firstrow">
|
---|
37 | <!-- -->
|
---|
38 | </a>
|
---|
39 | <ul class="navList" title="Navigation">
|
---|
40 | <li><a href="../../../overview-summary.html">Overview</a></li>
|
---|
41 | <li><a href="package-summary.html">Package</a></li>
|
---|
42 | <li class="navBarCell1Rev">Class</li>
|
---|
43 | <li><a href="class-use/MultilateralProtocol.html">Use</a></li>
|
---|
44 | <li><a href="package-tree.html">Tree</a></li>
|
---|
45 | <li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
---|
46 | <li><a href="../../../index-all.html">Index</a></li>
|
---|
47 | <li><a href="../../../help-doc.html">Help</a></li>
|
---|
48 | </ul>
|
---|
49 | </div>
|
---|
50 | <div class="subNav">
|
---|
51 | <ul class="navList">
|
---|
52 | <li><a href="../../../genius/core/protocol/MediatorProtocol.html" title="class in genius.core.protocol"><span class="typeNameLink">Prev Class</span></a></li>
|
---|
53 | <li><a href="../../../genius/core/protocol/Protocol.html" title="class in genius.core.protocol"><span class="typeNameLink">Next Class</span></a></li>
|
---|
54 | </ul>
|
---|
55 | <ul class="navList">
|
---|
56 | <li><a href="../../../index.html?genius/core/protocol/MultilateralProtocol.html" target="_top">Frames</a></li>
|
---|
57 | <li><a href="MultilateralProtocol.html" target="_top">No Frames</a></li>
|
---|
58 | </ul>
|
---|
59 | <ul class="navList" id="allclasses_navbar_top">
|
---|
60 | <li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
---|
61 | </ul>
|
---|
62 | <div>
|
---|
63 | <script type="text/javascript"><!--
|
---|
64 | allClassesLink = document.getElementById("allclasses_navbar_top");
|
---|
65 | if(window==top) {
|
---|
66 | allClassesLink.style.display = "block";
|
---|
67 | }
|
---|
68 | else {
|
---|
69 | allClassesLink.style.display = "none";
|
---|
70 | }
|
---|
71 | //-->
|
---|
72 | </script>
|
---|
73 | </div>
|
---|
74 | <div>
|
---|
75 | <ul class="subNavList">
|
---|
76 | <li>Summary: </li>
|
---|
77 | <li>Nested | </li>
|
---|
78 | <li>Field | </li>
|
---|
79 | <li>Constr | </li>
|
---|
80 | <li><a href="#method.summary">Method</a></li>
|
---|
81 | </ul>
|
---|
82 | <ul class="subNavList">
|
---|
83 | <li>Detail: </li>
|
---|
84 | <li>Field | </li>
|
---|
85 | <li>Constr | </li>
|
---|
86 | <li><a href="#method.detail">Method</a></li>
|
---|
87 | </ul>
|
---|
88 | </div>
|
---|
89 | <a name="skip.navbar.top">
|
---|
90 | <!-- -->
|
---|
91 | </a></div>
|
---|
92 | <!-- ========= END OF TOP NAVBAR ========= -->
|
---|
93 | <!-- ======== START OF CLASS DATA ======== -->
|
---|
94 | <div class="header">
|
---|
95 | <div class="subTitle">genius.core.protocol</div>
|
---|
96 | <h2 title="Interface MultilateralProtocol" class="title">Interface MultilateralProtocol</h2>
|
---|
97 | </div>
|
---|
98 | <div class="contentContainer">
|
---|
99 | <div class="description">
|
---|
100 | <ul class="blockList">
|
---|
101 | <li class="blockList">
|
---|
102 | <dl>
|
---|
103 | <dt>All Known Implementing Classes:</dt>
|
---|
104 | <dd><a href="../../../genius/core/protocol/AlternatingMajorityConsensusProtocol.html" title="class in genius.core.protocol">AlternatingMajorityConsensusProtocol</a>, <a href="../../../genius/core/protocol/AlternatingMultipleOffersProtocol.html" title="class in genius.core.protocol">AlternatingMultipleOffersProtocol</a>, <a href="../../../genius/core/protocol/DefaultMultilateralProtocol.html" title="class in genius.core.protocol">DefaultMultilateralProtocol</a>, <a href="../../../genius/core/protocol/MediatorFeedbackBasedProtocol.html" title="class in genius.core.protocol">MediatorFeedbackBasedProtocol</a>, <a href="../../../genius/core/protocol/MediatorProtocol.html" title="class in genius.core.protocol">MediatorProtocol</a>, <a href="../../../genius/core/protocol/SimpleMediatorBasedProtocol.html" title="class in genius.core.protocol">SimpleMediatorBasedProtocol</a>, <a href="../../../genius/core/protocol/StackedAlternatingOffersProtocol.html" title="class in genius.core.protocol">StackedAlternatingOffersProtocol</a></dd>
|
---|
105 | </dl>
|
---|
106 | <hr>
|
---|
107 | <br>
|
---|
108 | <pre>public interface <span class="typeNameLabel">MultilateralProtocol</span></pre>
|
---|
109 | <div class="block">The protocol describes if the negotiation is finished, what the agreement is,
|
---|
110 | which actions can be done in the next round.
|
---|
111 | <p>
|
---|
112 | The protocol is executed for example by the
|
---|
113 | <a href="../../../genius/core/session/SessionManager.html" title="class in genius.core.session"><code>SessionManager</code></a>.
|
---|
114 |
|
---|
115 | <h1>Specification</h1> A protocol should be used as follows.
|
---|
116 | <ol>
|
---|
117 | <li>The first time, <a href="../../../genius/core/protocol/MultilateralProtocol.html#beforeSession-genius.core.session.Session-java.util.List-"><code>beforeSession(Session, List)</code></a> should be called
|
---|
118 | and all agents should receive the actions accordingly.
|
---|
119 | <li>For each round in the session:
|
---|
120 | <ol>
|
---|
121 | <li><a href="../../../genius/core/protocol/MultilateralProtocol.html#getRoundStructure-java.util.List-genius.core.session.Session-"><code>getRoundStructure(List, Session)</code></a> should be called to determine
|
---|
122 | the <a href="../../../genius/core/session/Round.html" title="class in genius.core.session"><code>Round</code></a>
|
---|
123 | <li>For each <a href="../../../genius/core/session/Turn.html" title="class in genius.core.session"><code>Turn</code></a> in the <a href="../../../genius/core/session/Round.html" title="class in genius.core.session"><code>Round</code></a> :
|
---|
124 | <ol>
|
---|
125 | <li>the <a href="../../../genius/core/session/Turn.html#getParty--"><code>Turn.getParty()</code></a> agent should be called with the specified
|
---|
126 | allowed actions.
|
---|
127 | <li>The agent returns a picked action
|
---|
128 | <li><a href="../../../genius/core/protocol/MultilateralProtocol.html#getActionListeners-java.util.List-"><code>getActionListeners(List)</code></a> should be called to get a list of which
|
---|
129 | agents need to hear the picked action of this agent.
|
---|
130 | </ol>
|
---|
131 | <li><a href="../../../genius/core/protocol/MultilateralProtocol.html#isFinished-genius.core.session.Session-java.util.List-"><code>isFinished(Session, List)</code></a> should be checked after the round is
|
---|
132 | complete to see if there are other rounds . If so, repeat
|
---|
133 | </ol>
|
---|
134 | <li>When a session is completely done, <a href="../../../genius/core/protocol/MultilateralProtocol.html#afterSession-genius.core.session.Session-java.util.List-"><code>afterSession(Session, List)</code></a>
|
---|
135 | should be called
|
---|
136 | </ol></div>
|
---|
137 | <dl>
|
---|
138 | <dt><span class="simpleTagLabel">Author:</span></dt>
|
---|
139 | <dd>David Festen</dd>
|
---|
140 | </dl>
|
---|
141 | </li>
|
---|
142 | </ul>
|
---|
143 | </div>
|
---|
144 | <div class="summary">
|
---|
145 | <ul class="blockList">
|
---|
146 | <li class="blockList">
|
---|
147 | <!-- ========== METHOD SUMMARY =========== -->
|
---|
148 | <ul class="blockList">
|
---|
149 | <li class="blockList"><a name="method.summary">
|
---|
150 | <!-- -->
|
---|
151 | </a>
|
---|
152 | <h3>Method Summary</h3>
|
---|
153 | <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
---|
154 | <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption>
|
---|
155 | <tr>
|
---|
156 | <th class="colFirst" scope="col">Modifier and Type</th>
|
---|
157 | <th class="colLast" scope="col">Method and Description</th>
|
---|
158 | </tr>
|
---|
159 | <tr id="i0" class="altColor">
|
---|
160 | <td class="colFirst"><code>void</code></td>
|
---|
161 | <td class="colLast"><code><span class="memberNameLink"><a href="../../../genius/core/protocol/MultilateralProtocol.html#afterSession-genius.core.session.Session-java.util.List-">afterSession</a></span>(<a href="../../../genius/core/session/Session.html" title="class in genius.core.session">Session</a> session,
|
---|
162 | java.util.List<<a href="../../../genius/core/parties/NegotiationParty.html" title="interface in genius.core.parties">NegotiationParty</a>> parties)</code>
|
---|
163 | <div class="block">This will get called just after ending the session.</div>
|
---|
164 | </td>
|
---|
165 | </tr>
|
---|
166 | <tr id="i1" class="rowColor">
|
---|
167 | <td class="colFirst"><code>void</code></td>
|
---|
168 | <td class="colLast"><code><span class="memberNameLink"><a href="../../../genius/core/protocol/MultilateralProtocol.html#applyAction-genius.core.actions.Action-genius.core.session.Session-">applyAction</a></span>(<a href="../../../genius/core/actions/Action.html" title="interface in genius.core.actions">Action</a> action,
|
---|
169 | <a href="../../../genius/core/session/Session.html" title="class in genius.core.session">Session</a> session)</code>
|
---|
170 | <div class="block">Apply the action according to the protocol.</div>
|
---|
171 | </td>
|
---|
172 | </tr>
|
---|
173 | <tr id="i2" class="altColor">
|
---|
174 | <td class="colFirst"><code>java.util.Map<<a href="../../../genius/core/parties/NegotiationParty.html" title="interface in genius.core.parties">NegotiationParty</a>,java.util.List<<a href="../../../genius/core/actions/Action.html" title="interface in genius.core.actions">Action</a>>></code></td>
|
---|
175 | <td class="colLast"><code><span class="memberNameLink"><a href="../../../genius/core/protocol/MultilateralProtocol.html#beforeSession-genius.core.session.Session-java.util.List-">beforeSession</a></span>(<a href="../../../genius/core/session/Session.html" title="class in genius.core.session">Session</a> session,
|
---|
176 | java.util.List<<a href="../../../genius/core/parties/NegotiationParty.html" title="interface in genius.core.parties">NegotiationParty</a>> parties)</code>
|
---|
177 | <div class="block">Returns a list of Actions to be sent to
|
---|
178 | <a href="../../../genius/core/parties/NegotiationParty.html#receiveMessage-genius.core.AgentID-genius.core.actions.Action-"><code>NegotiationParty.receiveMessage(AgentID, Action)</code></a> .</div>
|
---|
179 | </td>
|
---|
180 | </tr>
|
---|
181 | <tr id="i3" class="rowColor">
|
---|
182 | <td class="colFirst"><code>void</code></td>
|
---|
183 | <td class="colLast"><code><span class="memberNameLink"><a href="../../../genius/core/protocol/MultilateralProtocol.html#endNegotiation--">endNegotiation</a></span>()</code>
|
---|
184 | <div class="block">Overwrites the rest of the protocol and sets the protocol state to finish</div>
|
---|
185 | </td>
|
---|
186 | </tr>
|
---|
187 | <tr id="i4" class="altColor">
|
---|
188 | <td class="colFirst"><code>void</code></td>
|
---|
189 | <td class="colLast"><code><span class="memberNameLink"><a href="../../../genius/core/protocol/MultilateralProtocol.html#endNegotiation-java.lang.String-">endNegotiation</a></span>(java.lang.String reason)</code>
|
---|
190 | <div class="block">Overwrites the rest of the protocol and sets the protocol state to finish</div>
|
---|
191 | </td>
|
---|
192 | </tr>
|
---|
193 | <tr id="i5" class="rowColor">
|
---|
194 | <td class="colFirst"><code>java.util.Map<<a href="../../../genius/core/parties/NegotiationParty.html" title="interface in genius.core.parties">NegotiationParty</a>,java.util.List<<a href="../../../genius/core/parties/NegotiationParty.html" title="interface in genius.core.parties">NegotiationParty</a>>></code></td>
|
---|
195 | <td class="colLast"><code><span class="memberNameLink"><a href="../../../genius/core/protocol/MultilateralProtocol.html#getActionListeners-java.util.List-">getActionListeners</a></span>(java.util.List<<a href="../../../genius/core/parties/NegotiationParty.html" title="interface in genius.core.parties">NegotiationParty</a>> parties)</code>
|
---|
196 | <div class="block">Get a map of parties that are listening to each other's response.</div>
|
---|
197 | </td>
|
---|
198 | </tr>
|
---|
199 | <tr id="i6" class="altColor">
|
---|
200 | <td class="colFirst"><code><a href="../../../genius/core/Bid.html" title="class in genius.core">Bid</a></code></td>
|
---|
201 | <td class="colLast"><code><span class="memberNameLink"><a href="../../../genius/core/protocol/MultilateralProtocol.html#getCurrentAgreement-genius.core.session.Session-java.util.List-">getCurrentAgreement</a></span>(<a href="../../../genius/core/session/Session.html" title="class in genius.core.session">Session</a> session,
|
---|
202 | java.util.List<<a href="../../../genius/core/parties/NegotiationParty.html" title="interface in genius.core.parties">NegotiationParty</a>> parties)</code>
|
---|
203 | <div class="block">This method should return the current agreement.</div>
|
---|
204 | </td>
|
---|
205 | </tr>
|
---|
206 | <tr id="i7" class="rowColor">
|
---|
207 | <td class="colFirst"><code>int</code></td>
|
---|
208 | <td class="colLast"><code><span class="memberNameLink"><a href="../../../genius/core/protocol/MultilateralProtocol.html#getNumberOfAgreeingParties-genius.core.session.Session-java.util.List-">getNumberOfAgreeingParties</a></span>(<a href="../../../genius/core/session/Session.html" title="class in genius.core.session">Session</a> session,
|
---|
209 | java.util.List<<a href="../../../genius/core/parties/NegotiationParty.html" title="interface in genius.core.parties">NegotiationParty</a>> parties)</code>
|
---|
210 | <div class="block">Gets the number of parties that currently agree to the offer.</div>
|
---|
211 | </td>
|
---|
212 | </tr>
|
---|
213 | <tr id="i8" class="altColor">
|
---|
214 | <td class="colFirst"><code><a href="../../../genius/core/session/Round.html" title="class in genius.core.session">Round</a></code></td>
|
---|
215 | <td class="colLast"><code><span class="memberNameLink"><a href="../../../genius/core/protocol/MultilateralProtocol.html#getRoundStructure-java.util.List-genius.core.session.Session-">getRoundStructure</a></span>(java.util.List<<a href="../../../genius/core/parties/NegotiationParty.html" title="interface in genius.core.parties">NegotiationParty</a>> parties,
|
---|
216 | <a href="../../../genius/core/session/Session.html" title="class in genius.core.session">Session</a> session)</code>
|
---|
217 | <div class="block">Get the structure of the current round.</div>
|
---|
218 | </td>
|
---|
219 | </tr>
|
---|
220 | <tr id="i9" class="rowColor">
|
---|
221 | <td class="colFirst"><code>boolean</code></td>
|
---|
222 | <td class="colLast"><code><span class="memberNameLink"><a href="../../../genius/core/protocol/MultilateralProtocol.html#isFinished-genius.core.session.Session-java.util.List-">isFinished</a></span>(<a href="../../../genius/core/session/Session.html" title="class in genius.core.session">Session</a> session,
|
---|
223 | java.util.List<<a href="../../../genius/core/parties/NegotiationParty.html" title="interface in genius.core.parties">NegotiationParty</a>> parties)</code>
|
---|
224 | <div class="block">Check if the protocol is done or still busy.</div>
|
---|
225 | </td>
|
---|
226 | </tr>
|
---|
227 | </table>
|
---|
228 | </li>
|
---|
229 | </ul>
|
---|
230 | </li>
|
---|
231 | </ul>
|
---|
232 | </div>
|
---|
233 | <div class="details">
|
---|
234 | <ul class="blockList">
|
---|
235 | <li class="blockList">
|
---|
236 | <!-- ============ METHOD DETAIL ========== -->
|
---|
237 | <ul class="blockList">
|
---|
238 | <li class="blockList"><a name="method.detail">
|
---|
239 | <!-- -->
|
---|
240 | </a>
|
---|
241 | <h3>Method Detail</h3>
|
---|
242 | <a name="getRoundStructure-java.util.List-genius.core.session.Session-">
|
---|
243 | <!-- -->
|
---|
244 | </a>
|
---|
245 | <ul class="blockList">
|
---|
246 | <li class="blockList">
|
---|
247 | <h4>getRoundStructure</h4>
|
---|
248 | <pre><a href="../../../genius/core/session/Round.html" title="class in genius.core.session">Round</a> getRoundStructure(java.util.List<<a href="../../../genius/core/parties/NegotiationParty.html" title="interface in genius.core.parties">NegotiationParty</a>> parties,
|
---|
249 | <a href="../../../genius/core/session/Session.html" title="class in genius.core.session">Session</a> session)</pre>
|
---|
250 | <div class="block">Get the structure of the current round. Each round, this method receives
|
---|
251 | a list of all the <a href="../../../genius/core/parties/NegotiationParty.html" title="interface in genius.core.parties"><code>NegotiationParty</code></a> and the
|
---|
252 | complete <a href="../../../genius/core/session/Session.html" title="class in genius.core.session"><code>Session</code></a> which can be used to diversify the round
|
---|
253 | structure at some point during the session.</div>
|
---|
254 | <dl>
|
---|
255 | <dt><span class="paramLabel">Parameters:</span></dt>
|
---|
256 | <dd><code>parties</code> - The parties currently participating</dd>
|
---|
257 | <dd><code>session</code> - The complete session history</dd>
|
---|
258 | <dt><span class="returnLabel">Returns:</span></dt>
|
---|
259 | <dd>A list of possible actions</dd>
|
---|
260 | </dl>
|
---|
261 | </li>
|
---|
262 | </ul>
|
---|
263 | <a name="beforeSession-genius.core.session.Session-java.util.List-">
|
---|
264 | <!-- -->
|
---|
265 | </a>
|
---|
266 | <ul class="blockList">
|
---|
267 | <li class="blockList">
|
---|
268 | <h4>beforeSession</h4>
|
---|
269 | <pre>java.util.Map<<a href="../../../genius/core/parties/NegotiationParty.html" title="interface in genius.core.parties">NegotiationParty</a>,java.util.List<<a href="../../../genius/core/actions/Action.html" title="interface in genius.core.actions">Action</a>>> beforeSession(<a href="../../../genius/core/session/Session.html" title="class in genius.core.session">Session</a> session,
|
---|
270 | java.util.List<<a href="../../../genius/core/parties/NegotiationParty.html" title="interface in genius.core.parties">NegotiationParty</a>> parties)
|
---|
271 | throws <a href="../../../genius/core/exceptions/NegotiationPartyTimeoutException.html" title="class in genius.core.exceptions">NegotiationPartyTimeoutException</a>,
|
---|
272 | java.util.concurrent.ExecutionException,
|
---|
273 | java.lang.InterruptedException</pre>
|
---|
274 | <div class="block">Returns a list of Actions to be sent to
|
---|
275 | <a href="../../../genius/core/parties/NegotiationParty.html#receiveMessage-genius.core.AgentID-genius.core.actions.Action-"><code>NegotiationParty.receiveMessage(AgentID, Action)</code></a> . This will get
|
---|
276 | called just before the session starts. If some initialization with needs
|
---|
277 | to be done by the protocol, it can be done here.</div>
|
---|
278 | <dl>
|
---|
279 | <dt><span class="paramLabel">Parameters:</span></dt>
|
---|
280 | <dd><code>session</code> - The upcoming <a href="../../../genius/core/session/Session.html" title="class in genius.core.session"><code>Session</code></a></dd>
|
---|
281 | <dd><code>parties</code> - The <a href="../../../genius/core/parties/NegotiationParty.html" title="interface in genius.core.parties"><code>NegotiationParty</code></a>s that will participate in the
|
---|
282 | session</dd>
|
---|
283 | <dt><span class="throwsLabel">Throws:</span></dt>
|
---|
284 | <dd><code><a href="../../../genius/core/exceptions/NegotiationPartyTimeoutException.html" title="class in genius.core.exceptions">NegotiationPartyTimeoutException</a></code></dd>
|
---|
285 | <dd><code>java.util.concurrent.ExecutionException</code></dd>
|
---|
286 | <dd><code>java.lang.InterruptedException</code></dd>
|
---|
287 | </dl>
|
---|
288 | </li>
|
---|
289 | </ul>
|
---|
290 | <a name="afterSession-genius.core.session.Session-java.util.List-">
|
---|
291 | <!-- -->
|
---|
292 | </a>
|
---|
293 | <ul class="blockList">
|
---|
294 | <li class="blockList">
|
---|
295 | <h4>afterSession</h4>
|
---|
296 | <pre>void afterSession(<a href="../../../genius/core/session/Session.html" title="class in genius.core.session">Session</a> session,
|
---|
297 | java.util.List<<a href="../../../genius/core/parties/NegotiationParty.html" title="interface in genius.core.parties">NegotiationParty</a>> parties)</pre>
|
---|
298 | <div class="block">This will get called just after ending the session. If the protocol needs
|
---|
299 | to do some post session steps, it can be done here. Protocols should not
|
---|
300 | handle <a href="../../../genius/core/parties/NegotiationParty.html#negotiationEnded-genius.core.Bid-"><code>NegotiationParty.negotiationEnded(Bid)</code></a> as these are always
|
---|
301 | called by the <a href="../../../genius/core/session/SessionManager.html" title="class in genius.core.session"><code>SessionManager</code></a>.</div>
|
---|
302 | <dl>
|
---|
303 | <dt><span class="paramLabel">Parameters:</span></dt>
|
---|
304 | <dd><code>session</code> - The session instance that was used for the session</dd>
|
---|
305 | <dd><code>parties</code> - The parties that participated in the session</dd>
|
---|
306 | </dl>
|
---|
307 | </li>
|
---|
308 | </ul>
|
---|
309 | <a name="applyAction-genius.core.actions.Action-genius.core.session.Session-">
|
---|
310 | <!-- -->
|
---|
311 | </a>
|
---|
312 | <ul class="blockList">
|
---|
313 | <li class="blockList">
|
---|
314 | <h4>applyAction</h4>
|
---|
315 | <pre>void applyAction(<a href="../../../genius/core/actions/Action.html" title="interface in genius.core.actions">Action</a> action,
|
---|
316 | <a href="../../../genius/core/session/Session.html" title="class in genius.core.session">Session</a> session)
|
---|
317 | throws <a href="../../../genius/core/session/ActionException.html" title="class in genius.core.session">ActionException</a></pre>
|
---|
318 | <div class="block">Apply the action according to the protocol. All actions done by all
|
---|
319 | agents come through this method. The protocol should check here if the
|
---|
320 | agent's action is actually allowed and contains the proper data.</div>
|
---|
321 | <dl>
|
---|
322 | <dt><span class="paramLabel">Parameters:</span></dt>
|
---|
323 | <dd><code>action</code> - action to apply. The Agent ID in the action already has been
|
---|
324 | checked when this is called.</dd>
|
---|
325 | <dd><code>session</code> - the current state of this session</dd>
|
---|
326 | <dt><span class="throwsLabel">Throws:</span></dt>
|
---|
327 | <dd><code><a href="../../../genius/core/session/ActionException.html" title="class in genius.core.session">ActionException</a></code> - if the proposed action is illegal according to the protocol.</dd>
|
---|
328 | </dl>
|
---|
329 | </li>
|
---|
330 | </ul>
|
---|
331 | <a name="isFinished-genius.core.session.Session-java.util.List-">
|
---|
332 | <!-- -->
|
---|
333 | </a>
|
---|
334 | <ul class="blockList">
|
---|
335 | <li class="blockList">
|
---|
336 | <h4>isFinished</h4>
|
---|
337 | <pre>boolean isFinished(<a href="../../../genius/core/session/Session.html" title="class in genius.core.session">Session</a> session,
|
---|
338 | java.util.List<<a href="../../../genius/core/parties/NegotiationParty.html" title="interface in genius.core.parties">NegotiationParty</a>> parties)</pre>
|
---|
339 | <div class="block">Check if the protocol is done or still busy. If this method returns true,
|
---|
340 | the <a href="../../../genius/core/session/SessionManager.html" title="class in genius.core.session"><code>SessionManager</code></a> will not start a new
|
---|
341 | <a href="../../../genius/core/session/Round.html" title="class in genius.core.session"><code>Round</code></a> after the current one. It will however finish all the turns
|
---|
342 | described in the
|
---|
343 | <a href="../../../genius/core/protocol/MultilateralProtocol.html#getRoundStructure-java.util.List-genius.core.session.Session-"><code>getRoundStructure(java.util.List, genius.core.session.Session)</code></a>
|
---|
344 | method.</div>
|
---|
345 | <dl>
|
---|
346 | <dt><span class="paramLabel">Parameters:</span></dt>
|
---|
347 | <dd><code>session</code> - the current state of this session</dd>
|
---|
348 | <dd><code>parties</code> - all the parties involved in the negotiation</dd>
|
---|
349 | <dt><span class="returnLabel">Returns:</span></dt>
|
---|
350 | <dd>true if the protocol is finished</dd>
|
---|
351 | </dl>
|
---|
352 | </li>
|
---|
353 | </ul>
|
---|
354 | <a name="getActionListeners-java.util.List-">
|
---|
355 | <!-- -->
|
---|
356 | </a>
|
---|
357 | <ul class="blockList">
|
---|
358 | <li class="blockList">
|
---|
359 | <h4>getActionListeners</h4>
|
---|
360 | <pre>java.util.Map<<a href="../../../genius/core/parties/NegotiationParty.html" title="interface in genius.core.parties">NegotiationParty</a>,java.util.List<<a href="../../../genius/core/parties/NegotiationParty.html" title="interface in genius.core.parties">NegotiationParty</a>>> getActionListeners(java.util.List<<a href="../../../genius/core/parties/NegotiationParty.html" title="interface in genius.core.parties">NegotiationParty</a>> parties)</pre>
|
---|
361 | <div class="block">Get a map of parties that are listening to each other's response. All
|
---|
362 | these listeners should be informed whenever a party takes an action. See
|
---|
363 | also the default implementations
|
---|
364 | <a href="../../../genius/core/protocol/DefaultMultilateralProtocol.html#listenToAll-java.util.List-"><code>DefaultMultilateralProtocol.listenToAll(List)</code></a> and
|
---|
365 | <a href="../../../genius/core/protocol/DefaultMultilateralProtocol.html#listenToNone-java.util.List-"><code>DefaultMultilateralProtocol.listenToNone(List)</code></a></div>
|
---|
366 | <dl>
|
---|
367 | <dt><span class="paramLabel">Parameters:</span></dt>
|
---|
368 | <dd><code>parties</code> - The parties involved in the current negotiation</dd>
|
---|
369 | <dt><span class="returnLabel">Returns:</span></dt>
|
---|
370 | <dd>A map where the key is a <a href="../../../genius/core/parties/NegotiationParty.html" title="interface in genius.core.parties"><code>NegotiationParty</code></a> that is
|
---|
371 | responding to a <a href="../../../genius/core/parties/NegotiationParty.html#chooseAction-java.util.List-"><code>NegotiationParty.chooseAction(List)</code></a>
|
---|
372 | event, and the value is a list of <a href="../../../genius/core/parties/NegotiationParty.html" title="interface in genius.core.parties"><code>NegotiationParty</code></a>s that
|
---|
373 | are listening to that key party's response.</dd>
|
---|
374 | </dl>
|
---|
375 | </li>
|
---|
376 | </ul>
|
---|
377 | <a name="getCurrentAgreement-genius.core.session.Session-java.util.List-">
|
---|
378 | <!-- -->
|
---|
379 | </a>
|
---|
380 | <ul class="blockList">
|
---|
381 | <li class="blockList">
|
---|
382 | <h4>getCurrentAgreement</h4>
|
---|
383 | <pre><a href="../../../genius/core/Bid.html" title="class in genius.core">Bid</a> getCurrentAgreement(<a href="../../../genius/core/session/Session.html" title="class in genius.core.session">Session</a> session,
|
---|
384 | java.util.List<<a href="../../../genius/core/parties/NegotiationParty.html" title="interface in genius.core.parties">NegotiationParty</a>> parties)</pre>
|
---|
385 | <div class="block">This method should return the current agreement.
|
---|
386 | <p/>
|
---|
387 | Some protocols only have an agreement at the negotiation session, make
|
---|
388 | sure that this method returns null until the end of the session in that
|
---|
389 | case, because this method might be queried at intermediary steps.</div>
|
---|
390 | <dl>
|
---|
391 | <dt><span class="paramLabel">Parameters:</span></dt>
|
---|
392 | <dd><code>session</code> - The complete session history up to this point</dd>
|
---|
393 | <dd><code>parties</code> - The parties involved in the current negotiation</dd>
|
---|
394 | <dt><span class="returnLabel">Returns:</span></dt>
|
---|
395 | <dd>The agreed upon bid or null if no agreement</dd>
|
---|
396 | </dl>
|
---|
397 | </li>
|
---|
398 | </ul>
|
---|
399 | <a name="getNumberOfAgreeingParties-genius.core.session.Session-java.util.List-">
|
---|
400 | <!-- -->
|
---|
401 | </a>
|
---|
402 | <ul class="blockList">
|
---|
403 | <li class="blockList">
|
---|
404 | <h4>getNumberOfAgreeingParties</h4>
|
---|
405 | <pre>int getNumberOfAgreeingParties(<a href="../../../genius/core/session/Session.html" title="class in genius.core.session">Session</a> session,
|
---|
406 | java.util.List<<a href="../../../genius/core/parties/NegotiationParty.html" title="interface in genius.core.parties">NegotiationParty</a>> parties)</pre>
|
---|
407 | <div class="block">Gets the number of parties that currently agree to the offer. For
|
---|
408 | protocols that either have an agreement or not, you can set this number
|
---|
409 | to 0 until an agreement is found, and then set this value to the number
|
---|
410 | of parties.</div>
|
---|
411 | <dl>
|
---|
412 | <dt><span class="paramLabel">Parameters:</span></dt>
|
---|
413 | <dd><code>session</code> - the current state of this session</dd>
|
---|
414 | <dd><code>parties</code> - The parties currently participating</dd>
|
---|
415 | <dt><span class="returnLabel">Returns:</span></dt>
|
---|
416 | <dd>the number of parties agreeing to the current agreement</dd>
|
---|
417 | </dl>
|
---|
418 | </li>
|
---|
419 | </ul>
|
---|
420 | <a name="endNegotiation--">
|
---|
421 | <!-- -->
|
---|
422 | </a>
|
---|
423 | <ul class="blockList">
|
---|
424 | <li class="blockList">
|
---|
425 | <h4>endNegotiation</h4>
|
---|
426 | <pre>void endNegotiation()</pre>
|
---|
427 | <div class="block">Overwrites the rest of the protocol and sets the protocol state to finish</div>
|
---|
428 | </li>
|
---|
429 | </ul>
|
---|
430 | <a name="endNegotiation-java.lang.String-">
|
---|
431 | <!-- -->
|
---|
432 | </a>
|
---|
433 | <ul class="blockListLast">
|
---|
434 | <li class="blockList">
|
---|
435 | <h4>endNegotiation</h4>
|
---|
436 | <pre>void endNegotiation(java.lang.String reason)</pre>
|
---|
437 | <div class="block">Overwrites the rest of the protocol and sets the protocol state to finish</div>
|
---|
438 | <dl>
|
---|
439 | <dt><span class="paramLabel">Parameters:</span></dt>
|
---|
440 | <dd><code>reason</code> - Optionally give a reason why the protocol is finished.</dd>
|
---|
441 | </dl>
|
---|
442 | </li>
|
---|
443 | </ul>
|
---|
444 | </li>
|
---|
445 | </ul>
|
---|
446 | </li>
|
---|
447 | </ul>
|
---|
448 | </div>
|
---|
449 | </div>
|
---|
450 | <!-- ========= END OF CLASS DATA ========= -->
|
---|
451 | <!-- ======= START OF BOTTOM NAVBAR ====== -->
|
---|
452 | <div class="bottomNav"><a name="navbar.bottom">
|
---|
453 | <!-- -->
|
---|
454 | </a>
|
---|
455 | <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
---|
456 | <a name="navbar.bottom.firstrow">
|
---|
457 | <!-- -->
|
---|
458 | </a>
|
---|
459 | <ul class="navList" title="Navigation">
|
---|
460 | <li><a href="../../../overview-summary.html">Overview</a></li>
|
---|
461 | <li><a href="package-summary.html">Package</a></li>
|
---|
462 | <li class="navBarCell1Rev">Class</li>
|
---|
463 | <li><a href="class-use/MultilateralProtocol.html">Use</a></li>
|
---|
464 | <li><a href="package-tree.html">Tree</a></li>
|
---|
465 | <li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
---|
466 | <li><a href="../../../index-all.html">Index</a></li>
|
---|
467 | <li><a href="../../../help-doc.html">Help</a></li>
|
---|
468 | </ul>
|
---|
469 | </div>
|
---|
470 | <div class="subNav">
|
---|
471 | <ul class="navList">
|
---|
472 | <li><a href="../../../genius/core/protocol/MediatorProtocol.html" title="class in genius.core.protocol"><span class="typeNameLink">Prev Class</span></a></li>
|
---|
473 | <li><a href="../../../genius/core/protocol/Protocol.html" title="class in genius.core.protocol"><span class="typeNameLink">Next Class</span></a></li>
|
---|
474 | </ul>
|
---|
475 | <ul class="navList">
|
---|
476 | <li><a href="../../../index.html?genius/core/protocol/MultilateralProtocol.html" target="_top">Frames</a></li>
|
---|
477 | <li><a href="MultilateralProtocol.html" target="_top">No Frames</a></li>
|
---|
478 | </ul>
|
---|
479 | <ul class="navList" id="allclasses_navbar_bottom">
|
---|
480 | <li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
---|
481 | </ul>
|
---|
482 | <div>
|
---|
483 | <script type="text/javascript"><!--
|
---|
484 | allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
---|
485 | if(window==top) {
|
---|
486 | allClassesLink.style.display = "block";
|
---|
487 | }
|
---|
488 | else {
|
---|
489 | allClassesLink.style.display = "none";
|
---|
490 | }
|
---|
491 | //-->
|
---|
492 | </script>
|
---|
493 | </div>
|
---|
494 | <div>
|
---|
495 | <ul class="subNavList">
|
---|
496 | <li>Summary: </li>
|
---|
497 | <li>Nested | </li>
|
---|
498 | <li>Field | </li>
|
---|
499 | <li>Constr | </li>
|
---|
500 | <li><a href="#method.summary">Method</a></li>
|
---|
501 | </ul>
|
---|
502 | <ul class="subNavList">
|
---|
503 | <li>Detail: </li>
|
---|
504 | <li>Field | </li>
|
---|
505 | <li>Constr | </li>
|
---|
506 | <li><a href="#method.detail">Method</a></li>
|
---|
507 | </ul>
|
---|
508 | </div>
|
---|
509 | <a name="skip.navbar.bottom">
|
---|
510 | <!-- -->
|
---|
511 | </a></div>
|
---|
512 | <!-- ======== END OF BOTTOM NAVBAR ======= -->
|
---|
513 | </body>
|
---|
514 | </html>
|
---|