Changeset 24 for exampleparties
- Timestamp:
- 10/06/20 13:12:20 (4 years ago)
- Location:
- exampleparties
- Files:
-
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
exampleparties/anac2019/agentgg/pom.xml
r23 r24 6 6 <groupId>geniusweb.exampleparties.anac2019</groupId> 7 7 <artifactId>agentgg</artifactId> 8 <version>1.5. 2</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.3</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.6</jackson-2-version> 19 <geniusweb.version>1.5. 2</geniusweb.version>19 <geniusweb.version>1.5.3</geniusweb.version> 20 20 </properties> 21 21 … … 192 192 <groupId>org.apache.maven.plugins</groupId> 193 193 <artifactId>maven-javadoc-plugin</artifactId> 194 <version> 2.10.1</version>194 <version>3.2.0</version> 195 195 <executions> 196 196 <execution> … … 199 199 <goal>jar</goal> 200 200 </goals> 201 <configuration>202 <additionalparam>${javadoc.opts}</additionalparam>203 <additionalparam>-Xdoclint:none</additionalparam>204 </configuration>205 201 </execution> 206 202 </executions> -
exampleparties/anac2019/agentgg/src/main/java/geniusweb/exampleparties/agentgg/ImpMap.java
r19 r24 63 63 * "weight sum" and "number of times" in the import table. 64 64 * 65 * @param bid sa list of ordered bids, worst bid first, best bid last65 * @param bidOrdering a list of ordered bids, worst bid first, best bid last 66 66 */ 67 67 public void self_update(List<Bid> bidOrdering) { … … 116 116 * @param bid the bid to get the importance (utility?) of. 117 117 * @return the importance value of bid. Note, this this returns possibly 118 * large ( >1) values, as the importance is not normalized.118 * large (>1) values, as the importance is not normalized. 119 119 */ 120 120 public double getImportance(Bid bid) { -
exampleparties/anac2019/agentgg/src/main/java/geniusweb/exampleparties/agentgg/SimpleLinearOrdering.java
r12 r24 67 67 /** 68 68 * 69 * @param bid 69 * @param bid a {@link Bid} 70 70 * @return true iff bid is contained in this ordering 71 71 */ -
exampleparties/anac2019/agentgg/src/test/java/geniusweb/exampleparties/agentgg/AgentGGTest.java
r21 r24 35 35 import geniusweb.connection.ConnectionEnd; 36 36 import geniusweb.inform.ActionDone; 37 import geniusweb.inform.Agreements; 37 38 import geniusweb.inform.Finished; 38 39 import geniusweb.inform.Inform; … … 180 181 party.connect(connection); 181 182 party.notifyChange(settings); 182 party.notifyChange(new Finished(null)); 183 184 Agreements agreements = mock(Agreements.class); 185 when(agreements.toString()).thenReturn("agree"); 186 party.notifyChange(new Finished(agreements)); 183 187 184 188 verify(reporter).log(eq(Level.INFO), 185 eq("Final ourcome:Finished[ null]"));189 eq("Final ourcome:Finished[agree]")); 186 190 } 187 191 -
exampleparties/anac2019/winkyagent/pom.xml
r23 r24 6 6 <groupId>geniusweb.exampleparties.anac2019</groupId> 7 7 <artifactId>winkyagent</artifactId> 8 <version>1.5. 2</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.3</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.6</jackson-2-version> 19 <geniusweb.version>1.5. 2</geniusweb.version>19 <geniusweb.version>1.5.3</geniusweb.version> 20 20 </properties> 21 21 … … 192 192 <groupId>org.apache.maven.plugins</groupId> 193 193 <artifactId>maven-javadoc-plugin</artifactId> 194 <version> 2.10.1</version>194 <version>3.2.0</version> 195 195 <executions> 196 196 <execution> … … 199 199 <goal>jar</goal> 200 200 </goals> 201 <configuration>202 <additionalparam>${javadoc.opts}</additionalparam>203 <additionalparam>-Xdoclint:none</additionalparam>204 </configuration>205 201 </execution> 206 202 </executions> -
exampleparties/anac2019/winkyagent/src/main/java/geniusweb/exampleparties/anac2019/winkyagent/SimpleLinearOrdering.java
r12 r24 29 29 /** 30 30 * 31 * @param domain 31 * @param domain the {@link Domain} 32 32 * @param bids a list of bids, ordered from lowest to highest util. The 33 33 * first bid will have utility 0, the last utility 1. If only … … 67 67 /** 68 68 * 69 * @param bid 69 * @param bid the {@link Bid} 70 70 * @return true iff bid is contained in this ordering 71 71 */ … … 84 84 /** 85 85 * 86 * @param profile 86 * @param profile the {@link Profile} 87 87 * @return a list of bids in the profile sorted from low to high utility. 88 88 */ -
exampleparties/anac2019/winkyagent/src/test/java/geniusweb/exampleparties/anac2019/winkyagent/WinkyAgentTest.java
r21 r24 35 35 import geniusweb.connection.ConnectionEnd; 36 36 import geniusweb.inform.ActionDone; 37 import geniusweb.inform.Agreements; 37 38 import geniusweb.inform.Finished; 38 39 import geniusweb.inform.Inform; … … 174 175 party.connect(connection); 175 176 party.notifyChange(settings); 176 party.notifyChange(new Finished(null)); 177 178 Agreements agreements = mock(Agreements.class); 179 when(agreements.toString()).thenReturn("agree"); 180 party.notifyChange(new Finished(agreements)); 177 181 178 182 verify(reporter).log(eq(Level.INFO), 179 eq("Final ourcome:Finished[ null]"));183 eq("Final ourcome:Finished[agree]")); 180 184 } 181 185 -
exampleparties/boulware/pom.xml
r23 r24 6 6 <groupId>geniusweb.exampleparties</groupId> 7 7 <artifactId>boulware</artifactId> 8 <version>1.5. 2</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.3</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.10</jackson-2-version> 19 <geniusweb.version>1.5. 2</geniusweb.version>19 <geniusweb.version>1.5.3</geniusweb.version> 20 20 </properties> 21 21 … … 105 105 <groupId>org.apache.maven.plugins</groupId> 106 106 <artifactId>maven-javadoc-plugin</artifactId> 107 <version> 2.10.1</version>107 <version>3.2.0</version> 108 108 <executions> 109 109 <execution> … … 112 112 <goal>jar</goal> 113 113 </goals> 114 <configuration>115 <additionalparam>${javadoc.opts}</additionalparam>116 <additionalparam>-Xdoclint:none</additionalparam>117 </configuration>118 114 </execution> 119 115 </executions> -
exampleparties/comparebids/pom.xml
r23 r24 6 6 <groupId>geniusweb.exampleparties</groupId> 7 7 <artifactId>comparebids</artifactId> 8 <version>1.5. 2</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.3</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.6</jackson-2-version> 19 <geniusweb.version>1.5. 2</geniusweb.version>19 <geniusweb.version>1.5.3</geniusweb.version> 20 20 </properties> 21 21 … … 195 195 <goal>jar</goal> 196 196 </goals> 197 <configuration>198 <additionalparam>${javadoc.opts}</additionalparam>199 <additionalparam>-Xdoclint:none</additionalparam>200 </configuration>201 197 </execution> 202 198 </executions> -
exampleparties/conceder/pom.xml
r23 r24 6 6 <groupId>geniusweb.exampleparties</groupId> 7 7 <artifactId>conceder</artifactId> 8 <version>1.5. 2</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.3</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.10</jackson-2-version> 19 <geniusweb.version>1.5. 2</geniusweb.version>19 <geniusweb.version>1.5.3</geniusweb.version> 20 20 </properties> 21 21 … … 105 105 <groupId>org.apache.maven.plugins</groupId> 106 106 <artifactId>maven-javadoc-plugin</artifactId> 107 <version> 2.10.1</version>107 <version>3.2.0</version> 108 108 <executions> 109 109 <execution> … … 112 112 <goal>jar</goal> 113 113 </goals> 114 <configuration>115 <additionalparam>${javadoc.opts}</additionalparam>116 <additionalparam>-Xdoclint:none</additionalparam>117 </configuration>118 114 </execution> 119 115 </executions> -
exampleparties/hardliner/pom.xml
r23 r24 6 6 <groupId>geniusweb.exampleparties</groupId> 7 7 <artifactId>hardliner</artifactId> 8 <version>1.5. 2</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.3</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.10</jackson-2-version> 19 <geniusweb.version>1.5. 2</geniusweb.version>19 <geniusweb.version>1.5.3</geniusweb.version> 20 20 </properties> 21 21 … … 105 105 <groupId>org.apache.maven.plugins</groupId> 106 106 <artifactId>maven-javadoc-plugin</artifactId> 107 <version> 2.10.1</version>107 <version>3.2.0</version> 108 108 <executions> 109 109 <execution> … … 112 112 <goal>jar</goal> 113 113 </goals> 114 <configuration>115 <additionalparam>${javadoc.opts}</additionalparam>116 <additionalparam>-Xdoclint:none</additionalparam>117 </configuration>118 114 </execution> 119 115 </executions> -
exampleparties/humangui/pom.xml
r23 r24 6 6 <groupId>geniusweb.exampleparties</groupId> 7 7 <artifactId>humangui</artifactId> 8 <version>1.5. 2</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.3</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.6</jackson-2-version> 19 <geniusweb.version>1.5. 2</geniusweb.version>19 <geniusweb.version>1.5.3</geniusweb.version> 20 20 </properties> 21 21 … … 182 182 <groupId>org.apache.maven.plugins</groupId> 183 183 <artifactId>maven-javadoc-plugin</artifactId> 184 <version> 2.10.1</version>184 <version>3.2.0</version> 185 185 <executions> 186 186 <execution> … … 189 189 <goal>jar</goal> 190 190 </goals> 191 <configuration>192 <additionalparam>${javadoc.opts}</additionalparam>193 <additionalparam>-Xdoclint:none</additionalparam>194 </configuration>195 191 </execution> 196 192 </executions> -
exampleparties/humangui/src/main/java/geniusweb/exampleparties/humangui/BiddingInfo.java
r21 r24 32 32 * <li>{@link Bid} if user changed his prepared bid (but did not yet offer it) 33 33 * <li>{@link Profile} if the profile was changed 34 * <li>{@ Link Boolean} if the isMyTurn value changed.34 * <li>{@link Boolean} if the isMyTurn value changed. 35 35 * </ul> 36 36 */ … … 57 57 * @param reporter the {@link Reporter} where we can log issues. 58 58 * @param profileint the {@link ProfileInterface} 59 * @throws Exception if we can not reach the protocol server 59 * @throws IOException if we can not reach the protocol server 60 * @throws DeploymentException if we can not reach the protocol server 60 61 */ 61 62 public BiddingInfo(Settings settings, … … 97 98 * 98 99 * @param action the action to execute. 99 * @throws IOException if action can not be sent.100 * @throws IllegalStateException if isMyTurn is false.101 100 */ 102 101 public void doAction(Action action) { -
exampleparties/humangui/src/test/java/geniusweb/exampleparties/humangui/HumanGuiTest.java
r21 r24 6 6 import static org.junit.Assert.assertTrue; 7 7 import static org.mockito.Mockito.mock; 8 import static org.mockito.Mockito.when; 8 9 9 10 import java.io.IOException; … … 28 29 import geniusweb.bidspace.AllBidsList; 29 30 import geniusweb.inform.ActionDone; 31 import geniusweb.inform.Agreements; 30 32 import geniusweb.inform.Finished; 31 33 import geniusweb.inform.Settings; … … 76 78 @After 77 79 public void after() { 78 party.notifyChange(new Finished(null)); 80 Agreements agreements = mock(Agreements.class); 81 when(agreements.toString()).thenReturn("agree"); 82 party.notifyChange(new Finished(agreements)); 79 83 } 80 84 -
exampleparties/linear/pom.xml
r23 r24 6 6 <groupId>geniusweb.exampleparties</groupId> 7 7 <artifactId>linear</artifactId> 8 <version>1.5. 2</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.3</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.10</jackson-2-version> 19 <geniusweb.version>1.5. 2</geniusweb.version>19 <geniusweb.version>1.5.3</geniusweb.version> 20 20 </properties> 21 21 … … 104 104 <groupId>org.apache.maven.plugins</groupId> 105 105 <artifactId>maven-javadoc-plugin</artifactId> 106 <version> 2.10.1</version>106 <version>3.2.0</version> 107 107 <executions> 108 108 <execution> … … 111 111 <goal>jar</goal> 112 112 </goals> 113 <configuration>114 <additionalparam>${javadoc.opts}</additionalparam>115 <additionalparam>-Xdoclint:none</additionalparam>116 </configuration>117 113 </execution> 118 114 </executions> -
exampleparties/randomparty/pom.xml
r23 r24 6 6 <groupId>geniusweb.exampleparties</groupId> 7 7 <artifactId>randomparty</artifactId> 8 <version>1.5. 2</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.3</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.6</jackson-2-version> 19 <geniusweb.version>1.5. 2</geniusweb.version>19 <geniusweb.version>1.5.3</geniusweb.version> 20 20 </properties> 21 21 … … 187 187 <groupId>org.apache.maven.plugins</groupId> 188 188 <artifactId>maven-javadoc-plugin</artifactId> 189 <version> 2.10.1</version>189 <version>3.2.0</version> 190 190 <executions> 191 191 <execution> … … 194 194 <goal>jar</goal> 195 195 </goals> 196 <configuration>197 <additionalparam>${javadoc.opts}</additionalparam>198 <additionalparam>-Xdoclint:none</additionalparam>199 </configuration>200 196 </execution> 201 197 </executions> -
exampleparties/randomparty/src/main/java/geniusweb/exampleparties/randomparty/RandomParty.java
r22 r24 40 40 * with sufficient utility. 41 41 * <h2>parameters</h2> 42 * <table> 42 * <table > 43 * <caption>parameters</caption> 43 44 * <tr> 44 45 * <td>minPower</td> -
exampleparties/randomparty/src/test/java/geniusweb/exampleparties/randomparty/RandomPartyTest.java
r21 r24 8 8 import static org.mockito.Mockito.mock; 9 9 import static org.mockito.Mockito.verify; 10 import static org.mockito.Mockito.when; 10 11 11 12 import java.io.IOException; … … 38 39 import geniusweb.connection.ConnectionEnd; 39 40 import geniusweb.inform.ActionDone; 41 import geniusweb.inform.Agreements; 40 42 import geniusweb.inform.Finished; 41 43 import geniusweb.inform.Inform; … … 163 165 party.connect(connection); 164 166 party.notifyChange(settings); 165 party.notifyChange(new Finished(null)); 167 Agreements agreements = mock(Agreements.class); 168 when(agreements.toString()).thenReturn("agree"); 169 party.notifyChange(new Finished(agreements)); 166 170 167 171 verify(reporter).log(eq(Level.INFO), 168 eq("Final ourcome:Finished[ null]"));172 eq("Final ourcome:Finished[agree]")); 169 173 } 170 174 -
exampleparties/randompartypy/pom.xml
r23 r24 6 6 <groupId>geniusweb.exampleparties</groupId> 7 7 <artifactId>randompyparty</artifactId> 8 <version>1.5. 2</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.3</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.10</jackson-2-version> 19 <geniusweb.version>1.5. 2</geniusweb.version>19 <geniusweb.version>1.5.3</geniusweb.version> 20 20 </properties> 21 21 … … 166 166 <groupId>org.apache.maven.plugins</groupId> 167 167 <artifactId>maven-javadoc-plugin</artifactId> 168 <version> 2.10.1</version>168 <version>3.2.0</version> 169 169 <executions> 170 170 <execution> … … 173 173 <goal>jar</goal> 174 174 </goals> 175 <configuration>176 <additionalparam>${javadoc.opts}</additionalparam>177 <additionalparam>-Xdoclint:none</additionalparam>178 </configuration>179 175 </execution> 180 176 </executions> -
exampleparties/simpleboa/pom.xml
r23 r24 6 6 <groupId>geniusweb.exampleparties</groupId> 7 7 <artifactId>simpleboaparty</artifactId> 8 <version>1.5. 2</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.3</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.6</jackson-2-version> 19 <geniusweb.version>1.5. 2</geniusweb.version>19 <geniusweb.version>1.5.3</geniusweb.version> 20 20 </properties> 21 21 … … 125 125 <groupId>org.apache.maven.plugins</groupId> 126 126 <artifactId>maven-javadoc-plugin</artifactId> 127 <version> 2.10.1</version>127 <version>3.2.0</version> 128 128 <executions> 129 129 <execution> … … 132 132 <goal>jar</goal> 133 133 </goals> 134 <configuration>135 <additionalparam>${javadoc.opts}</additionalparam>136 <additionalparam>-Xdoclint:none</additionalparam>137 </configuration>138 134 </execution> 139 135 </executions> -
exampleparties/simpleboa/src/test/java/geniusweb/exampleparties/simpleboa/SimpleBoaTest.java
r21 r24 37 37 import geniusweb.connection.ConnectionEnd; 38 38 import geniusweb.inform.ActionDone; 39 import geniusweb.inform.Agreements; 39 40 import geniusweb.inform.Finished; 40 41 import geniusweb.inform.Inform; … … 164 165 party.connect(connection); 165 166 party.notifyChange(settings); 166 party.notifyChange(new Finished(null)); 167 168 Agreements agreements = mock(Agreements.class); 169 when(agreements.toString()).thenReturn("agree"); 170 party.notifyChange(new Finished(agreements)); 167 171 168 172 verify(reporter).log(eq(Level.INFO), 169 eq("Final ourcome:Finished[ null]"));173 eq("Final ourcome:Finished[agree]")); 170 174 } 171 175 -
exampleparties/simpleshaop/pom.xml
r23 r24 6 6 <groupId>geniusweb.exampleparties</groupId> 7 7 <artifactId>simpleshaop</artifactId> 8 <version>1.5. 2</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.3</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.6</jackson-2-version> 19 <geniusweb.version>1.5. 2</geniusweb.version>19 <geniusweb.version>1.5.3</geniusweb.version> 20 20 </properties> 21 21 … … 188 188 <groupId>org.apache.maven.plugins</groupId> 189 189 <artifactId>maven-javadoc-plugin</artifactId> 190 <version> 2.10.1</version>190 <version>3.2.0</version> 191 191 <executions> 192 192 <execution> … … 195 195 <goal>jar</goal> 196 196 </goals> 197 <configuration>198 <additionalparam>${javadoc.opts}</additionalparam>199 <additionalparam>-Xdoclint:none</additionalparam>200 </configuration>201 197 </execution> 202 198 </executions> -
exampleparties/simpleshaop/src/main/java/geniusweb/exampleparties/simpleshaop/ShaopParty.java
r21 r24 38 38 * created. 39 39 * <p> 40 * <b>Requirement< b> the initial {@link PartialOrdering} must contain at least40 * <b>Requirement</b> the initial {@link PartialOrdering} must contain at least 41 41 * the bids with lowest utility and highest utility, and the proper comparison 42 42 * info for these two bids. -
exampleparties/simpleshaop/src/main/java/geniusweb/exampleparties/simpleshaop/SimpleLinearOrdering.java
r11 r24 21 21 22 22 private final Domain domain; 23 private final List<Bid> bids; // worst bid first, best bid last. 23 /** 24 * List of bids. worst bid first, best bid last. 25 */ 26 private final List<Bid> bids; 24 27 25 28 SimpleLinearOrdering(Profile profile) { … … 29 32 /** 30 33 * 31 * @param domain 34 * @param domain The {@link Domain} 32 35 * @param bids a list of bids, ordered from lowest to highest util. The 33 36 * first bid will have utility 0, the last utility 1. If only … … 67 70 /** 68 71 * 69 * @param bid 72 * @param bid the {@link Bid} 70 73 * @return true iff bid is contained in this ordering 71 74 */ … … 84 87 /** 85 88 * 86 * @param profile 89 * @param profile the {@link Profile} 87 90 * @return a list of bids in the profile sorted from low to high utility. 88 91 */ … … 108 111 109 112 /** 110 * @param bid a new bidto be inserted113 * @param bid a new {@link Bid} to be inserted 111 114 * @param worseBids all bids that are worse than this bid. 112 * @return a SimpleLinearOrdering, updated with the given comparison. Thee113 * bid will be inserted after the first bid that is not worse than114 * bid.115 * @return a {@link SimpleLinearOrdering}, updated with the given 116 * comparison. Thee bid will be inserted after the first bid that is 117 * not worse than bid. 115 118 */ 116 119 public SimpleLinearOrdering with(Bid bid, List<Bid> worseBids) { -
exampleparties/simpleshaop/src/test/java/geniusweb/exampleparties/simpleshaop/ShaopPartyTest.java
r21 r24 8 8 import static org.mockito.Mockito.mock; 9 9 import static org.mockito.Mockito.verify; 10 import static org.mockito.Mockito.when; 10 11 11 12 import java.io.IOException; … … 37 38 import geniusweb.connection.ConnectionEnd; 38 39 import geniusweb.inform.ActionDone; 40 import geniusweb.inform.Agreements; 39 41 import geniusweb.inform.Finished; 40 42 import geniusweb.inform.Inform; … … 178 180 party.connect(connection); 179 181 party.notifyChange(settings); 180 party.notifyChange(new Finished(null)); 182 183 Agreements agreements = mock(Agreements.class); 184 when(agreements.toString()).thenReturn("agree"); 185 party.notifyChange(new Finished(agreements)); 181 186 182 187 verify(reporter).log(eq(Level.INFO), 183 eq("Final ourcome:Finished[ null]"));188 eq("Final ourcome:Finished[agree]")); 184 189 } 185 190 -
exampleparties/timedependentparty/pom.xml
r23 r24 6 6 <groupId>geniusweb.exampleparties</groupId> 7 7 <artifactId>timedependentparty</artifactId> 8 <version>1.5. 2</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.3</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.10</jackson-2-version> 19 <geniusweb.version>1.5. 2</geniusweb.version>19 <geniusweb.version>1.5.3</geniusweb.version> 20 20 </properties> 21 21 … … 34 34 <groupId>geniusweb</groupId> 35 35 <artifactId>party</artifactId> 36 <version>${geniusweb.version}</version>36 <version>${geniusweb.version}</version> 37 37 </dependency> 38 38 … … 40 40 <groupId>geniusweb</groupId> 41 41 <artifactId>bidspace</artifactId> 42 <version>${geniusweb.version}</version>42 <version>${geniusweb.version}</version> 43 43 </dependency> 44 44 <dependency> 45 45 <groupId>geniusweb</groupId> 46 46 <artifactId>profileconnection</artifactId> 47 <version>${geniusweb.version}</version>47 <version>${geniusweb.version}</version> 48 48 </dependency> 49 49 <dependency> … … 188 188 <groupId>org.apache.maven.plugins</groupId> 189 189 <artifactId>maven-javadoc-plugin</artifactId> 190 <version> 2.10.1</version>190 <version>3.2.0</version> 191 191 <executions> 192 192 <execution> … … 195 195 <goal>jar</goal> 196 196 </goals> 197 <configuration>198 <additionalparam>${javadoc.opts}</additionalparam>199 <additionalparam>-Xdoclint:none</additionalparam>200 </configuration>201 197 </execution> 202 198 </executions> -
exampleparties/timedependentparty/src/main/java/geniusweb/exampleparties/timedependentparty/ExtendedUtilSpace.java
r10 r24 21 21 public class ExtendedUtilSpace { 22 22 private LinearAdditive utilspace; 23 private BigDecimal tolerance; // utility tolerance for a bid. 23 /** 24 * The tolerance for a utility. Generally utilities can be this amount 25 * smaller than requested. See also {@link #computeTolerance()}. 26 */ 27 private BigDecimal tolerance; 24 28 private BidsWithUtility bidutils; 25 29 // min and max achievable utility … … 92 96 93 97 /** 94 * @param utilityGoal 95 * @return bids with utility inside [utilitygoal-tolerance, utilitygoal] 98 * @param utilityGoal the requested utility 99 * @return bids with utility inside [utilitygoal-{@link #tolerance}, 100 * utilitygoal] 96 101 */ 97 102 public ImmutableList<Bid> getBids(BigDecimal utilityGoal) { -
exampleparties/timedependentparty/src/main/java/geniusweb/exampleparties/timedependentparty/TimeDependentParty.java
r21 r24 34 34 * brute-force search through the bidspace and can handle bidspace sizes up to 35 35 * 2^31 (approx 1 billion bids). It may take excessive time and run out of time 36 * on bidspaces >10000 bids. In special cases it may even run out of memory,36 * on bidspaces > 10000 bids. In special cases it may even run out of memory, 37 37 */ 38 38 public class TimeDependentParty extends DefaultParty { … … 104 104 * behaviour [1]: 105 105 * 106 * 1. Boulware: For this strategy e <1 and the initial offer is106 * 1. Boulware: For this strategy e < 1 and the initial offer is 107 107 * maintained till time is almost exhausted, when the agent concedes 108 108 * up to its reservation value. 109 109 * 110 * 2. Conceder: For this strategy e >1 and the agent goes to its110 * 2. Conceder: For this strategy e > 1 and the agent goes to its 111 111 * reservation value very quickly. 112 112 * -
exampleparties/timedependentparty/src/test/java/geniusweb/exampleparties/timedependentparty/TimeDependentPartyTest.java
r21 r24 8 8 import static org.mockito.Mockito.mock; 9 9 import static org.mockito.Mockito.verify; 10 import static org.mockito.Mockito.when; 10 11 11 12 import java.io.IOException; … … 35 36 import geniusweb.connection.ConnectionEnd; 36 37 import geniusweb.inform.ActionDone; 38 import geniusweb.inform.Agreements; 37 39 import geniusweb.inform.Finished; 38 40 import geniusweb.inform.Inform; … … 181 183 party.connect(connection); 182 184 party.notifyChange(settings); 183 party.notifyChange(new Finished(null)); 185 Agreements agreements = mock(Agreements.class); 186 when(agreements.toString()).thenReturn("agree"); 187 188 party.notifyChange(new Finished(agreements)); 184 189 185 190 verify(reporter).log(eq(Level.INFO), 186 eq("Final ourcome:Finished[ null]"));191 eq("Final ourcome:Finished[agree]")); 187 192 } 188 193
Note:
See TracChangeset
for help on using the changeset viewer.