Forum Replies Created
Please send me your email so I can send you the dll.
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.
// Block definition (there may be more than one block per file)
// Define input variables
service : REAL;
food : REAL;
// Define output variable
tip : REAL;
// Fuzzify input variable ‘service’
TERM poor := (0, 1) (4, 0) ;
TERM good := (1, 0) (4,1) (6,1) (9,0);
TERM excellent := (6, 0) (9, 1);
// Fuzzify input variable ‘food’
TERM rancid := (0, 1) (1, 1) (3,0) ;
TERM delicious := (7,0) (9,1);
// Defzzzify output variable ‘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;
// 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;
- This reply was modified 7 years, 6 months ago by asho.
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.