1 | package agents.anac.y2014.BraveCat.AcceptanceStrategies;
|
---|
2 |
|
---|
3 | import java.io.Serializable;
|
---|
4 | import java.util.HashMap;
|
---|
5 |
|
---|
6 | import agents.anac.y2014.BraveCat.OfferingStrategies.OfferingStrategy;
|
---|
7 | import agents.anac.y2014.BraveCat.OpponentModels.OpponentModel;
|
---|
8 | import agents.anac.y2014.BraveCat.necessaryClasses.NegotiationSession;
|
---|
9 | import agents.anac.y2014.BraveCat.necessaryClasses.Schedular;
|
---|
10 | import genius.core.NegotiationResult;
|
---|
11 | import genius.core.boaframework.Actions;
|
---|
12 | import genius.core.boaframework.BoaType;
|
---|
13 | import genius.core.boaframework.SharedAgentState;
|
---|
14 | import genius.core.protocol.BilateralAtomicNegotiationSession;
|
---|
15 |
|
---|
16 | public 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 | } |
---|