Ignore:
Timestamp:
08/05/20 09:42:15 (4 years ago)
Author:
bart
Message:

Added BOA support, some bug fixes

Location:
exampleparties/timedependentparty
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • exampleparties/timedependentparty/pom.xml

    r19 r20  
    66        <groupId>geniusweb.exampleparties</groupId>
    77        <artifactId>timedependentparty</artifactId>
    8         <version>1.4.2</version> <!-- must equal ${geniusweb.version} -->
     8        <version>1.4.4</version> <!-- must equal ${geniusweb.version} -->
    99        <packaging>jar</packaging>
    1010
     
    1717                <passwd>${env.ARTIFACTORY_PASS}</passwd>
    1818                <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>
    2020        </properties>
    2121
  • exampleparties/timedependentparty/src/main/java/geniusweb/exampleparties/timedependentparty/TimeDependentParty.java

    r18 r20  
    126126
    127127                Action myAction;
    128                 if (bid == null || lastReceivedBid != null
     128                if (bid == null || (lastReceivedBid != null
    129129                                && utilspace.getUtility(lastReceivedBid)
    130                                                 .compareTo(utilspace.getUtility(bid)) >= 0) {
     130                                                .compareTo(utilspace.getUtility(bid)) >= 0)) {
    131131                        // if bid==null we failed to suggest next bid.
    132132                        myAction = new Accept(me, lastReceivedBid);
     
    155155                BigDecimal utilityGoal = utilityGoal(time, getE());
    156156                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                }
    159161                // pick a random one.
    160162                return options.get(new Random().nextInt(options.size().intValue()));
Note: See TracChangeset for help on using the changeset viewer.