public class QAgentType
extends java.lang.Object
QAgentsCore
,
QOAgent
Modifier and Type | Field and Description |
---|---|
static int |
ENGLAND_TYPE |
static int |
LOWER_THAN_SQ_RET_VAL |
FullUtility |
m_fullUtility |
static int |
MAX_ISSUES |
static int |
NO_TYPE |
static int |
NO_VALUE |
static double |
PRECISION_VALUE |
static int |
VERY_HIGH_NUMBER |
static int |
VERY_SMALL_NUMBER |
static int |
ZIMBABWE_TYPE |
Constructor and Description |
---|
QAgentType(boolean bEquilibriumAgent)
Initializes the agent.
|
Modifier and Type | Method and Description |
---|---|
double |
calcRejectionProbabilities(java.lang.String sRejectedMsg,
int nCurrentTurn) |
void |
calculateValues(int nCurrentTurn)
Calculate luce numbers, best agreement and worse agreement at time nTimePeriod.
|
int[] |
getAgreementIndices(java.lang.String sAgreementStr) |
double |
getAgreementLuceValue(double dAgreementValue) |
double |
getAgreementLuceValue(double dAgreementValue,
boolean calculateProbability) |
double |
getAgreementRankingProbability(int[] CurrentAgreementIdx) |
java.lang.String |
getAgreementStr(int[] CurrentAgreementIdx) |
double |
getAgreementValue(int[] CurrentAgreementIdx,
int nCurrentTurn) |
java.lang.String |
getBestAgreementStr() |
double |
getBestAgreementValue(int nCurrentTurn) |
int |
getIssuesNum() |
int |
getMaxIssueValue(int nIssueNum) |
double |
getMaxValue() |
double |
getSQValue() |
int |
getTotalAgreements() |
double |
getTypeProbability() |
java.lang.String |
getWorstAgreementStr() |
double |
getWorstAgreementValue(int nCurrentTurn) |
boolean |
isIssueValueNoAgreement(int nIssueNum,
int nIssueNumIdx) |
boolean |
isTypeOf(int nAgentType) |
void |
printRankings() |
void |
printValuesToFile(java.lang.String sSourceFileName) |
void |
setAgentType(int nType)
Sets the agent type - either NO_TYPE, ENGLAND_TYPE or ZIMBABWE_TYPE
|
void |
setTypeProbability(double dProbability)
Sets the probability of the type
|
public static final double PRECISION_VALUE
public static final int VERY_SMALL_NUMBER
public static final int VERY_HIGH_NUMBER
public static final int LOWER_THAN_SQ_RET_VAL
public static final int MAX_ISSUES
public static final int NO_VALUE
public FullUtility m_fullUtility
public static final int NO_TYPE
public static final int ENGLAND_TYPE
public static final int ZIMBABWE_TYPE
public int getIssuesNum()
public int getMaxIssueValue(int nIssueNum)
nIssueNum
- - the issue numberpublic int getTotalAgreements()
public void setAgentType(int nType)
nType
- - the agent's typepublic double getSQValue()
public double getMaxValue()
public void calculateValues(int nCurrentTurn)
nTimePeriod
- - the time period for the agreementpublic double calcRejectionProbabilities(java.lang.String sRejectedMsg, int nCurrentTurn)
public void printRankings()
public boolean isTypeOf(int nAgentType)
nAgentType
- - the agent's type (either NO_TYPE, ENGLAND_TYPE or ZIMBABWE_TYPE)public double getBestAgreementValue(int nCurrentTurn)
public java.lang.String getBestAgreementStr()
public double getWorstAgreementValue(int nCurrentTurn)
public java.lang.String getWorstAgreementStr()
public double getAgreementRankingProbability(int[] CurrentAgreementIdx)
public double getAgreementLuceValue(double dAgreementValue)
dAgreementValue
- - the agreement valuepublic double getAgreementLuceValue(double dAgreementValue, boolean calculateProbability)
public double getAgreementValue(int[] CurrentAgreementIdx, int nCurrentTurn)
CurrentAgreementIdx
- - indices of the agreementpublic java.lang.String getAgreementStr(int[] CurrentAgreementIdx)
CurrentAgreementIdx
- - indices of the agreementpublic boolean isIssueValueNoAgreement(int nIssueNum, int nIssueNumIdx)
public void setTypeProbability(double dProbability)
dProbability
- - the new probabilitypublic double getTypeProbability()
public int[] getAgreementIndices(java.lang.String sAgreementStr)
public void printValuesToFile(java.lang.String sSourceFileName)