jFuzzyLogic: Open Source Fuzzy Logic (Java)

Membership functions

There are several membership functions. Mainly two sub classes: Continuous and Discrete. One variable can only have Continuous or Discrete membership functions.

Usage, examples, and FCL:
Triangular


Usage: trian min mid max
FUZZIFY inVar2
	TERM poor := trian 0 2.5 5;
	TERM good := trian 2.5 5 7.5;
	TERM excellent := trian 5 7.5 10;
END_FUZZIFY
		

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Trapetzoidal


Usage: trape min midLow midHigh max
FUZZIFY inVar3
	TERM poor := trape 0 2 3 4;
	TERM good := trape 3 4 5 6;
	TERM excellent := trape 5 6 7 8;
END_FUZZIFY
		

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Gauss


Usage: gauss mean stdev
FUZZIFY inVar5
	TERM poor := gauss 2 2;
	TERM good := gauss 5 2;
	TERM excellent := gauss 8 2;
END_FUZZIFY
		

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Generalized bell


Usage: gbell a b mean
FUZZIFY inVar4
	TERM poor := gbell 2 4 2;
	TERM good := gbell 2 4 5;
	TERM excellent := gbell 2 4 8;
END_FUZZIFY
		

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Sigmoidal


Usage: sigm gain center
FUZZIFY inVar6
	TERM poor := sigm -4 3;
	TERM good := sigm 4 7;
END_FUZZIFY
		

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Singleton


Usage: just one number (where singleton value is 1)
FUZZIFY inVar7
	TERM poor := 2;
	TERM good := 5;
	TERM excellent := 8;
END_FUZZIFY
		

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Piece-wise linear


Usage: (x_1, y_1) (x_2, y_2) .... (x_n, y_n)
FUZZIFY inVar1
	TERM poor := (0,1) (2, 1) (4, 0) ; 
	TERM good := (1, 0) (2, 0.5) (3, 0.7) (4,1) (4.5, 1) 
                 (5, 0.6) (6, 0.3) (7, 0.3) (8, 0.8) (9, 0.8) (10,0);
	TERM excellent := (6, 0) (9, 1) (10,1);
END_FUZZIFY
		

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Author: Pablo Cingolani (pcingola@users.sourceforge.net)
Key words (for search engines):
Fuzzy logic
Fuzzy logic software
Fuzzy logic package
Fuzzy logic library
Fuzzy logic sourceforge sf.net
Open source
GNU
GPL LGPL
java
Windows Linux OSX
FCL
IEC 1131
IEC 61131
IEC 61131 part 7
IEC 61131-7
Fuzzy logic Wikipedia