|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectclarion.acs.net.auxiliary.TLRule
clarion.acs.net.RerRule
clarion.acs.net.RerRuleEx
Field Summary | |
protected int[][] |
dimGenSpecInfo
used for which dimension of conditions can be generalized or specialized only record the valid dimensions which has non-zero values in its elements 1st dimension contains the indices of all the valid dimensions. |
protected int |
genIdx
indicating the dimension which can generalized at the most priority. |
protected float[][] |
genStats
record statistics of all the dimensions of conditions in order to determine which dimension will be generalized. |
protected int[] |
specIdx
indicating the dimension and one of its elements which can be specialized at the most priority. |
protected float[][][] |
specStats
record statistics of all the values in conditions in order to determine which dimension will be specialized. |
protected int |
VALID_DIM_NUM
VALID_DIM_NUM means the # of dimensions which has non-zero elements. |
Fields inherited from class clarion.acs.net.RerRule |
actionMatchFlag, BASIC_MATCH, basicCondMatchFlag, basicMatchFlag, c1, c2, condValNums, extractFlag, geneCondMatchFlag, geneFlag, geneMatchFlag, GENERAL_MATCH, genSpecMode, MATCH_ALL_FLAG, NM, PM, potentialLocs, RATE, specFlag, statistics, WITH, WITHOUT |
Fields inherited from class clarion.acs.net.auxiliary.TLRule |
attributes, blaOption, conditions, CONTROL_OUTPUT_DIM_NUM, CONTROL_OUTPUT_NUM, controlOutputDVs, controlOutputOffsets, DIFF_DIM_IDX, DISCOUNT, global, INPUT_DIM_NUM, INPUT_NUM, inputConditions, inputDVs, inputOffsets, netIdx, OUTPUT_DIM_NUM, OUTPUT_NUM, outputDVs, outputOffsets, partialMatchFlag, ruleCost, ruleSupport, ruleType, setIdx, subsysIdx, suggestedAction, taskClarion |
Constructor Summary | |
RerRuleEx(int subsysIdx,
int netIdx,
Global g,
short[] state,
short[][][] action,
boolean mFlag,
int vDimNum)
constructor. |
Method Summary | |
boolean |
canGeneralized()
Returns if this rule can be generalized. |
boolean |
canSpecialized()
Returns if this rule can be specialized. |
protected java.lang.Object |
clone()
methods from class Object |
void |
discountStatistics()
Discounts the rule statistics after each trial. |
void |
generalizeADim()
Generalize one dimension. |
int |
getDimGenSpecInfoIdx(int idx)
Returns the generalization/specialization info. |
double[] |
getMaxGenMatches()
Returns the maximal matches from generalization. |
double[] |
getMaxMatches(int mode)
Returns the maximal matches with specific mode. |
double[] |
getMaxSpecMatches()
Returns the maximal matches from specialization. |
void |
resetStatistics()
Resets statistics. |
void |
setDimGenSpecInfo(int[][] info)
Sets the generalization/specialization info. |
void |
setGenStats(float[][] info)
Sets the generalization statistics. |
void |
setSpecStats(float[][][] info)
Sets the specialization statistics. |
void |
setValidDims(short[] state)
Sets the valid dimensions from current state. |
void |
specializeADim()
Specialize one dimension. |
void |
updateStatistics(boolean successFlag,
int matchMode)
Updates the rule statistics whenever a match exists. |
Methods inherited from class clarion.acs.net.RerRule |
addCondition, decideAction, delCondition, equals, getMatchRate, getMaxIGLoc, getMaxMatches, hashCode, isBasicConditionMatched, isBasicMatched, isExtracted, isGenerailized, isGeneralConditionMatched, isGeneralMatched, isSpecialized, matchAction, searchMaxIGLoc, setCondValNums, setGenerailizedFlag, setPotentialLocs, setSpecializedFlag, setStatistics, toString, update, updateMatchAll |
Methods inherited from class clarion.acs.net.auxiliary.TLRule |
aging, calcBLA, calcRT, calcTLDT, convertToInputConditions, cover, getAction, getActionChunk, getAge, getCondition, getCondition, getNM, getPM, getResponseTime, getRuleSupport, getUtility, isActionMatched, isConditionMatched, setAge, setAttributes, setCondition, setNM, setPM, update |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected float[][][] specStats
protected float[][] genStats
protected int[][] dimGenSpecInfo
protected int VALID_DIM_NUM
protected int genIdx
protected int[] specIdx
Constructor Detail |
public RerRuleEx(int subsysIdx, int netIdx, Global g, short[] state, short[][][] action, boolean mFlag, int vDimNum)
netIdx
- the network index.state
- current state.action
- current action.mFlag
- match-all flag.Method Detail |
public void setValidDims(short[] state)
state
- current state.public int getDimGenSpecInfoIdx(int idx)
idx
- index to one dimension.
public double[] getMaxMatches(int mode)
public double[] getMaxGenMatches()
public double[] getMaxSpecMatches()
public void setDimGenSpecInfo(int[][] info)
public void setGenStats(float[][] info)
public void setSpecStats(float[][][] info)
public void resetStatistics()
resetStatistics
in class RerRule
public boolean canGeneralized()
canGeneralized
in class RerRule
public boolean canSpecialized()
canSpecialized
in class RerRule
public void generalizeADim()
public void specializeADim()
public void updateStatistics(boolean successFlag, int matchMode)
updateStatistics
in class RerRule
successFlag
- indicate current step is successful or not.public void discountStatistics()
discountStatistics
in class RerRule
protected java.lang.Object clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |