source: src/main/java/agents/anac/y2014/E2Agent/myUtility/BidStorage.java

Last change on this file was 1, checked in by Wouter Pasman, 6 years ago

Initial import : Genius 9.0.0

File size: 2.2 KB
Line 
1package agents.anac.y2014.E2Agent.myUtility;
2
3import java.io.Serializable;
4import java.util.ArrayList;
5import java.util.Collection;
6import java.util.Collections;
7import java.util.Comparator;
8import java.util.HashMap;
9import java.util.List;
10import java.util.Random;
11
12import agents.anac.y2011.TheNegotiator.BidsCollection;
13import agents.anac.y2012.MetaAgent.agents.WinnerAgent.opponentOffers;
14import genius.core.Agent;
15import genius.core.Bid;
16import genius.core.actions.Accept;
17import genius.core.actions.Action;
18import genius.core.actions.Offer;
19import genius.core.issue.Issue;
20import genius.core.issue.IssueInteger;
21import genius.core.issue.Value;
22import genius.core.issue.ValueInteger;
23import genius.core.timeline.Timeline;
24import genius.core.utility.*;
25
26
27
28public class BidStorage implements Serializable {
29 private double utility = -1;
30 private Bid bid = null;
31 private double time = -1;
32
33 public BidStorage(Bid b, double u, double t) {
34 bid = b;
35 utility = u;
36 time = t;
37 }
38
39 public Bid getBid() { return bid; }
40 public double getUtility() { return utility; }
41 public double getTime() { return time; }
42 public String toString() {
43 return bid.toString() + " Utility: " + utility + " Time: " + time;
44 }
45
46 // /**
47 // * ��形��る確率を返�
48 // * @param u 効用
49 // * @param t1 経�時間0~1
50 // * @return ��形��る確率
51 // * @throws u�t1��正�値�時
52 // */
53 // double Paccept(double u, double t1) throws Exception {
54 // double t = t1 * t1 * t1;
55 // // 正�化�る�u�1.0以上��る時��る��1.05��る
56 // if(u < 0 || u > 1.05) throw new Exception("utility "+u+" outside [0,1]");
57 // if(t < 0 || t > 1) throw new Exception("time "+t+" outside [0,1]");
58 // if(u > 1.0) u = 1;
59 // if(t == 0.5) return u;
60 // return (u - 2.0 * u * t + 2.0 * (-1.0 + t + Math.sqrt(sq(-1.0 + t) + u * (-1.0 + 2 * t))))/(-1. + 2*t);
61 // }
62}
Note: See TracBrowser for help on using the repository browser.