home Forums # Technical Support Rules with brackets in jfuzzylite

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2066
    Unknown
    Member

    Hi Juan,

    I love to work with QTFuzzyLite and jfuzzylite but sadly I cannot find a solution for the following problem.

    A rule like this:

    if Input1 is first and (Input2 is second or Input2 is third) then Output is out1
    

    works in QTFuzzyLite but with jfuzzylite I get the following error:

    ruleBlock.addRule(Rule.parse("if Input1 is first and (Input2 is second or Input2 is third) then Output is out1", engine));

    Exception in thread "main" java.lang.RuntimeException: [syntax error] logical operator <or> expects two operands, but found <3>
    	at com.fuzzylite.rule.Antecedent.load(Antecedent.java:246)
    	at com.fuzzylite.rule.Rule.load(Rule.java:203)
    	at com.fuzzylite.rule.Rule.parse(Rule.java:219

    I would be grateful for any hints.

    Thank you very much
    Mirco

    #2067

    Hi,

    thank you for your post.

    There was a bug in jfuzzylite 5.0 which caused this issue. This has been resolved in jfuzzylite 5.0.1. Please download from

    http://fuzzylite.com/download/jfuzzylite5/
    or
    https://github.com/fuzzylite/jfuzzylite/releases/download/5.0.1/jfuzzylite-5.0.1.jar

    Where did you originally downloaded the library from? Are you using Maven? If so, updating the version to 5.0.1 should work too. Please, let me know.

    Cheers.

    #2068
    Unknown
    Member

    Hi Juan,

    thank you very much. Yes I use Maven, but jfuzzylite is only available in as version 5.0. But it works. 🙂

    Thank you very much.

    Greetings
    Mirco

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.