Changeset 20 for exampleparties/timedependentparty
- Timestamp:
- 08/05/20 09:42:15 (4 years ago)
- Location:
- exampleparties/timedependentparty
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
exampleparties/timedependentparty/pom.xml
r19 r20 6 6 <groupId>geniusweb.exampleparties</groupId> 7 7 <artifactId>timedependentparty</artifactId> 8 <version>1.4. 2</version> <!-- must equal ${geniusweb.version} -->8 <version>1.4.4</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.4. 2</geniusweb.version>19 <geniusweb.version>1.4.4</geniusweb.version> 20 20 </properties> 21 21 -
exampleparties/timedependentparty/src/main/java/geniusweb/exampleparties/timedependentparty/TimeDependentParty.java
r18 r20 126 126 127 127 Action myAction; 128 if (bid == null || lastReceivedBid != null128 if (bid == null || (lastReceivedBid != null 129 129 && utilspace.getUtility(lastReceivedBid) 130 .compareTo(utilspace.getUtility(bid)) >= 0) {130 .compareTo(utilspace.getUtility(bid)) >= 0)) { 131 131 // if bid==null we failed to suggest next bid. 132 132 myAction = new Accept(me, lastReceivedBid); … … 155 155 BigDecimal utilityGoal = utilityGoal(time, getE()); 156 156 ImmutableList<Bid> options = extendedspace.getBids(utilityGoal); 157 if (options.size() == BigInteger.ZERO) 158 return null; 157 if (options.size() == BigInteger.ZERO) { 158 // if we can't find good bid, get max util bid.... 159 options = extendedspace.getBids(extendedspace.getMax()); 160 } 159 161 // pick a random one. 160 162 return options.get(new Random().nextInt(options.size().intValue()));
Note:
See TracChangeset
for help on using the changeset viewer.