Skip to content

Commit bc10d4a

Browse files
committed
Some updates about FML ...
1 parent e698d77 commit bc10d4a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pyit2fls/FML.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
import xml.etree.ElementTree as ET
2+
from pyit2fls import (T1Mamdani, T1TSK, )
23

34
class FML:
45

56
def __init__(self, ):
67
pass
78

9+
def generate(self, variables, rules):
10+
if rules["type"] == "mamdani":
11+
sys = T1Mamdani()
12+
elif rules["type"] == "takagi-sugeno":
13+
sys = T1TSK()
14+
else:
15+
raise ValueError(f"Unknown system type: {rules["type"]}")
16+
817
def parse_fml(self, fml_xml_string):
918
"""
1019
Parses FML XML and populates FuzzyVariable and FuzzySet objects.

0 commit comments

Comments
 (0)