Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: .NET compatible DLL #2072
    Avatarasho
    Participant

    Hi Jérôme

    Please send me your email so I can send you the dll.

    Abbas

    in reply to: What FCL version does Fuzzylite use? #1024
    Avatarasho
    Participant

    Thank you.

    in reply to: What FCL version does Fuzzylite use? #1019
    Avatarasho
    Participant

    Hi Juan

    Thank you for your reply. For using Fuzzylite in .Net, I finally managed to convert your Java version to a DLL using IKVMC utility.. I think this can be advised to other .Net developers. It seems working and it was much easier than transforming c++ version. My next question is, if you are consideingr using lookuptable or memoization or similar techniques to increase performance in intensive computation and if any considerations are ther for a parallel processing environment. Here is a sample of jFuzzyLogic FCL files.

    Best Regards

    // Block definition (there may be more than one block per file)
    FUNCTION_BLOCK tipper

    // Define input variables
    VAR_INPUT
    service : REAL;
    food : REAL;
    END_VAR

    // Define output variable
    VAR_OUTPUT
    tip : REAL;
    END_VAR

    // Fuzzify input variable ‘service’
    FUZZIFY service
    TERM poor := (0, 1) (4, 0) ;
    TERM good := (1, 0) (4,1) (6,1) (9,0);
    TERM excellent := (6, 0) (9, 1);
    END_FUZZIFY

    // Fuzzify input variable ‘food’
    FUZZIFY food
    TERM rancid := (0, 1) (1, 1) (3,0) ;
    TERM delicious := (7,0) (9,1);
    END_FUZZIFY

    // Defzzzify output variable ‘tip’
    DEFUZZIFY tip
    TERM cheap := (0,0) (5,1) (10,0);
    TERM average := (10,0) (15,1) (20,0);
    TERM generous := (20,0) (25,1) (30,0);
    // Use ‘Center Of Gravity’ defuzzification method
    METHOD : COG;
    // Default value is 0 (if no rule activates defuzzifier)
    DEFAULT := 0;
    END_DEFUZZIFY

    RULEBLOCK No1
    // Use ‘min’ for ‘and’ (also implicit use ‘max’
    // for ‘or’ to fulfill DeMorgan’s Law)
    AND : MIN;
    // Use ‘min’ activation method
    ACT : MIN;
    // Use ‘max’ accumulation method
    ACCU : MAX;

    RULE 1 : IF service IS poor OR food IS rancid
    THEN tip IS cheap;

    RULE 2 : IF service IS good
    THEN tip IS average;

    RULE 3 : IF service IS excellent AND food IS delicious
    THEN tip is generous;
    END_RULEBLOCK

    END_FUNCTION_BLOCK

    • This reply was modified 7 years, 6 months ago by Avatarasho.
    in reply to: Can not convert scalar to unary #1003
    Avatarasho
    Participant

    Hi Juan

    Thank you, I guess I missed your reply. I tried to port the code to C# with a converter and manual changes. It takes much time specifically due to C# limited schema of compiler instructions (e.g. #Define) comparing to C++. I can send you the code, if you want to check it or if you can give me clues how to quickly prepare it.

    Also I tried using TIBIMP utility in .Net that produces a a runtime callable wrapper (.Net compatible library) from COM Dlls. But it raises an error and mentiones that this is not a valid type library (error TI1002). I wonder if you can build a dll with type library embedded or a COM compatible dll. So every .Net programmer can easily create a a runtime callable wrapper (RCW) of fuzzylite and use it.

    Best Regards

Viewing 4 posts - 1 through 4 (of 4 total)