Changeset 24 for exampleparties/timedependentparty
- Timestamp:
- 10/06/20 13:12:20 (4 years ago)
- Location:
- exampleparties/timedependentparty
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
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.