source: src/main/java/agents/anac/y2014/BraveCat/AcceptanceStrategies/AcceptanceStrategy.java@ 345

Last change on this file since 345 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.8 KB
Line 
1package agents.anac.y2014.BraveCat.AcceptanceStrategies;
2
3import java.io.Serializable;
4import java.util.HashMap;
5
6import agents.anac.y2014.BraveCat.OfferingStrategies.OfferingStrategy;
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.boaframework.Actions;
12import genius.core.boaframework.BoaType;
13import genius.core.boaframework.SharedAgentState;
14import genius.core.protocol.BilateralAtomicNegotiationSession;
15
16public abstract class AcceptanceStrategy {
17 protected Schedular schedular;
18 protected NegotiationSession negotiationSession;
19 protected OfferingStrategy offeringStrategy;
20 protected SharedAgentState helper;
21 protected OpponentModel opponentModel;
22
23 public void init(NegotiationSession negotiationSession, OfferingStrategy offeringStrategy,
24 OpponentModel opponentModel, HashMap<String, Double> parameters) throws Exception {
25 this.negotiationSession = negotiationSession;
26 this.offeringStrategy = offeringStrategy;
27 this.opponentModel = opponentModel;
28 this.schedular = new Schedular(negotiationSession);
29 }
30
31 public String printParameters() {
32 return "";
33 }
34
35 public void setOpponentUtilitySpace(BilateralAtomicNegotiationSession fNegotiation) {
36 }
37
38 public abstract Actions determineAcceptability();
39
40 public final void storeData(Serializable object) {
41 this.negotiationSession.setData(BoaType.ACCEPTANCESTRATEGY, object);
42 }
43
44 public final Serializable loadData() {
45 return this.negotiationSession.getData(BoaType.ACCEPTANCESTRATEGY);
46 }
47
48 public void endSession(NegotiationResult result) {
49 }
50
51 public boolean isMAC() {
52 return false;
53 }
54}
Note: See TracBrowser for help on using the repository browser.