@ Override public void activate ( RuleBlock ruleBlock ) { if ( FuzzyLite . isDebugging ( ) ) { FuzzyLite . logger ( ) . log ( Level . FINE , "Activation: {0} {1}" , new String [ ] { getClass ( ) . getName ( ) , parameters ( ) } ) ; } TNorm conjunction = ruleBlock . getConjunction ( ) ; SNorm disjunction = ruleBlock . getDisjunction ( ) ; TNorm implication = ruleBlock . getImplication ( ) ; double sumActivationDegrees = 0.0 ; List < Rule > rulesToActivate = new ArrayList < Rule > ( ruleBlock . getRules ( ) . size ( ) ) ; for ( Rule rule : ruleBlock . getRules ( ) ) { rule . deactivate ( ) ; if ( rule . isLoaded ( ) ) { double activationDegree = rule . activateWith ( conjunction , disjunction ) ; rulesToActivate . add ( rule ) ; sumActivationDegrees += activationDegree ; } } for ( Rule rule : rulesToActivate ) { double activationDegree = rule . getActivationDegree ( ) / sumActivationDegrees ; rule . setActivationDegree ( activationDegree ) ; rule . trigger ( implication ) ; } }
Activates the rules utilizing activation degrees proportional to the activation degrees of the other rules in the rule block .