home Forums # Technical Support How to use the jfuzzylite library and Create engine in Netbeans Java

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6132
    Unknown
    Member

    Hi Juan, am a masters student from Ethiopia and I use your Qtfuzzlite 6 GUI to design a two input each with five terms and one output with three terms system, when i export the to java file and create a new class on netbeans IDE I have faced the errors on the following code segments

    public static void main(String[] args){

    FloodLevelPrediction instance = new FloodLevelPrediction();
    Engine engine = instance.getEngine();
    engine.getInputVariable(“RWL”).setInputValue(5.04); // Error on this line of code is = cannot find symbol, symbol: method setInputValue(double), location: class InputVariable
    engine.getInputVariable(“GWL”).setInputValue(3.56);//Error on this line of code is = cannot find symbol, symbol: method setInputValue(double), location: class InputVariable
    engine.process();
    double output = engine.getOutputVariable(“LTWL”).defuzzify();// Error on this line of code is =incompatible types: void cannot be converted to double
    —-(Alt-Enter shows hints)

    System.out.println(“LTWL=” + output);

    }

    #6140

    Hi Marye,

    thank you for your post and for using fuzzylite.

    The problem is that you are using code for a previous version of the jfuzzylite library.

    You need to make the following changes:
    setInputValue the method was renamed to: setValue
    defuzzify no longer returns a value, please use getValue instead

    For more information on the methods available in version 6, please look at: http://www.fuzzylite.com/documentation/

    Cheers.

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