source: src/main/java/negotiator/boaframework/sharedagentstate/anac2011/ValueModelAgentSAS.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.8 KB
Line 
1package negotiator.boaframework.sharedagentstate.anac2011;
2
3import genius.core.boaframework.SharedAgentState;
4
5/**
6 * This is the shared code of the acceptance condition and bidding strategy of ANAC 2011 ValueModelAgent.
7 * The code was taken from the ANAC2011 ValueModelAgent and adapted to work within the BOA framework.
8 *
9 * @author Mark Hendrikx
10 */
11public class ValueModelAgentSAS extends SharedAgentState {
12
13 private double opponentMaxBidUtil = 0;
14 private double opponentUtil = -1;
15 private double lowestApprovedInitial = 1;
16 private double plannedThreshold = 1;
17 private double lowestApproved;
18 private boolean skipAcceptDueToCrash;
19
20 public ValueModelAgentSAS() {
21 NAME = "ValueModelAgent";
22 }
23
24 public double getOpponentMaxBidUtil() {
25 return opponentMaxBidUtil;
26 }
27
28 public void setOpponentMaxBidUtil(double opponentMaxBidUtil) {
29 this.opponentMaxBidUtil = opponentMaxBidUtil;
30 }
31
32 public void setOpponentUtil(double opponentUtil) {
33 this.opponentUtil = opponentUtil;
34 }
35
36 public void setLowestApprovedInitial(double lowestApproved) {
37 lowestApprovedInitial = lowestApproved;
38 }
39
40 public double getLowestApprovedInitial() {
41 return lowestApprovedInitial;
42 }
43
44 public void setPlanedThreshold(double plannedThreshold) {
45 this.plannedThreshold = plannedThreshold;
46 }
47
48 public double getOpponentUtil() {
49 return opponentUtil;
50 }
51
52 public double getPlannedThreshold() {
53 return plannedThreshold;
54 }
55
56 public void setLowestApproved(double lowestApproved) {
57 this.lowestApproved = lowestApproved;
58 }
59
60 public double getLowestApproved() {
61 return lowestApproved;
62 }
63
64 public void triggerSkipAcceptDueToCrash() {
65 skipAcceptDueToCrash = true;
66 }
67
68 public boolean shouldSkipAcceptDueToCrash() {
69 if (skipAcceptDueToCrash) {
70 skipAcceptDueToCrash = false;
71 return true;
72 }
73 return false;
74 }
75}
Note: See TracBrowser for help on using the repository browser.