source: javadoc/genius/core/Agent.html@ 1

Last change on this file since 1 was 1, checked in by Wouter Pasman, 7 years ago

Initial import : Genius 9.0.0

File size: 41.3 KB
Line 
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:56 CEST 2018 -->
6<title>Agent (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="Agent (Genius Core Documentation)";
16 }
17 }
18 catch(err) {
19 }
20//-->
21var methods = {"i0":6,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":42,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10};
22var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]};
23var altColor = "altColor";
24var rowColor = "rowColor";
25var tableTab = "tableTab";
26var 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/Agent.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>Prev&nbsp;Class</li>
53<li><a href="../../genius/core/AgentAdapter.html" title="class in genius.core"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
54</ul>
55<ul class="navList">
56<li><a href="../../index.html?genius/core/Agent.html" target="_top">Frames</a></li>
57<li><a href="Agent.html" target="_top">No&nbsp;Frames</a></li>
58</ul>
59<ul class="navList" id="allclasses_navbar_top">
60<li><a href="../../allclasses-noframe.html">All&nbsp;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:&nbsp;</li>
77<li>Nested&nbsp;|&nbsp;</li>
78<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
79<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
80<li><a href="#method.summary">Method</a></li>
81</ul>
82<ul class="subNavList">
83<li>Detail:&nbsp;</li>
84<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
85<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</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</div>
96<h2 title="Class Agent" class="title">Class Agent</h2>
97</div>
98<div class="contentContainer">
99<ul class="inheritance">
100<li>java.lang.Object</li>
101<li>
102<ul class="inheritance">
103<li><a href="../../genius/core/AgentAdapter.html" title="class in genius.core">genius.core.AgentAdapter</a></li>
104<li>
105<ul class="inheritance">
106<li>genius.core.Agent</li>
107</ul>
108</li>
109</ul>
110</li>
111</ul>
112<div class="description">
113<ul class="blockList">
114<li class="blockList">
115<dl>
116<dt>All Implemented Interfaces:</dt>
117<dd><a href="../../genius/core/parties/NegotiationParty.html" title="interface in genius.core.parties">NegotiationParty</a>, java.io.Serializable</dd>
118</dl>
119<dl>
120<dt>Direct Known Subclasses:</dt>
121<dd><a href="../../genius/core/boaframework/BOAagent.html" title="class in genius.core.boaframework">BOAagent</a></dd>
122</dl>
123<hr>
124<br>
125<pre>public abstract class <span class="typeNameLabel">Agent</span>
126extends <a href="../../genius/core/AgentAdapter.html" title="class in genius.core">AgentAdapter</a></pre>
127<div class="block">A basic negotiation agent. You might want to consider using the BOA
128 framework.</div>
129<dl>
130<dt><span class="simpleTagLabel">Author:</span></dt>
131<dd>Dmytro Tykhonov, W.Pasman</dd>
132<dt><span class="seeLabel">See Also:</span></dt>
133<dd><a href="../../serialized-form.html#genius.core.Agent">Serialized Form</a></dd>
134</dl>
135</li>
136</ul>
137</div>
138<div class="summary">
139<ul class="blockList">
140<li class="blockList">
141<!-- =========== FIELD SUMMARY =========== -->
142<ul class="blockList">
143<li class="blockList"><a name="field.summary">
144<!-- -->
145</a>
146<h3>Field Summary</h3>
147<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
148<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
149<tr>
150<th class="colFirst" scope="col">Modifier and Type</th>
151<th class="colLast" scope="col">Field and Description</th>
152</tr>
153<tr class="altColor">
154<td class="colFirst"><code><a href="../../genius/core/protocol/BilateralAtomicNegotiationSession.html" title="class in genius.core.protocol">BilateralAtomicNegotiationSession</a></code></td>
155<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#fNegotiation">fNegotiation</a></span></code>
156<div class="block">Reference to protocol which is set when experimental setup is enabled.</div>
157</td>
158</tr>
159<tr class="rowColor">
160<td class="colFirst"><code>protected java.util.HashMap&lt;<a href="../../genius/core/tournament/VariablesAndValues/AgentParameterVariable.html" title="class in genius.core.tournament.VariablesAndValues">AgentParameterVariable</a>,<a href="../../genius/core/tournament/VariablesAndValues/AgentParamValue.html" title="class in genius.core.tournament.VariablesAndValues">AgentParamValue</a>&gt;</code></td>
161<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#parametervalues">parametervalues</a></span></code>
162<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;&nbsp;</div>
163</td>
164</tr>
165<tr class="altColor">
166<td class="colFirst"><code>int</code></td>
167<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#sessionNr">sessionNr</a></span></code>
168<div class="block">A session can be repeated multiple times.</div>
169</td>
170</tr>
171<tr class="rowColor">
172<td class="colFirst"><code>int</code></td>
173<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#sessionsTotal">sessionsTotal</a></span></code>
174<div class="block">Amount of repetitions of this session, how many times this session is
175 repeated in total.</div>
176</td>
177</tr>
178<tr class="altColor">
179<td class="colFirst"><code>java.util.Date</code></td>
180<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#startTime">startTime</a></span></code>
181<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
182<div class="block"><span class="deprecationComment">Use timeline instead.</span></div>
183</div>
184</td>
185</tr>
186<tr class="rowColor">
187<td class="colFirst"><code>protected <a href="../../genius/core/StrategyParameters.html" title="class in genius.core">StrategyParameters</a></code></td>
188<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#strategyParameters">strategyParameters</a></span></code>
189<div class="block">Parameters given to the agent which may be specified in the agent
190 repository.</div>
191</td>
192</tr>
193<tr class="altColor">
194<td class="colFirst"><code><a href="../../genius/core/timeline/TimeLineInfo.html" title="interface in genius.core.timeline">TimeLineInfo</a></code></td>
195<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#timeline">timeline</a></span></code>
196<div class="block">Use timeline for everything time-related.</div>
197</td>
198</tr>
199<tr class="rowColor">
200<td class="colFirst"><code>java.lang.Integer</code></td>
201<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#totalTime">totalTime</a></span></code>
202<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
203<div class="block"><span class="deprecationComment">Use timeline instead.</span></div>
204</div>
205</td>
206</tr>
207<tr class="altColor">
208<td class="colFirst"><code><a href="../../genius/core/utility/AbstractUtilitySpace.html" title="class in genius.core.utility">AbstractUtilitySpace</a></code></td>
209<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#utilitySpace">utilitySpace</a></span></code>
210<div class="block">Preference profile of the agent as assigned by the tournamentrunner.</div>
211</td>
212</tr>
213</table>
214</li>
215</ul>
216<!-- ======== CONSTRUCTOR SUMMARY ======== -->
217<ul class="blockList">
218<li class="blockList"><a name="constructor.summary">
219<!-- -->
220</a>
221<h3>Constructor Summary</h3>
222<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
223<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
224<tr>
225<th class="colOne" scope="col">Constructor and Description</th>
226</tr>
227<tr class="altColor">
228<td class="colOne"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#Agent--">Agent</a></span>()</code>
229<div class="block">Empty constructor used to initialize the agent.</div>
230</td>
231</tr>
232</table>
233</li>
234</ul>
235<!-- ========== METHOD SUMMARY =========== -->
236<ul class="blockList">
237<li class="blockList"><a name="method.summary">
238<!-- -->
239</a>
240<h3>Method Summary</h3>
241<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
242<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
243<tr>
244<th class="colFirst" scope="col">Modifier and Type</th>
245<th class="colLast" scope="col">Method and Description</th>
246</tr>
247<tr id="i0" class="altColor">
248<td class="colFirst"><code>abstract <a href="../../genius/core/actions/Action.html" title="interface in genius.core.actions">Action</a></code></td>
249<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#chooseAction--">chooseAction</a></span>()</code>
250<div class="block">this function is called after ReceiveMessage, with an Offer-action.</div>
251</td>
252</tr>
253<tr id="i1" class="rowColor">
254<td class="colFirst"><code>void</code></td>
255<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#endSession-genius.core.NegotiationResult-">endSession</a></span>(<a href="../../genius/core/NegotiationResult.html" title="class in genius.core">NegotiationResult</a>&nbsp;dUtil)</code>
256<div class="block">Method which informs an agent about the utility it received.</div>
257</td>
258</tr>
259<tr id="i2" class="altColor">
260<td class="colFirst"><code>boolean</code></td>
261<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#equals-java.lang.Object-">equals</a></span>(java.lang.Object&nbsp;obj)</code>&nbsp;</td>
262</tr>
263<tr id="i3" class="rowColor">
264<td class="colFirst"><code><a href="../../genius/core/Agent.html" title="class in genius.core">Agent</a></code></td>
265<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#getAgent--">getAgent</a></span>()</code>&nbsp;</td>
266</tr>
267<tr id="i4" class="altColor">
268<td class="colFirst"><code><a href="../../genius/core/AgentID.html" title="class in genius.core">AgentID</a></code></td>
269<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#getAgentID--">getAgentID</a></span>()</code>&nbsp;</td>
270</tr>
271<tr id="i5" class="rowColor">
272<td class="colFirst"><code>java.lang.String</code></td>
273<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#getName--">getName</a></span>()</code>&nbsp;</td>
274</tr>
275<tr id="i6" class="altColor">
276<td class="colFirst"><code>java.util.HashMap&lt;<a href="../../genius/core/tournament/VariablesAndValues/AgentParameterVariable.html" title="class in genius.core.tournament.VariablesAndValues">AgentParameterVariable</a>,<a href="../../genius/core/tournament/VariablesAndValues/AgentParamValue.html" title="class in genius.core.tournament.VariablesAndValues">AgentParamValue</a>&gt;</code></td>
277<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#getParameterValues--">getParameterValues</a></span>()</code>
278<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;&nbsp;</div>
279</td>
280</tr>
281<tr id="i7" class="rowColor">
282<td class="colFirst"><code>int</code></td>
283<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#getSessionNumber--">getSessionNumber</a></span>()</code>&nbsp;</td>
284</tr>
285<tr id="i8" class="altColor">
286<td class="colFirst"><code>int</code></td>
287<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#getSessionsTotal--">getSessionsTotal</a></span>()</code>&nbsp;</td>
288</tr>
289<tr id="i9" class="rowColor">
290<td class="colFirst"><code><a href="../../genius/core/StrategyParameters.html" title="class in genius.core">StrategyParameters</a></code></td>
291<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#getStrategyParameters--">getStrategyParameters</a></span>()</code>&nbsp;</td>
292</tr>
293<tr id="i10" class="altColor">
294<td class="colFirst"><code><a href="../../genius/core/SupportedNegotiationSetting.html" title="class in genius.core">SupportedNegotiationSetting</a></code></td>
295<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#getSupportedNegotiationSetting--">getSupportedNegotiationSetting</a></span>()</code>
296<div class="block">Indicates what negotiation settings are supported by an agent, such as
297 linear or non-linear utility spaces.</div>
298</td>
299</tr>
300<tr id="i11" class="rowColor">
301<td class="colFirst"><code>protected java.lang.String</code></td>
302<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#getUniqueIdentifier--">getUniqueIdentifier</a></span>()</code>&nbsp;</td>
303</tr>
304<tr id="i12" class="altColor">
305<td class="colFirst"><code>double</code></td>
306<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#getUtility-genius.core.Bid-">getUtility</a></span>(<a href="../../genius/core/Bid.html" title="class in genius.core">Bid</a>&nbsp;bid)</code>
307<div class="block">A convenience method to get the discounted utility of a bid.</div>
308</td>
309</tr>
310<tr id="i13" class="rowColor">
311<td class="colFirst"><code>java.lang.String</code></td>
312<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#getVersion--">getVersion</a></span>()</code>&nbsp;</td>
313</tr>
314<tr id="i14" class="altColor">
315<td class="colFirst"><code>int</code></td>
316<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#hashCode--">hashCode</a></span>()</code>
317<div class="block">WARNING hashCode and equals are incomplete because we ignore
318 <a href="../../genius/core/AgentAdapter.html" title="class in genius.core"><code>AgentAdapter</code></a> <a href="../../genius/core/protocol/BilateralAtomicNegotiationSession.html" title="class in genius.core.protocol"><code>BilateralAtomicNegotiationSession</code></a>
319 <a href="../../genius/core/StrategyParameters.html" title="class in genius.core"><code>StrategyParameters</code></a> <a href="../../genius/core/timeline/TimeLineInfo.html" title="interface in genius.core.timeline"><code>TimeLineInfo</code></a>
320 <a href="../../genius/core/utility/AbstractUtilitySpace.html" title="class in genius.core.utility"><code>AbstractUtilitySpace</code></a> because they did not implement
321 equals/hashcode.</div>
322</td>
323</tr>
324<tr id="i15" class="rowColor">
325<td class="colFirst"><code>void</code></td>
326<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#init--">init</a></span>()</code>
327<div class="block">This method is called by the protocol every time before starting a new
328 session after the internalInit method is called.</div>
329</td>
330</tr>
331<tr id="i16" class="altColor">
332<td class="colFirst"><code>void</code></td>
333<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#internalInit-int-int-java.util.Date-java.lang.Integer-genius.core.timeline.TimeLineInfo-genius.core.utility.AbstractUtilitySpace-java.util.HashMap-genius.core.AgentID-">internalInit</a></span>(int&nbsp;sessionNr,
334 int&nbsp;sessionsTotal,
335 java.util.Date&nbsp;startTimeP,
336 java.lang.Integer&nbsp;totalTimeP,
337 <a href="../../genius/core/timeline/TimeLineInfo.html" title="interface in genius.core.timeline">TimeLineInfo</a>&nbsp;timeline,
338 <a href="../../genius/core/utility/AbstractUtilitySpace.html" title="class in genius.core.utility">AbstractUtilitySpace</a>&nbsp;us,
339 java.util.HashMap&lt;<a href="../../genius/core/tournament/VariablesAndValues/AgentParameterVariable.html" title="class in genius.core.tournament.VariablesAndValues">AgentParameterVariable</a>,<a href="../../genius/core/tournament/VariablesAndValues/AgentParamValue.html" title="class in genius.core.tournament.VariablesAndValues">AgentParamValue</a>&gt;&nbsp;params,
340 <a href="../../genius/core/AgentID.html" title="class in genius.core">AgentID</a>&nbsp;id)</code>
341<div class="block">This method is called by the protocol to initialize the agent with a new
342 session information.</div>
343</td>
344</tr>
345<tr id="i17" class="rowColor">
346<td class="colFirst"><code>protected java.io.Serializable</code></td>
347<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#loadSessionData--">loadSessionData</a></span>()</code>
348<div class="block">Loads the <code>Serializable</code> data for the agent.</div>
349</td>
350</tr>
351<tr id="i18" class="altColor">
352<td class="colFirst"><code>void</code></td>
353<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#parseStrategyParameters-java.lang.String-">parseStrategyParameters</a></span>(java.lang.String&nbsp;variables)</code>
354<div class="block">Used to parse parameters presented in the agent repository.</div>
355</td>
356</tr>
357<tr id="i19" class="rowColor">
358<td class="colFirst"><code>void</code></td>
359<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#ReceiveMessage-genius.core.actions.Action-">ReceiveMessage</a></span>(<a href="../../genius/core/actions/Action.html" title="interface in genius.core.actions">Action</a>&nbsp;opponentAction)</code>
360<div class="block">informs you which action the opponent did</div>
361</td>
362</tr>
363<tr id="i20" class="altColor">
364<td class="colFirst"><code>protected boolean</code></td>
365<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#saveSessionData-java.io.Serializable-">saveSessionData</a></span>(java.io.Serializable&nbsp;dataToSave)</code>
366<div class="block">Saves information (dataToSave) about the current session for future
367 loading by the agent, when negotiating again with the specific preference
368 profile referred by "filename".</div>
369</td>
370</tr>
371<tr id="i21" class="rowColor">
372<td class="colFirst"><code>void</code></td>
373<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#setName-java.lang.String-">setName</a></span>(java.lang.String&nbsp;pName)</code>
374<div class="block">Sets the name of the agent to the given name.</div>
375</td>
376</tr>
377<tr id="i22" class="altColor">
378<td class="colFirst"><code>void</code></td>
379<td class="colLast"><code><span class="memberNameLink"><a href="../../genius/core/Agent.html#sleep-double-">sleep</a></span>(double&nbsp;fraction)</code>
380<div class="block">Let the agent wait in case of a time-based protocol.</div>
381</td>
382</tr>
383</table>
384<ul class="blockList">
385<li class="blockList"><a name="methods.inherited.from.class.genius.core.AgentAdapter">
386<!-- -->
387</a>
388<h3>Methods inherited from class&nbsp;genius.core.<a href="../../genius/core/AgentAdapter.html" title="class in genius.core">AgentAdapter</a></h3>
389<code><a href="../../genius/core/AgentAdapter.html#chooseAction-java.util.List-">chooseAction</a>, <a href="../../genius/core/AgentAdapter.html#getDescription--">getDescription</a>, <a href="../../genius/core/AgentAdapter.html#getProtocol--">getProtocol</a>, <a href="../../genius/core/AgentAdapter.html#init-genius.core.parties.NegotiationInfo-">init</a>, <a href="../../genius/core/AgentAdapter.html#negotiationEnded-genius.core.Bid-">negotiationEnded</a>, <a href="../../genius/core/AgentAdapter.html#receiveMessage-genius.core.AgentID-genius.core.actions.Action-">receiveMessage</a></code></li>
390</ul>
391<ul class="blockList">
392<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
393<!-- -->
394</a>
395<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
396<code>clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait</code></li>
397</ul>
398</li>
399</ul>
400</li>
401</ul>
402</div>
403<div class="details">
404<ul class="blockList">
405<li class="blockList">
406<!-- ============ FIELD DETAIL =========== -->
407<ul class="blockList">
408<li class="blockList"><a name="field.detail">
409<!-- -->
410</a>
411<h3>Field Detail</h3>
412<a name="utilitySpace">
413<!-- -->
414</a>
415<ul class="blockList">
416<li class="blockList">
417<h4>utilitySpace</h4>
418<pre>public&nbsp;<a href="../../genius/core/utility/AbstractUtilitySpace.html" title="class in genius.core.utility">AbstractUtilitySpace</a> utilitySpace</pre>
419<div class="block">Preference profile of the agent as assigned by the tournamentrunner.</div>
420</li>
421</ul>
422<a name="startTime">
423<!-- -->
424</a>
425<ul class="blockList">
426<li class="blockList">
427<h4>startTime</h4>
428<pre>@Deprecated
429public&nbsp;java.util.Date startTime</pre>
430<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">Use timeline instead.</span></div>
431<div class="block">Date object specifying when the negotiation started.</div>
432</li>
433</ul>
434<a name="totalTime">
435<!-- -->
436</a>
437<ul class="blockList">
438<li class="blockList">
439<h4>totalTime</h4>
440<pre>@Deprecated
441public&nbsp;java.lang.Integer totalTime</pre>
442<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">Use timeline instead.</span></div>
443<div class="block">Total time which an agent has to complete the negotiation.</div>
444</li>
445</ul>
446<a name="timeline">
447<!-- -->
448</a>
449<ul class="blockList">
450<li class="blockList">
451<h4>timeline</h4>
452<pre>public&nbsp;<a href="../../genius/core/timeline/TimeLineInfo.html" title="interface in genius.core.timeline">TimeLineInfo</a> timeline</pre>
453<div class="block">Use timeline for everything time-related.</div>
454</li>
455</ul>
456<a name="sessionNr">
457<!-- -->
458</a>
459<ul class="blockList">
460<li class="blockList">
461<h4>sessionNr</h4>
462<pre>public&nbsp;int sessionNr</pre>
463<div class="block">A session can be repeated multiple times. This parameter specifies which
464 match we are at in the range [0, totalMatches - 1].</div>
465</li>
466</ul>
467<a name="sessionsTotal">
468<!-- -->
469</a>
470<ul class="blockList">
471<li class="blockList">
472<h4>sessionsTotal</h4>
473<pre>public&nbsp;int sessionsTotal</pre>
474<div class="block">Amount of repetitions of this session, how many times this session is
475 repeated in total.</div>
476</li>
477</ul>
478<a name="fNegotiation">
479<!-- -->
480</a>
481<ul class="blockList">
482<li class="blockList">
483<h4>fNegotiation</h4>
484<pre>public&nbsp;<a href="../../genius/core/protocol/BilateralAtomicNegotiationSession.html" title="class in genius.core.protocol">BilateralAtomicNegotiationSession</a> fNegotiation</pre>
485<div class="block">Reference to protocol which is set when experimental setup is enabled.</div>
486</li>
487</ul>
488<a name="parametervalues">
489<!-- -->
490</a>
491<ul class="blockList">
492<li class="blockList">
493<h4>parametervalues</h4>
494<pre>@Deprecated
495protected&nbsp;java.util.HashMap&lt;<a href="../../genius/core/tournament/VariablesAndValues/AgentParameterVariable.html" title="class in genius.core.tournament.VariablesAndValues">AgentParameterVariable</a>,<a href="../../genius/core/tournament/VariablesAndValues/AgentParamValue.html" title="class in genius.core.tournament.VariablesAndValues">AgentParamValue</a>&gt; parametervalues</pre>
496<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
497<div class="block">Parameters given to the agent which may be specified in the agent.</div>
498</li>
499</ul>
500<a name="strategyParameters">
501<!-- -->
502</a>
503<ul class="blockListLast">
504<li class="blockList">
505<h4>strategyParameters</h4>
506<pre>protected&nbsp;<a href="../../genius/core/StrategyParameters.html" title="class in genius.core">StrategyParameters</a> strategyParameters</pre>
507<div class="block">Parameters given to the agent which may be specified in the agent
508 repository.</div>
509</li>
510</ul>
511</li>
512</ul>
513<!-- ========= CONSTRUCTOR DETAIL ======== -->
514<ul class="blockList">
515<li class="blockList"><a name="constructor.detail">
516<!-- -->
517</a>
518<h3>Constructor Detail</h3>
519<a name="Agent--">
520<!-- -->
521</a>
522<ul class="blockListLast">
523<li class="blockList">
524<h4>Agent</h4>
525<pre>public&nbsp;Agent()</pre>
526<div class="block">Empty constructor used to initialize the agent. Later on internalInit is
527 called to set all variables.</div>
528</li>
529</ul>
530</li>
531</ul>
532<!-- ============ METHOD DETAIL ========== -->
533<ul class="blockList">
534<li class="blockList"><a name="method.detail">
535<!-- -->
536</a>
537<h3>Method Detail</h3>
538<a name="getVersion--">
539<!-- -->
540</a>
541<ul class="blockList">
542<li class="blockList">
543<h4>getVersion</h4>
544<pre>public&nbsp;java.lang.String&nbsp;getVersion()</pre>
545<dl>
546<dt><span class="returnLabel">Returns:</span></dt>
547<dd>version of the agent.</dd>
548</dl>
549</li>
550</ul>
551<a name="init--">
552<!-- -->
553</a>
554<ul class="blockList">
555<li class="blockList">
556<h4>init</h4>
557<pre>public&nbsp;void&nbsp;init()</pre>
558<div class="block">This method is called by the protocol every time before starting a new
559 session after the internalInit method is called. User can override this
560 method.</div>
561</li>
562</ul>
563<a name="internalInit-int-int-java.util.Date-java.lang.Integer-genius.core.timeline.TimeLineInfo-genius.core.utility.AbstractUtilitySpace-java.util.HashMap-genius.core.AgentID-">
564<!-- -->
565</a>
566<ul class="blockList">
567<li class="blockList">
568<h4>internalInit</h4>
569<pre>public final&nbsp;void&nbsp;internalInit(int&nbsp;sessionNr,
570 int&nbsp;sessionsTotal,
571 java.util.Date&nbsp;startTimeP,
572 java.lang.Integer&nbsp;totalTimeP,
573 <a href="../../genius/core/timeline/TimeLineInfo.html" title="interface in genius.core.timeline">TimeLineInfo</a>&nbsp;timeline,
574 <a href="../../genius/core/utility/AbstractUtilitySpace.html" title="class in genius.core.utility">AbstractUtilitySpace</a>&nbsp;us,
575 java.util.HashMap&lt;<a href="../../genius/core/tournament/VariablesAndValues/AgentParameterVariable.html" title="class in genius.core.tournament.VariablesAndValues">AgentParameterVariable</a>,<a href="../../genius/core/tournament/VariablesAndValues/AgentParamValue.html" title="class in genius.core.tournament.VariablesAndValues">AgentParamValue</a>&gt;&nbsp;params,
576 <a href="../../genius/core/AgentID.html" title="class in genius.core">AgentID</a>&nbsp;id)</pre>
577<div class="block">This method is called by the protocol to initialize the agent with a new
578 session information.</div>
579<dl>
580<dt><span class="paramLabel">Parameters:</span></dt>
581<dd><code>startTimeP</code> - </dd>
582<dd><code>totalTimeP</code> - </dd>
583<dd><code>timeline</code> - keeping track of the time in the negotiation.</dd>
584<dd><code>us</code> - utility space of the agent for the session.</dd>
585<dd><code>params</code> - parameters of the agent.</dd>
586</dl>
587</li>
588</ul>
589<a name="ReceiveMessage-genius.core.actions.Action-">
590<!-- -->
591</a>
592<ul class="blockList">
593<li class="blockList">
594<h4>ReceiveMessage</h4>
595<pre>public&nbsp;void&nbsp;ReceiveMessage(<a href="../../genius/core/actions/Action.html" title="interface in genius.core.actions">Action</a>&nbsp;opponentAction)</pre>
596<div class="block">informs you which action the opponent did</div>
597<dl>
598<dt><span class="paramLabel">Parameters:</span></dt>
599<dd><code>opponentAction</code> - </dd>
600</dl>
601</li>
602</ul>
603<a name="chooseAction--">
604<!-- -->
605</a>
606<ul class="blockList">
607<li class="blockList">
608<h4>chooseAction</h4>
609<pre>public abstract&nbsp;<a href="../../genius/core/actions/Action.html" title="interface in genius.core.actions">Action</a>&nbsp;chooseAction()</pre>
610<div class="block">this function is called after ReceiveMessage, with an Offer-action.</div>
611<dl>
612<dt><span class="returnLabel">Returns:</span></dt>
613<dd>(should return) the bid-action the agent wants to make.</dd>
614</dl>
615</li>
616</ul>
617<a name="getName--">
618<!-- -->
619</a>
620<ul class="blockList">
621<li class="blockList">
622<h4>getName</h4>
623<pre>public&nbsp;java.lang.String&nbsp;getName()</pre>
624<dl>
625<dt><span class="returnLabel">Returns:</span></dt>
626<dd>name of the agent.</dd>
627</dl>
628</li>
629</ul>
630<a name="getParameterValues--">
631<!-- -->
632</a>
633<ul class="blockList">
634<li class="blockList">
635<h4>getParameterValues</h4>
636<pre>@Deprecated
637public&nbsp;java.util.HashMap&lt;<a href="../../genius/core/tournament/VariablesAndValues/AgentParameterVariable.html" title="class in genius.core.tournament.VariablesAndValues">AgentParameterVariable</a>,<a href="../../genius/core/tournament/VariablesAndValues/AgentParamValue.html" title="class in genius.core.tournament.VariablesAndValues">AgentParamValue</a>&gt;&nbsp;getParameterValues()</pre>
638<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
639<dl>
640<dt><span class="returnLabel">Returns:</span></dt>
641<dd>a type of parameters used solely by the BayesianAgent.</dd>
642</dl>
643</li>
644</ul>
645<a name="setName-java.lang.String-">
646<!-- -->
647</a>
648<ul class="blockList">
649<li class="blockList">
650<h4>setName</h4>
651<pre>public final&nbsp;void&nbsp;setName(java.lang.String&nbsp;pName)</pre>
652<div class="block">Sets the name of the agent to the given name.</div>
653<dl>
654<dt><span class="paramLabel">Parameters:</span></dt>
655<dd><code>pName</code> - to which the agent's name must be set.</dd>
656</dl>
657</li>
658</ul>
659<a name="getUtility-genius.core.Bid-">
660<!-- -->
661</a>
662<ul class="blockList">
663<li class="blockList">
664<h4>getUtility</h4>
665<pre>public&nbsp;double&nbsp;getUtility(<a href="../../genius/core/Bid.html" title="class in genius.core">Bid</a>&nbsp;bid)</pre>
666<div class="block">A convenience method to get the discounted utility of a bid. This method
667 will take discount factors into account (if any), using the status of the
668 current <a href="../../genius/core/Agent.html#timeline"><code>timeline</code></a>.</div>
669<dl>
670<dt><span class="paramLabel">Parameters:</span></dt>
671<dd><code>bid</code> - of which we are interested in the utility.</dd>
672<dt><span class="returnLabel">Returns:</span></dt>
673<dd>discounted utility of the given bid.</dd>
674<dt><span class="seeLabel">See Also:</span></dt>
675<dd><a href="../../genius/core/utility/AdditiveUtilitySpace.html" title="class in genius.core.utility"><code>AdditiveUtilitySpace</code></a></dd>
676</dl>
677</li>
678</ul>
679<a name="sleep-double-">
680<!-- -->
681</a>
682<ul class="blockList">
683<li class="blockList">
684<h4>sleep</h4>
685<pre>public&nbsp;void&nbsp;sleep(double&nbsp;fraction)</pre>
686<div class="block">Let the agent wait in case of a time-based protocol. Example:<br>
687 sleep(0.1) will let the agent sleep for 10% of the negotiation time (as
688 defined by the <a href="../../genius/core/timeline/Timeline.html" title="class in genius.core.timeline"><code>Timeline</code></a>).</div>
689<dl>
690<dt><span class="paramLabel">Parameters:</span></dt>
691<dd><code>fraction</code> - should be between 0 and 1.</dd>
692</dl>
693</li>
694</ul>
695<a name="endSession-genius.core.NegotiationResult-">
696<!-- -->
697</a>
698<ul class="blockList">
699<li class="blockList">
700<h4>endSession</h4>
701<pre>public&nbsp;void&nbsp;endSession(<a href="../../genius/core/NegotiationResult.html" title="class in genius.core">NegotiationResult</a>&nbsp;dUtil)</pre>
702<div class="block">Method which informs an agent about the utility it received.</div>
703<dl>
704<dt><span class="paramLabel">Parameters:</span></dt>
705<dd><code>dUtil</code> - discounted utility of previous session round.</dd>
706</dl>
707</li>
708</ul>
709<a name="getAgentID--">
710<!-- -->
711</a>
712<ul class="blockList">
713<li class="blockList">
714<h4>getAgentID</h4>
715<pre>public&nbsp;<a href="../../genius/core/AgentID.html" title="class in genius.core">AgentID</a>&nbsp;getAgentID()</pre>
716<dl>
717<dt><span class="returnLabel">Returns:</span></dt>
718<dd>ID of the agent as assigned by the protocol.</dd>
719</dl>
720</li>
721</ul>
722<a name="getStrategyParameters--">
723<!-- -->
724</a>
725<ul class="blockList">
726<li class="blockList">
727<h4>getStrategyParameters</h4>
728<pre>public&nbsp;<a href="../../genius/core/StrategyParameters.html" title="class in genius.core">StrategyParameters</a>&nbsp;getStrategyParameters()</pre>
729</li>
730</ul>
731<a name="getSupportedNegotiationSetting--">
732<!-- -->
733</a>
734<ul class="blockList">
735<li class="blockList">
736<h4>getSupportedNegotiationSetting</h4>
737<pre>public&nbsp;<a href="../../genius/core/SupportedNegotiationSetting.html" title="class in genius.core">SupportedNegotiationSetting</a>&nbsp;getSupportedNegotiationSetting()</pre>
738<div class="block">Indicates what negotiation settings are supported by an agent, such as
739 linear or non-linear utility spaces. The default is non-restrictive, but
740 can be overriden if the agent can only be used in certain settings.</div>
741</li>
742</ul>
743<a name="parseStrategyParameters-java.lang.String-">
744<!-- -->
745</a>
746<ul class="blockList">
747<li class="blockList">
748<h4>parseStrategyParameters</h4>
749<pre>public&nbsp;void&nbsp;parseStrategyParameters(java.lang.String&nbsp;variables)
750 throws java.lang.Exception</pre>
751<div class="block">Used to parse parameters presented in the agent repository. The
752 particular implementation below parses parameters such as time=0.9;e=1.0.</div>
753<dl>
754<dt><span class="paramLabel">Parameters:</span></dt>
755<dd><code>variables</code> - </dd>
756<dt><span class="throwsLabel">Throws:</span></dt>
757<dd><code>java.lang.Exception</code></dd>
758</dl>
759</li>
760</ul>
761<a name="getSessionNumber--">
762<!-- -->
763</a>
764<ul class="blockList">
765<li class="blockList">
766<h4>getSessionNumber</h4>
767<pre>public&nbsp;int&nbsp;getSessionNumber()</pre>
768<dl>
769<dt><span class="returnLabel">Returns:</span></dt>
770<dd>which session we are in. If a session is first started it is
771 zero.</dd>
772</dl>
773</li>
774</ul>
775<a name="getSessionsTotal--">
776<!-- -->
777</a>
778<ul class="blockList">
779<li class="blockList">
780<h4>getSessionsTotal</h4>
781<pre>public&nbsp;int&nbsp;getSessionsTotal()</pre>
782<dl>
783<dt><span class="returnLabel">Returns:</span></dt>
784<dd>total sessions. How many times the session is repeated.</dd>
785</dl>
786</li>
787</ul>
788<a name="saveSessionData-java.io.Serializable-">
789<!-- -->
790</a>
791<ul class="blockList">
792<li class="blockList">
793<h4>saveSessionData</h4>
794<pre>protected final&nbsp;boolean&nbsp;saveSessionData(java.io.Serializable&nbsp;dataToSave)</pre>
795<div class="block">Saves information (dataToSave) about the current session for future
796 loading by the agent, when negotiating again with the specific preference
797 profile referred by "filename".
798
799 Important: 1) The dataToSave must implement <code>Serializable</code>
800 interface. This is to make sure the data can be saved. 2) If the function
801 is used more than once regarding the same preference profile, it will
802 override the data saved from last session with the new Object
803 "dataToSave".</div>
804<dl>
805<dt><span class="paramLabel">Parameters:</span></dt>
806<dd><code>dataToSave</code> - the data regarding the last session that "agent" wants to
807 save.</dd>
808<dt><span class="returnLabel">Returns:</span></dt>
809<dd>true if dataToSave is successfully saved, false otherwise.</dd>
810</dl>
811</li>
812</ul>
813<a name="getUniqueIdentifier--">
814<!-- -->
815</a>
816<ul class="blockList">
817<li class="blockList">
818<h4>getUniqueIdentifier</h4>
819<pre>protected&nbsp;java.lang.String&nbsp;getUniqueIdentifier()</pre>
820<dl>
821<dt><span class="returnLabel">Returns:</span></dt>
822<dd>unique identifier of the Agent object.</dd>
823</dl>
824</li>
825</ul>
826<a name="loadSessionData--">
827<!-- -->
828</a>
829<ul class="blockList">
830<li class="blockList">
831<h4>loadSessionData</h4>
832<pre>protected final&nbsp;java.io.Serializable&nbsp;loadSessionData()</pre>
833<div class="block">Loads the <code>Serializable</code> data for the agent. If the function
834 "saveSessionData" wasn't used for this type of agent with the current
835 preference profile of the agent - the data will be null. Otherwise, it
836 will load the saved data of the agent for this specific preference
837 profile.</div>
838<dl>
839<dt><span class="returnLabel">Returns:</span></dt>
840<dd>the <code>Serializable</code> data if the load is successful, null
841 otherwise.</dd>
842</dl>
843</li>
844</ul>
845<a name="getAgent--">
846<!-- -->
847</a>
848<ul class="blockList">
849<li class="blockList">
850<h4>getAgent</h4>
851<pre>public&nbsp;<a href="../../genius/core/Agent.html" title="class in genius.core">Agent</a>&nbsp;getAgent()</pre>
852<dl>
853<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
854<dd><code><a href="../../genius/core/AgentAdapter.html#getAgent--">getAgent</a></code>&nbsp;in class&nbsp;<code><a href="../../genius/core/AgentAdapter.html" title="class in genius.core">AgentAdapter</a></code></dd>
855<dt><span class="returnLabel">Returns:</span></dt>
856<dd>the actual agent that is being adapted.</dd>
857</dl>
858</li>
859</ul>
860<a name="hashCode--">
861<!-- -->
862</a>
863<ul class="blockList">
864<li class="blockList">
865<h4>hashCode</h4>
866<pre>public&nbsp;int&nbsp;hashCode()</pre>
867<div class="block">WARNING hashCode and equals are incomplete because we ignore
868 <a href="../../genius/core/AgentAdapter.html" title="class in genius.core"><code>AgentAdapter</code></a> <a href="../../genius/core/protocol/BilateralAtomicNegotiationSession.html" title="class in genius.core.protocol"><code>BilateralAtomicNegotiationSession</code></a>
869 <a href="../../genius/core/StrategyParameters.html" title="class in genius.core"><code>StrategyParameters</code></a> <a href="../../genius/core/timeline/TimeLineInfo.html" title="interface in genius.core.timeline"><code>TimeLineInfo</code></a>
870 <a href="../../genius/core/utility/AbstractUtilitySpace.html" title="class in genius.core.utility"><code>AbstractUtilitySpace</code></a> because they did not implement
871 equals/hashcode.</div>
872<dl>
873<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
874<dd><code>hashCode</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
875</dl>
876</li>
877</ul>
878<a name="equals-java.lang.Object-">
879<!-- -->
880</a>
881<ul class="blockListLast">
882<li class="blockList">
883<h4>equals</h4>
884<pre>public&nbsp;boolean&nbsp;equals(java.lang.Object&nbsp;obj)</pre>
885<dl>
886<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
887<dd><code>equals</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
888</dl>
889</li>
890</ul>
891</li>
892</ul>
893</li>
894</ul>
895</div>
896</div>
897<!-- ========= END OF CLASS DATA ========= -->
898<!-- ======= START OF BOTTOM NAVBAR ====== -->
899<div class="bottomNav"><a name="navbar.bottom">
900<!-- -->
901</a>
902<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
903<a name="navbar.bottom.firstrow">
904<!-- -->
905</a>
906<ul class="navList" title="Navigation">
907<li><a href="../../overview-summary.html">Overview</a></li>
908<li><a href="package-summary.html">Package</a></li>
909<li class="navBarCell1Rev">Class</li>
910<li><a href="class-use/Agent.html">Use</a></li>
911<li><a href="package-tree.html">Tree</a></li>
912<li><a href="../../deprecated-list.html">Deprecated</a></li>
913<li><a href="../../index-all.html">Index</a></li>
914<li><a href="../../help-doc.html">Help</a></li>
915</ul>
916</div>
917<div class="subNav">
918<ul class="navList">
919<li>Prev&nbsp;Class</li>
920<li><a href="../../genius/core/AgentAdapter.html" title="class in genius.core"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
921</ul>
922<ul class="navList">
923<li><a href="../../index.html?genius/core/Agent.html" target="_top">Frames</a></li>
924<li><a href="Agent.html" target="_top">No&nbsp;Frames</a></li>
925</ul>
926<ul class="navList" id="allclasses_navbar_bottom">
927<li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li>
928</ul>
929<div>
930<script type="text/javascript"><!--
931 allClassesLink = document.getElementById("allclasses_navbar_bottom");
932 if(window==top) {
933 allClassesLink.style.display = "block";
934 }
935 else {
936 allClassesLink.style.display = "none";
937 }
938 //-->
939</script>
940</div>
941<div>
942<ul class="subNavList">
943<li>Summary:&nbsp;</li>
944<li>Nested&nbsp;|&nbsp;</li>
945<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
946<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
947<li><a href="#method.summary">Method</a></li>
948</ul>
949<ul class="subNavList">
950<li>Detail:&nbsp;</li>
951<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
952<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
953<li><a href="#method.detail">Method</a></li>
954</ul>
955</div>
956<a name="skip.navbar.bottom">
957<!-- -->
958</a></div>
959<!-- ======== END OF BOTTOM NAVBAR ======= -->
960</body>
961</html>
Note: See TracBrowser for help on using the repository browser.