source: src/main/java/bargainingchips/actions/Bid.java@ 343

Last change on this file since 343 was 339, checked in by Faria Nassiri Mofakham, 5 years ago

BargainingChips creates bob calling BargainingBuyer. OutcomeSpace is Iterable<Bundle>, also getAllBids, getRandom, getRandom(r), getAverageUtility(u), size(), checkReadyForNegotiation, getName(), getUtility(u, b), getReservationValue(u), and getDiscountFactor added. An update on Bid getSampleBid type. An update on Agent. A history' package of BidEvent, BidEventHistory, BidEventHisoryKeeper, BidEventSortedUtility, and BidEventStrictSortedUtility added. HistoryAgent added. An analysis' package of BundleUtilityPoint, BundleUtilitySpace, and ParetoFrontier added. BargainingAgent added. TitForTatNegotiationAgent. Now, Buyer extended to BargainingBuyer which is created using Boulware or TitForTatNegotiationAgent using one among 9 utility functions. Name of strategy added toDescription in BoulwareAgent. A few small updates on several utility function classes.

File size: 736 bytes
Line 
1package bargainingchips.actions;
2
3import java.util.Iterator;
4
5import bargainingchips.Bundle;
6import bargainingchips.BundleBuilder;
7
8public class Bid extends Offer //implements Iterable<Bid>
9{
10 /**
11 * Creates a bid. Bundle is immutable and therefore so is Offer.
12 */
13 public Bid(Bundle b)
14 {
15 super(b, OfferType.BID);
16 }
17
18 /**
19 * Just a sample example of a bid
20 */
21 public static Bundle getSampleBid(String color, int qty)
22 {
23 Bundle b = new BundleBuilder()
24 .addStack(color, 7.0, qty)
25 .build();
26 return b;
27 }
28
29
30 @Override
31 public String toString()
32 {
33 return "Bid: " + getBundle();
34 }
35
36// @Override
37// public Iterator<Bid> iterator() {
38// return b.keySet().iterator();
39// }
40}
Note: See TracBrowser for help on using the repository browser.