This package implements a simple normalized fuzzy solver
- Retains info about the fuzzy variables
- List of linguistic values
- Meaning function for each linguistic value
- Define the operators and parameters used in each operator(minimum, maximum, union, intersect, etc)
-
Define your fuzzy variables
a) Base variables b) Linguistic values c) Meaning functions
-
Decide on wich operators to use for each operator(and, or, union, intersection, etc) in your logic
-
Use fuzzyRule.py computeRules function
The rules are executed from left to right.
A and B or C -> [ [A, B, C], [and, or] ]
A or B and C -> [ [ [A, B], C], [or, and] ]
A and B or C and D -> [ [ [A, B], [C, D]], [and, or, and] ]
A and (B or C) -> [ [A, [B, C] ], [and, or]]
A and (B or C or D) and D -> [ [A, [B, C, D], D], [and, or, or, and] ]
BASE_VARIABLES = List[float]
MEANING = List[Dict[str,float]]
FUZZY_VARS = List[FuzzyVar]
FUZZY_RULES = List[Tuple[List[Any '''float or list'''], List[Callable[[float,float], float]]]]