nrc.fuzzy
Class TsukamotoRuleExecutor

java.lang.Object
  |
  +--nrc.fuzzy.FuzzyRuleExecutor
        |
        +--nrc.fuzzy.TsukamotoRuleExecutor
All Implemented Interfaces:
java.lang.Cloneable, FuzzyRuleExecutorInterface, java.io.Serializable

public class TsukamotoRuleExecutor
extends FuzzyRuleExecutor
implements java.io.Serializable

Implements the FuzzyRuleExecutor interface providing an execute method that accepts a FuzzyRule object and returns a FuzzyValueVector composed of the actual conclusion FuzzyValues for the rule using the Tsukamoto rule firing method. This rule executor does expect that the output fuzzy values have special fuzzy sets. Each of the output fuzzy sets should be either a strictly increasing function with membership values from 0.0 to 1.0 or a strictly decreasing function with membership values from 1.0 to 0.0. For example, an SFuzzySet is strictly increasing from 0.0 at its left limit to 1.0 at its right limit. Then the outputs are generated from the conclusions by using the DOF (Degree of Fulfillment of the rule) which is determined by the current AntecedentCombineOperator. This is normally the MinimumAntecedentCombineOperator which calculates the maxmum membership values for all of the intesections between the input and antecedent fuzzy values and takes the minimum of those. Then using this DOF value outputs are generated by finding the X value that corresponds to this DOF in the conclusion fuzzy sets. With the X values singleton fuzzy sets are created with a maximum membership value equal to the DOF. Since the conclusions were represented by special strictly increasing or decreasing functions, the X values will be unique. To complete the Tsukamoto method the output fuzzy values should combined (global contribution) using the fuzzySum method and then defuzzified using the weightedAverageDefuzzify method.

Should the rule be fired a second time and the antecedents and inputs have not changed, it is only necessary to use the DOF already calculated to generate the outputs the consequents, avoiding some expensive calculations.
NOTE: In order to do this optimization it is required the the executor NOT be shared amongst rules. In effect each rule must have its own unique instance of the executor. This is enforced in Rule creation, since each RuleExecutor must implement the cloneable interface and provide a clone method.

See Also:
LarsenProductMaxMinRuleExecutor, MandaniMinMaxMinRuleExecutor, FuzzyRuleExecutor, AntecedentCombineOperator, MinimumAntecedentCombineOperator, ProductAntecedentCombineOperator, Serialized Form

Constructor Summary
TsukamotoRuleExecutor()
           
 
Method Summary
 java.lang.Object clone()
          Implements the required cloning of a RuleExecutor.
 nrc.fuzzy.FuzzyValueVector execute(nrc.fuzzy.FuzzyRule rule)
          This execute method implements rule execution using the Tsukamoto method.
 nrc.fuzzy.FuzzyValueVector execute(nrc.fuzzy.FuzzyValueVector antecedents, nrc.fuzzy.FuzzyValueVector conclusions, nrc.fuzzy.FuzzyValueVector inputs)
          This execute method implements rule execution using the Tsukamoto method.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TsukamotoRuleExecutor

public TsukamotoRuleExecutor()
Method Detail

clone

public java.lang.Object clone()
Implements the required cloning of a RuleExecutor.

Overrides:
clone in class java.lang.Object
Returns:
the newly cloned RuleExecutor

execute

public nrc.fuzzy.FuzzyValueVector execute(nrc.fuzzy.FuzzyRule rule)
                                   throws IncompatibleRuleInputsException
This execute method implements rule execution using the Tsukamoto method. Classes that implement the FuzzyRuleExecutor interface must provide an execute method that accepts a FuzzyRule object and returns a FuzzyValueVector composed of the actual output FuzzyValues for the rule.

Specified by:
execute in interface FuzzyRuleExecutorInterface
Parameters:
rule - the rule that is to be executed (fired)
Returns:
A FuzzyValueVector with the FuzzyValues that represent the outputs of the fired rule.
Throws:
IncompatibleRuleInputsException

execute

public nrc.fuzzy.FuzzyValueVector execute(nrc.fuzzy.FuzzyValueVector antecedents,
                                          nrc.fuzzy.FuzzyValueVector conclusions,
                                          nrc.fuzzy.FuzzyValueVector inputs)
                                   throws IncompatibleRuleInputsException
This execute method implements rule execution using the Tsukamoto method. Classes that implement the FuzzyRuleExecutor interface must provide an execute method that accepts 3 FuzzyValueVector objects and returns a FuzzyValueVector composed of the actual output FuzzyValues for the rule.

Specified by:
execute in interface FuzzyRuleExecutorInterface
Parameters:
antecedents - The FuzzyValues that represent a rule's antecedents.
conclusions - The FuzzyValues that represent a rule's conclusions.
inputs - The FuzzyValues that represent a rule's inputs.
Returns:
A FuzzyValueVector with the FuzzyValues that represent the outputs of the fired rule.
Throws:
IncompatibleRuleInputsException