|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--infosapient.system.ObservableImpl | +--infosapient.system.FzySystemComponent | +--infosapient.system.FzyTorquemada
Class FzyTorquemada is responsible for controlling the execution of the rules within the knowledgebase.
Explaination system is built into FzyTorquemada to help explain:
Note: The explaination facility is not implemented.
Scheduled for version BOSON.
Field Summary | |
private FzyCorrelation |
corrMth
|
private FzyResolutionMethod |
defuzzMth
|
private FzyAttribute |
endGoal
The goal to be solved during the consultation session. |
private FzyImplicationMethod |
implicMth
|
private FzyAttribute |
outputAttribute
|
private FzySolutionSet |
outputSpace
|
private double[] |
result
|
private FSEvent |
runTimeEvent
|
(package private) static long |
serialVersionUID
|
private boolean |
suppressNotification
Used to suppress explainatory messages, warnings, etc, when being used in Server mode. |
private java.util.Date |
theDate
|
private FzyKnowledgebase |
theKB
|
Fields inherited from class infosapient.system.FzySystemComponent |
DEBUG_,
myID,
name,
pcs,
serialVersionUID,
trace,
vcs |
Fields inherited from class infosapient.system.ObservableImpl |
arr,
changed,
obs,
serialVersionUID |
Constructor Summary | |
FzyTorquemada()
Default constructor for this executive |
|
FzyTorquemada(FzyKnowledgebase kb)
Constructor used to execute within visual environment |
|
FzyTorquemada(FzyKnowledgebase kb,
boolean rt)
Constructor used to notify Executive that no information messages will be output during rule processing. |
Method Summary | |
private FzyAttribute |
buildOutputSpace()
|
private FzyClauseComponent |
evaluateComponent(FzyClauseComponent fcc)
Attempt to evaluate the FzyClauseComponent. |
private void |
evaluateRule(FzyRule aRule)
Evaluate the premise to see if we can determine the consequent. |
void |
run()
Determine the value of the knowledgebase current goal. |
private FzyAttribClause |
solveGoal(FzyAttribClause currentGoal)
Attempt to find the solution of the currentGoal by finding out which rules solve for this goal
and then executing those rules. |
Methods inherited from class infosapient.system.FzySystemComponent |
addPropertyChangeListener,
addVetoableChangeListener,
equals,
getID,
getName,
getPropertyChangeSupport,
getVetoableChangeSupport,
hashCode,
printOn,
removePropertyChangeListener,
removeVetoableChangeListener,
setID,
setName |
Methods inherited from class infosapient.system.ObservableImpl |
addObserver,
clearChanged,
containsObserver,
countObservers,
deleteObserver,
deleteObservers,
hasChanged,
notifyObservers,
notifyObservers,
setChanged |
Methods inherited from class java.lang.Object |
|
Field Detail |
private double[] result
static final long serialVersionUID
private FzyKnowledgebase theKB
private FzySolutionSet outputSpace
private FzyAttribute outputAttribute
private transient java.util.Date theDate
private FzyCorrelation corrMth
private FzyResolutionMethod defuzzMth
private FzyImplicationMethod implicMth
private FzyAttribute endGoal
private FSEvent runTimeEvent
private boolean suppressNotification
Constructor Detail |
public FzyTorquemada()
public FzyTorquemada(FzyKnowledgebase kb) throws java.lang.IllegalArgumentException
public FzyTorquemada(FzyKnowledgebase kb, boolean rt)
Method Detail |
private FzyAttribute buildOutputSpace()
private FzyClauseComponent evaluateComponent(FzyClauseComponent fcc) throws java.lang.CloneNotSupportedException, FzySystemException
(FzyAttribClause | FzyOperator) (FzyAttribClause)
FzyOperator
/ \
/ \
(etc.) (FzyAttribClause)
If the FzyClauseComponent has a solution, return the FzyClauseComponent.
If the FzyClauseComponent instanceof
FzyOperator, evaluate the tree, using
evaluateComponent(FzyClauseComponent)
.
If the FzyClauseComponent isNOT an instance of FzyOperator, the FzyClauseComponent will
be an instance of FzyAttribClause. Evaluate FzyAttribClause by invoking solveGoal(FzyAttribClause)
.
FzyClauseComponent
- -- the clause component to be evaluated.FzyClauseComponent
,
FzyAttribClause
,
FzyAttribClause.getGoal()
,
FzyOperator
private void evaluateRule(FzyRule aRule) throws java.lang.IllegalArgumentException
solveGoal
to put the current unknown premise attribute
on the solveGoal agenda.
Invoke evaluateComponent to get the DOM(degree of membership) of the premise goal. We check for DOM > 0.0 because we don't need to do any work if the premise DOM is 0.0.
We check for dm < 1.0 because if dm == 1.0 there will be no correlation/implication/resolution needed. We check altConseqGoal() != null.
If above checks succeed: Apply the inverse of the degree of membership (1.0 - dm) of the primary consequent goal to the alternateConsequentGoal. This is done because the alternate goal has membership only to the extent that the primary goal does NOT have membership.
FzyRule
- the rule to be evaluated.public void run()
Procedure solveGoal (FzyAttribClause goal)FzyAttribClause goal: the FzyAttribClause containing the attribute we need to solve.end procedureif FzyAttribClause{goal} has a solution
Return FzyAttribClause{goal}.end if
Get the list of all rules within the knowledgebase who's consequent solves the current goal attribute.if the rule list is not empty
for each rule whose consequent determines the goal attributeelse (the rule list is empty)do
invoke evaluateRule(aFuzzyRule) with the ruleend doAsk the user for the value of the goal attribute. Set the current domain value of the goal attribute to the value supplied by the user.end ifReturn the FzyAttribClause.
procedure evaluateRule(FzyRule aRule)
aRule: the rule to be attempted by evaluateRuleend procedurefor each component (FzyClauseComponent) in the premise of aRule do
invoke evaluateComponent with FzyClauseComponent fccend ifif the degree of membership of the solution of FzyClauseComponent{fcc} is >0.0
then
end if
- correlate the degree of membership of the solution of fcc with the goal of the consequent
- use the selected implication method to add the correlated set of the consequents goal
- apply the selected resolution method to obtain the degree of membership for the consequents goal.
if the degree of membership of the solution of FzyClauseComponent{fcc} is < 1.0
then
- correlate (1.0 - DOM of fcc) with the alternate consequent goal
- use the selected implication method to add the correlated set to the alternate consequents goal
- apply the selected resolution method to obtain the degree of membership for the alternate consequents goal.
end for
procedure evaluateComponent(FzyClauseComponent fcc)
FzyClauseComponent fcc: The clause component to be evaluated. A FzyClauseComponent can be an instance of FzySet, FzyAttribute, FzyAttribClause, or FzyOperator.
if FzyClauseComponent{fcc} has a solution
then
return FzyClauseComponent{fcc}
end if
if FzyClauseComponent{fcc} is instanceof FzyOperator
then
if (FzyOperator) fcc left child DOES NOT have a solution
then
invoke evaluateComponent((FzyOperator) fcc.leftchild);
end if
if (FzyOperator) fcc right child DOES NOT have a solution
then
invoke evaluateComponent((FzyOperator) fcc.rightchild);
end ifinvoke (FzyOperator) fcc.apply(fcc.leftChild, fcc.rightChild);
elseinvoke solveGoal(FzyClauseComponent{fcc})
end if
return FzyClauseComponent{fcc};
end procedure
private FzyAttribClause solveGoal(FzyAttribClause currentGoal) throws java.lang.IllegalArgumentException
currentGoal
by finding out which rules solve for this goal
and then executing those rules.infosapient.system.FzyAttribClause
- the goal to be solved for.
|
License to use this program is provided under the TERMS OF THE COMMON PUBLIC LICENSE 0.5. ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |