source: src/main/java/agents/anac/y2014/BraveCat/OfferingStrategies/OfferingStrategy.java

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

#41 ROLL BACK of rev.126 . So this version is equal to rev. 125

File size: 1.9 KB
Line 
1package agents.anac.y2014.BraveCat.OfferingStrategies;
2
3import java.io.Serializable;
4import java.util.HashMap;
5
6import agents.anac.y2014.BraveCat.OpponentModelStrategies.OMStrategy;
7import agents.anac.y2014.BraveCat.OpponentModels.OpponentModel;
8import agents.anac.y2014.BraveCat.necessaryClasses.NegotiationSession;
9import agents.anac.y2014.BraveCat.necessaryClasses.Schedular;
10import genius.core.NegotiationResult;
11import genius.core.bidding.BidDetails;
12import genius.core.boaframework.BoaType;
13import genius.core.boaframework.SharedAgentState;
14
15public abstract class OfferingStrategy {
16 protected Schedular schedular;
17 protected BidDetails nextBid;
18 protected NegotiationSession negotiationSession;
19 protected OpponentModel opponentModel;
20 protected OMStrategy omStrategy;
21 protected SharedAgentState helper;
22 protected boolean endNegotiation;
23
24 public void init(NegotiationSession negotiationSession, OpponentModel opponentModel, OMStrategy omStrategy,
25 HashMap<String, Double> parameters) throws Exception {
26 this.negotiationSession = negotiationSession;
27 this.opponentModel = opponentModel;
28 this.omStrategy = omStrategy;
29 this.endNegotiation = false;
30 this.schedular = new Schedular(negotiationSession);
31 }
32
33 public abstract BidDetails determineOpeningBid();
34
35 public abstract BidDetails determineNextBid();
36
37 public BidDetails getNextBid() {
38 return this.nextBid;
39 }
40
41 public void setNextBid(BidDetails nextBid) {
42 this.nextBid = nextBid;
43 }
44
45 public SharedAgentState getHelper() {
46 return this.helper;
47 }
48
49 public boolean isEndNegotiation() {
50 return this.endNegotiation;
51 }
52
53 public final void storeData(Serializable object) {
54 this.negotiationSession.setData(BoaType.BIDDINGSTRATEGY, object);
55 }
56
57 public final Serializable loadData() {
58 return this.negotiationSession.getData(BoaType.BIDDINGSTRATEGY);
59 }
60
61 public void endSession(NegotiationResult result) {
62 }
63
64 public abstract String GetName();
65}
Note: See TracBrowser for help on using the repository browser.