Changeset 10 for exampleparties/timedependentparty/src/main
- Timestamp:
- 01/28/20 10:19:54 (5 years ago)
- Location:
- exampleparties/timedependentparty/src/main/java/geniusweb/exampleparties/timedependentparty
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
exampleparties/timedependentparty/src/main/java/geniusweb/exampleparties/timedependentparty/ExtendedUtilSpace.java
r4 r10 11 11 import geniusweb.issuevalue.Bid; 12 12 import geniusweb.issuevalue.Value; 13 import geniusweb.profile.utilityspace.LinearAdditive UtilitySpace;13 import geniusweb.profile.utilityspace.LinearAdditive; 14 14 import tudelft.utilities.immutablelist.ImmutableList; 15 15 … … 20 20 */ 21 21 public class ExtendedUtilSpace { 22 private LinearAdditive UtilitySpaceutilspace;22 private LinearAdditive utilspace; 23 23 private BigDecimal tolerance; // utility tolerance for a bid. 24 24 private BidsWithUtility bidutils; … … 27 27 private BigDecimal maxUtil; 28 28 29 public ExtendedUtilSpace(LinearAdditive UtilitySpacespace) {29 public ExtendedUtilSpace(LinearAdditive space) { 30 30 this.utilspace = space; 31 31 bidutils = new BidsWithUtility(utilspace); -
exampleparties/timedependentparty/src/main/java/geniusweb/exampleparties/timedependentparty/TimeDependentParty.java
r8 r10 4 4 import java.math.BigDecimal; 5 5 import java.math.BigInteger; 6 import java.net.URI;7 import java.net.URISyntaxException;8 6 import java.util.Arrays; 9 7 import java.util.HashSet; … … 24 22 import geniusweb.party.inform.YourTurn; 25 23 import geniusweb.profile.Profile; 26 import geniusweb.profile.utilityspace.LinearAdditive UtilitySpace;24 import geniusweb.profile.utilityspace.LinearAdditive; 27 25 import geniusweb.profileconnection.ProfileConnectionFactory; 28 26 import geniusweb.profileconnection.ProfileInterface; 29 27 import geniusweb.progress.Progress; 30 28 import geniusweb.progress.ProgressRounds; 31 import geniusweb.references.ProtocolRef;32 29 import tudelft.utilities.immutablelist.ImmutableList; 33 30 import tudelft.utilities.logging.Reporter; … … 44 41 private static final BigDecimal DEC100 = new BigDecimal("100"); 45 42 private ProfileInterface profileint; 46 private LinearAdditive UtilitySpaceutilspace = null; // last received space43 private LinearAdditive utilspace = null; // last received space 47 44 private PartyId me; 48 45 private Progress progress; … … 61 58 @Override 62 59 public Capabilities getCapabilities() { 63 try { 64 return new Capabilities(new HashSet<>( 65 Arrays.asList(new ProtocolRef(new URI("SAOP"))))); 66 } catch (URISyntaxException e) { 67 getReporter().log(Level.SEVERE, "Failed to create capabilities URI", 68 e); 69 return null; 70 } 60 return new Capabilities(new HashSet<>(Arrays.asList("SAOP"))); 71 61 } 72 62 … … 148 138 } 149 139 150 private LinearAdditive UtilitySpace updateUtilSpace(){140 private LinearAdditive updateUtilSpace() throws IOException { 151 141 Profile newutilspace = profileint.getProfile(); 152 142 if (!newutilspace.equals(utilspace)) { 153 utilspace = (LinearAdditive UtilitySpace) newutilspace;143 utilspace = (LinearAdditive) newutilspace; 154 144 extendedspace = new ExtendedUtilSpace(utilspace); 155 145 }
Note:
See TracChangeset
for help on using the changeset viewer.