home › Forums › # Technical Support › JAVA API › Reply To: JAVA API
(1) I think jfuzzylite has an issue with Trapezoids when a=b and c=d, that is, when the trapezoids are rectangles. Please, change your Trapezoid for a Rectangle
new Rectangle(a, c).
(2) There is nothing fuzzy on your controller. Gender is either male or female. Age is defined in ranges. BMI is also defined in ranges. For any given set of inputs, there will only be one rule activated. All these reasons suggest that you do not need a fuzzy logic controller, especially considering that crisp logic would be far more efficient and have the same results. By crisp logic, I refer in this case to simply programming of if-then rules in your language of choice without any fuzzy logic. Please, read the documentation available at http://fuzzylite.com/downloads/
(3) Since gender and age are clearly defined, that is, there is no uncertainty on either input variable, you could remove the two variables from the engine and significantly reduce the number of rules. You can check their values using crisp logic
if (age > 10 and age < 30) then...
(4) Instead of a single rule block, create two rule blocks, one for females and one for males, enabling and disabling each as required.
(5) If you run into problems, you need to debug your Engine, but first you need to significantly reduce the number of rules and check that each rule is correctly activated.
Note: I have deleted some of the rules in your post to keep it concise.