source: src/main/java/negotiator/onetomany/Utility.java@ 228

Last change on this file since 228 was 228, checked in by Tim Baarslag, 5 years ago

Fixed one-to-many errors

File size: 936 bytes
Line 
1package negotiator.onetomany;
2
3public class Utility
4{
5 Bid bid;
6
7 public Utility()
8 {
9 Product redProduct = new Product("Red");
10 Product pinkProduct = new Product("Pink");
11 Product blueProduct = new Product("Blue");
12
13 Bid desiredBid = new Bid();
14 desiredBid.setQuantity(redProduct, 4);
15 desiredBid.setQuantity(pinkProduct, 4);
16 desiredBid.setQuantity(blueProduct, 2);
17 }
18}
19
20
21//
22// for (Product product : portfolio.getPortfolio())
23// demandPlan.setQuantity(product, (int)(Math.random()*numType+1));
24//
25//
26// double weight[]= {0.6,0.3,0.1};
27//
28// for (Product product : bid.getBid().keySet())
29// {
30// Integer q = bid.getQuantity(product);
31//
32// int sum += Abs(desierdQTY[bid.getKeys()]-q)*weight[product];
33// }
34//
35//this.getUtility=sum
36//
37// this.utility = new ArrayList<Product>();
38// }
39//
40// double getUtility(Bid b)
41// {
42//
43// return
44// }
Note: See TracBrowser for help on using the repository browser.