Nev version + fix CPP

This commit is contained in:
marcin-szczepanski 2022-05-12 11:15:49 +02:00
parent ca8c232cdb
commit 5783f490a4
7 changed files with 25 additions and 7 deletions

View File

@ -84,7 +84,7 @@ void FunctionBlock_tipper::calc_No1() {
double x = 0.0 + i * 0.03; double x = 0.0 + i * 0.03;
double membership = membership_tip_cheap(x); double membership = membership_tip_cheap(x);
double y = ruleActivationMethod_min( degreeOfSupport_1 , membership ); double y = ruleActivationMethod_min( degreeOfSupport_1 , membership );
defuzzify_tip[i] += ruleAccumulationMethod_max( defuzzify_tip[i], y ); defuzzify_tip[i] = ruleAccumulationMethod_max( defuzzify_tip[i], y );
} }
} }
@ -95,7 +95,7 @@ void FunctionBlock_tipper::calc_No1() {
double x = 0.0 + i * 0.03; double x = 0.0 + i * 0.03;
double membership = membership_tip_average(x); double membership = membership_tip_average(x);
double y = ruleActivationMethod_min( degreeOfSupport_2 , membership ); double y = ruleActivationMethod_min( degreeOfSupport_2 , membership );
defuzzify_tip[i] += ruleAccumulationMethod_max( defuzzify_tip[i], y ); defuzzify_tip[i] = ruleAccumulationMethod_max( defuzzify_tip[i], y );
} }
} }
@ -106,7 +106,7 @@ void FunctionBlock_tipper::calc_No1() {
double x = 0.0 + i * 0.03; double x = 0.0 + i * 0.03;
double membership = membership_tip_generous(x); double membership = membership_tip_generous(x);
double y = ruleActivationMethod_min( degreeOfSupport_3 , membership ); double y = ruleActivationMethod_min( degreeOfSupport_3 , membership );
defuzzify_tip[i] += ruleAccumulationMethod_max( defuzzify_tip[i], y ); defuzzify_tip[i] = ruleAccumulationMethod_max( defuzzify_tip[i], y );
} }
} }

Binary file not shown.

View File

@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: net.sourceforge.jFuzzyLogic.JFuzzyLogic

View File

@ -1,5 +1,6 @@
package net.sourceforge.jFuzzyLogic; package net.sourceforge.jFuzzyLogic;
import net.sourceforge.jFuzzyLogic.ruleConnectionMethod.Szczepanski;
import org.antlr.runtime.RecognitionException; import org.antlr.runtime.RecognitionException;
import net.sourceforge.jFuzzyLogic.demo.tipper.TipperAnimation; import net.sourceforge.jFuzzyLogic.demo.tipper.TipperAnimation;
@ -20,10 +21,10 @@ public class JFuzzyLogic {
// Version info // Version info
public static final String SOFTWARE_NAME = "JFuzzyLogic"; public static final String SOFTWARE_NAME = "JFuzzyLogic";
public static final String REVISION = ""; public static final String REVISION = "";
public static final String BUILD = "2015-04-09"; public static final String BUILD = "2022-05-12";
public static final String VERSION_MAJOR = "3.3"; public static final String VERSION_MAJOR = "4.0";
public static final String VERSION_SHORT = VERSION_MAJOR + REVISION; public static final String VERSION_SHORT = VERSION_MAJOR + REVISION;
public static final String VERSION_NO_NAME = VERSION_SHORT + " (build " + BUILD + "), by " + Pcingola.BY; public static final String VERSION_NO_NAME = VERSION_SHORT + " (build " + BUILD + "), by " + Pcingola.BY + " and " + Szczepanski.BY;
public static final String VERSION = SOFTWARE_NAME + " " + VERSION_NO_NAME; public static final String VERSION = SOFTWARE_NAME + " " + VERSION_NO_NAME;
public static boolean debug = false; public static boolean debug = false;

View File

@ -148,7 +148,7 @@ public abstract class RuleActivationMethod extends FclObject {
out.append("\t\t\tdouble y = " + toStringCpp() + "( " + degreeOfSupportName + " , membership );\n"); out.append("\t\t\tdouble y = " + toStringCpp() + "( " + degreeOfSupportName + " , membership );\n");
// Aggregate value // Aggregate value
out.append("\t\t\t" + variable.toStringCppDefuzzifyVarName() + "[i] += " + ruleAccumulationMethod.toStringCpp() + "( " + variable.toStringCppDefuzzifyVarName() + "[i], y );\n"); out.append("\t\t\t" + variable.toStringCppDefuzzifyVarName() + "[i] = " + ruleAccumulationMethod.toStringCpp() + "( " + variable.toStringCppDefuzzifyVarName() + "[i], y );\n");
out.append("\t\t}\n"); out.append("\t\t}\n");
out.append("\t}\n"); out.append("\t}\n");
} }

View File

@ -0,0 +1,11 @@
package net.sourceforge.jFuzzyLogic.ruleConnectionMethod;
/**
* Author's data
* @author marcin-szczepanski
*/
public class Szczepanski {
public static final String EMAIL = "marcin.szczepanski@amu.edu.pl";
public static final String BY = "Marcin Szczepanski";
}

View File

@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: net.sourceforge.jFuzzyLogic.JFuzzyLogic