Changeset 16
- Timestamp:
- 08/05/20 09:42:31 (4 years ago)
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
pom.xml
r15 r16 3 3 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4 4 <modelVersion>4.0.0</modelVersion> 5 <!-- FIXME use pocketnego3 here? --> 5 6 <groupId>geniusweb</groupId> 6 7 <artifactId>runserver</artifactId> 7 8 <packaging>war</packaging> 8 <version>1.4. 2</version> <!-- must equal ${geniusweb.version} -->9 <version>1.4.4</version> <!-- must equal ${geniusweb.version} --> 9 10 <name>runserver Maven Webapp</name> 10 11 <url>http://maven.apache.org</url> … … 19 20 <jackson-2-version>2.9.10</jackson-2-version> 20 21 <tomcat.version>8.0.53</tomcat.version> 21 <geniusweb.version>1.4. 2</geniusweb.version>22 <geniusweb.version>1.4.4</geniusweb.version> 22 23 </properties> 23 24 -
src/main/java/geniusweb/runserver/WebSocketProtToPartyConn.java
r8 r16 86 86 87 87 container = ContainerProvider.getWebSocketContainer(); 88 container.setDefaultMaxTextMessageBufferSize(200000); 89 88 90 log.log(Level.INFO, 89 91 "Trying to make websocket connection to running party " -
src/main/webapp/newsession.xhtml
r15 r16 29 29 <br /> Domain/Profile Server: 30 30 <input type="url" name="url" id="profilesserverurl" 31 value="localhost:8080/profilesserver-1.4. 2"31 value="localhost:8080/profilesserver-1.4.4" 32 32 pattern=".*:[0-9]+/profilesserver" size="30" 33 33 onchange="connectDomain()"> </input> … … 43 43 <br /> <b>Participants</b> <br /> Parties Server: <input type="url" 44 44 name="url" id="partiesserverurl" 45 value="localhost:8080/partiesserver-1.4. 2"45 value="localhost:8080/partiesserver-1.4.4" 46 46 pattern=".*:[0-9]+/partiesserver" size="30" 47 47 onchange="connectParties()"> </input> <br /> <br /> <b>Party … … 49 49 </select> <br /> Profile: <select id="profileselection"></select> Filter: <input 50 50 type="text" id="filter" value="" maxlength="40" /> <br /> 51 Parameters: { <input type="text" id="parameters" 52 onchange="updateParameters()" value="" maxlength="100" /> } <br /> 53 <br /> 51 Parameters: { 52 <textarea id="parameters" rows="2" cols="70" 53 onchange="updateParameters()" value="" /> 54 } <br /> <br /> 54 55 55 56 <div id="cobsetting"> 56 <input type="checkbox" id="advancedCobSettings" onchange="advancedCobSet()" ></input> 57 Advanced COB settings<br/>58 <div id="advancedsettings" style="display:none">57 <input type="checkbox" id="advancedCobSettings" 58 onchange="advancedCobSet()"></input> Advanced COB settings<br /> 59 <div id="advancedsettings" style="display: none"> 59 60 <b>COB party settings</b> <br /> Party : <select 60 61 id="cobpartyselection"> 61 </select> <br /> Profile: <select id="cobprofileselection"></select> 62 Filter: <input type="text" id="cobfilter" value="" 63 maxlength="40" /> <br /> Parameters: { <input 64 type="text" id="cobparameters" onchange="updateCobParameters()" 65 value="" maxlength="100" /> } <br /> <br /> 62 </select> <br /> Profile: <select id="cobprofileselection"></select> Filter: 63 <input type="text" id="cobfilter" value="" maxlength="40" /> <br /> 64 <!-- --> 65 Parameters: { <textarea id="cobparameters" rows="2" cols="70" 66 onchange="updateCobParameters()" value="" /> } <br /> 67 <br /> 66 68 </div> 67 69 </div> … … 113 115 114 116 <script type="application/javascript"> 117 115 118 116 119 … … 273 276 refresh table: copy all parties elements in there. 274 277 Typically parties is something like 275 [{"uri":"http:130.161.180.1:8080/partiesserver/run/randomparty-1.4. 2",278 [{"uri":"http:130.161.180.1:8080/partiesserver/run/randomparty-1.4.4", 276 279 "capabilities":{"protocols":["SAOP"]}, 277 280 "description":"places random bids until it can accept an offer with utility >0.6", 278 "id":"randomparty-1.4. 2",281 "id":"randomparty-1.4.4", 279 282 "partyClass":"geniusweb.exampleparties.randomparty.RandomParty"}, 280 283 ...] … … 438 441 439 442 cell1.innerHTML = partyprofiles[pp]["party"]["partyref"]; 440 cell2.innerHTML = JSON.stringify(partyprofiles[pp]["party"]["parameters"]); 443 // help browser breaking too large strings 444 cell2.innerHTML = JSON.stringify(partyprofiles[pp]["party"]["parameters"]).replace(/,/g,", "); 445 cell2.setAttribute("style","overflow-wrap: anywhere;"); 441 446 cell3.innerHTML = partyprofiles[pp]["profile"]; 442 447 cell4.innerHTML = cobpartyprofiles[pp]["party"]["partyref"]; 443 cell5.innerHTML = JSON.stringify(cobpartyprofiles[pp]["party"]["parameters"]); 448 cell5.innerHTML = JSON.stringify(cobpartyprofiles[pp]["party"]["parameters"]).replace(/,/g,", "); 449 cell5.setAttribute("style","overflow-wrap: anywhere;"); 444 450 cell6.innerHTML = cobpartyprofiles[pp]["profile"]; 445 451 } … … 571 577 function init() { 572 578 selectProtocol(); 573 document.getElementById("partiesserverurl").value =window.location.hostname+":8080/partiesserver-1.4. 2"574 document.getElementById("profilesserverurl").value =window.location.hostname+":8080/profilesserver-1.4. 2"579 document.getElementById("partiesserverurl").value =window.location.hostname+":8080/partiesserver-1.4.4" 580 document.getElementById("profilesserverurl").value =window.location.hostname+":8080/profilesserver-1.4.4" 575 581 connectDomain(); 576 582 connectParties(); … … 585 591 586 592 593 587 594 </script> 588 595 -
src/main/webapp/newtournament.xhtml
r15 r16 87 87 <!-- party 1 selection --> 88 88 Party: <select id="partyselection"> 89 </select> Parameters: { <input type="text" id="parameters" 90 onchange="getParameters('parameters')" value="" maxlength="100" /> } 91 <br /> 89 </select> 90 <br /> Parameters: { 91 <textarea id="parameters" rows="2" cols="70" 92 onchange="getParameters('parameters')" value="" /> 93 } <br /> 92 94 <!-- party 2 selection --> 93 95 <div class="onlySHAOP"> 94 96 COB: <select id="partyselection2"> 95 </select> Parameters: { <input type="text" id="parameters2" 96 onchange="getParameters('parameters2')" value="" maxlength="100" /> 97 </select> 98 <br /> Parameters: { 99 <textarea id="parameters2" rows="2" cols="70" 100 onchange="getParameters('parameters2')" value="" /> 97 101 } 98 102 </div> … … 133 137 134 138 <script type="application/javascript"> 139 135 140 136 141 … … 397 402 var cell2 = row.insertCell(-1); 398 403 cell1.innerHTML = party["partyref"]; 399 cell2.innerHTML = JSON.stringify(party["parameters"]); 404 cell2.innerHTML = JSON.stringify(party["parameters"]).replace(/,/g,", ");; 405 cell2.setAttribute("style","overflow-wrap: anywhere;"); 400 406 if (col>0) { 401 407 cell1.className = cell2.className = "onlySHAOP"; … … 556 562 */ 557 563 function init() { 558 document.getElementById("partiesserverurl").value =window.location.hostname+":8080/partiesserver-1.4. 2";559 document.getElementById("profilesserverurl").value =window.location.hostname+":8080/profilesserver-1.4. 2";564 document.getElementById("partiesserverurl").value =window.location.hostname+":8080/partiesserver-1.4.4"; 565 document.getElementById("profilesserverurl").value =window.location.hostname+":8080/profilesserver-1.4.4"; 560 566 561 567 selectProtocol(); … … 580 586 581 587 588 582 589 </script> 583 590 -
src/main/webapp/plotlog.xhtml
r14 r16 23 23 <div id="progress">Waiting for log file name</div> 24 24 <br /> 25 <div>Notice, the plotted utilities do not include possible elicitation costs.</div> 25 26 <div style="width: 100%;"> 26 27 <canvas id="canvas"></canvas> -
src/main/webapp/utilstable.xhtml
r14 r16 29 29 <th align="center">run nr</th> 30 30 <th align="center">accepted bid</th> 31 <th align="center">party utilit ies</th>31 <th align="center">party utility - penalty</th> 32 32 </tr> 33 33 </thead> … … 37 37 38 38 </table> 39 40 41 39 </body> 42 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 43 56 <!-- Script to get/update the table using the query given in the URL. --> 44 57 <script type="application/javascript"> 45 58 46 59 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 60 63 61 … … 227 225 228 226 if (result['error']!=null) { 229 row.insertCell(-1).innerHTML="session failed with error"; 227 var errstr="session failed:"; 228 var err=result['error']; 229 if ("geniusweb.protocol.ProtocolException" in err) { 230 errstr=errstr+err["geniusweb.protocol.ProtocolException"]['cause']['message']; 231 } 232 row.insertCell(-1).innerHTML=errstr; 230 233 return; 231 234 } … … 241 244 var party = result['participants'][n] 242 245 var profile =party['profile']; 246 var penalty=result['penalties'][n]; 243 247 // make short name for readability 244 248 var partyname = party['party']['partyref']; 245 249 partyname = partyname.split('/'); 246 250 partyname = partyname[partyname.length-1]; 247 addUtilityCell(row.insertCell(-1), agreedbid, partyname, profile );251 addUtilityCell(row.insertCell(-1), agreedbid, partyname, profile,penalty); 248 252 } 249 253 } … … 255 259 @param profileurl the profile url to use for the evaluation of the bid 256 260 @param bid the accepted bid, not null. 257 */ 258 function addUtilityCell(cell, agreedbid, partyname, profileurl) { 261 @param penalty costs made by the party, to be subtracted from total util. 262 typically these are elicitation costs. 263 */ 264 function addUtilityCell(cell, agreedbid, partyname, profileurl, penalty) { 259 265 var util = utility(profiles[profileurl],agreedbid); 260 cell.innerHTML = Math.round(util*1000000)/1000000 +" :"+partyname; 266 var rUtil = Math.round(util*1000000)/1000000; 267 var rPenalty = Math.round( (penalty )*1000000)/1000000 ; 268 cell.innerHTML = rUtil + "-" + rPenalty + " :"+partyname; 261 269 262 270 }
Note:
See TracChangeset
for help on using the changeset viewer.