|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectclarion.system.AbstractExplicitModule
clarion.system.AbstractRule
clarion.system.AbstractFixedRule
public abstract class AbstractFixedRule
This class implements a fixed rule within CLARION. It extends the AbstractRule class. This class is abstract and therefore cannot be instantiated on its own. All user defined fixed rules MUST extend this class.
Usage:
Fixed rules are rules within CLARION that are more complex than a simple Condition ---> Action pairing.
Some examples of fixed rules include:
Fixed rules must contain an action chunk (although a condition chunk is optional). The values of the dimension-value pairs within an action chunk can be manipulated by the rule (although the structure may not be changed).
All operations performed by the fixed rule (including matching the condition) must be specified within the "getSupport" method. The getSupport method returns a value which is equal to the support for the rule. Fixed rules are no different than any other type of rule in terms of selection. They will compete with the other rules for selection based on their support and utility.
Note also that as an option you can also override the getUtility function. By default the getUtility function for a fixed rule will simply return the DEFAULT_UTILITY constant.
This class contains both global (static) and local constants. The default is to use the local constants. If you want to change any of the global constants, you need to do so before any instances of this class are initialized.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class clarion.system.AbstractRule |
---|
AbstractRule.SelectionTypes, AbstractRule.UtilityOptions |
Field Summary | |
---|---|
double |
DEFAULT_UTILITY
The default utility for the fixed rule. |
static double |
GLOBAL_DEFAULT_UTILITY
The default utility for the fixed rule. |
Fields inherited from class clarion.system.AbstractExplicitModule |
---|
ACTUATION_TIME, C, D, DECISION_TIME, GLOBAL_ACTUATION_TIME, GLOBAL_C, GLOBAL_D, GLOBAL_DECISION_TIME, GLOBAL_INITIAL_BLA, GLOBAL_PERCEPTION_TIME, GLOBAL_WEIGHT, INITIAL_BLA, PERCEPTION_TIME, WEIGHT |
Constructor Summary | |
---|---|
AbstractFixedRule(AbstractAction act)
Initializes the fixed rule with the specified action. |
|
AbstractFixedRule(GeneralizedConditionChunk cond,
AbstractAction act)
Initializes the fixed rule with the specified condition and action. |
Method Summary | |
---|---|
abstract boolean |
covers(java.lang.Object R)
This method is overridden by the user to handle the comparing of two two rules to see if one covers the other. |
abstract boolean |
equals(java.lang.Object R)
This method is overridden by the user to handle condition matching when comparing two rules. |
abstract double |
getSupport(DimensionValueCollection CurrentInput)
Performs the user specified operations for the fixed rule. |
double |
getUtility()
Gets the utility for this fixed rule. |
Methods inherited from class clarion.system.AbstractRule |
---|
checkMatchCriterion, checkMatchCriterion, clone, covers, covers, equals, getAction, getChildren, getCondition, getFeedback, getNM, getNumChildren, getPM, getUtility, incrementNM, incrementPM, initChildren, resetChildren, resetMatchStatistics, setCurrentInput, setFeedback, setNM, setPM, toString, turnPartialMatchON, updateMatchStatistics |
Methods inherited from class clarion.system.AbstractExplicitModule |
---|
addTimeStamp, getBLA, getResponseTime |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface clarion.system.InterfaceTracksTime |
---|
addTimeStamp, getBLA |
Field Detail |
---|
public static double GLOBAL_DEFAULT_UTILITY
public double DEFAULT_UTILITY
Constructor Detail |
---|
public AbstractFixedRule(AbstractAction act)
act
- The action for the new rule.public AbstractFixedRule(GeneralizedConditionChunk cond, AbstractAction act)
cond
- The condition for the new rule.act
- The action for the new rule.Method Detail |
---|
public abstract double getSupport(DimensionValueCollection CurrentInput)
getSupport
in class AbstractRule
CurrentInput
- The current input.
public double getUtility()
getUtility
in class AbstractRule
public abstract boolean equals(java.lang.Object R)
equals
in class AbstractRule
R
- The object to compare to this rule.
public abstract boolean covers(java.lang.Object R)
R
- the object to compare to this rule.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |