Forum Replies Created

Viewing 10 posts - 441 through 450 (of 472 total)
  • Author
  • in reply to: handling sets for inputs #977


    given SET_1 = {LOW, MEDIUM, HIGH}, where each item is a membership function, you are looking for rules stated as:

    if keyword is LOW or keyword is MEDIUM then Likelihood is MODERATE.

    You group propositions utilizing the or connector, and you will need to set an S-Norm as a disjunction operator to handle the propositions in the antecedent linked with or.


    in reply to: Compiling for an iPad physical devide #972

    i wish i could be more helpful, but i do not have an iOS device to try, unfortunately. if you manage to compile correctly for iOS, please provide some hints on how to do it. cheers!

    in reply to: Ubuntu Packages #971

    Hi Fishwaldo,

    thank you for your progress creating the RPM! I am sorry I will probably not have enough time to check your work this week because I am at a conference with limited access to internet. However, I reply to your comments.

    I am divorcing QtFuzzyLite from fuzzylite to a repository of its own, and I will rewrite the entire application, that is why it does not compile. I have not deleted the sources from the repository because I still need them. You have done great using the sources of QtFuzzyLite 4.0.

    I changed the directory of the output libraries from lib to bin because I found it annoying to have bin and lib, but please make all the changes you find necessary to comply with standards.

    Regarding SONAME, I am not sure having different versions of fuzzylite working simultaneously is a good a idea because fuzzylite is evolving/maturing/changing too fast, and engines created with one version will most likely not build with another version. Furthermore, in recent tests, I have found that QtFuzzyLite 4.0 may start correctly using fuzzylite v5.0, but then crash due to important differences. Therefore, I think allowing multiple versions of fuzzylite might lead to errors hard to find. If you still think there are more advantages in using SONAME, we can definitely give it a shot.

    I like very much the idea of pkgconfig to make it easier to find fuzzylite.

    As for the man pages, it would be great if you could use empty pages to avoid the errors for now. If you have time, please email me a sample format or a link so I can write that as soon as I have some time.

    Thank you very much for your help!

    in reply to: Time and Absolute Values? #970

    Hi Fishwaldo,

    Thank you for your post and for sharing information about an interesting application of fuzzylite.

    I have been thinking about your case since I read about it, and I have one solution.

    As for now, I am reluctant to allow the kind of rules you present, but I will surely consider it for another version of fuzzylite in the future.

    My solution is to create an InputVariable called Time, besides InputVariable Room, as follows:

    InputVariable: Time
      enabled: true
      range: 0.0 23.59
      term: After6pm Function ge(Time, 18)
      term: Before6pm Function lt(Time, 18)
      term: After8pm Function ge(Time, 20)
      term: Before8pm Function lt(Time, 20)
    InputVariable: Room
      enabled: true
      range: 0.0 1.0
      term: Occupied Function eq(Room, 1.0)
      term: Empty Function ~eq(Room, 1.0)

    Then, the rules would be:

      conjunction: AlgebraicProduct
      activation: AlgebraicProduct
      rule: if Room is Occupied and Time is After6pm then AirCond is fullspeed

    The changes you need to make in fuzzylite are the following:

    In Operation.h, you need to create the following methods,

    static scalar gt(scalar a, scalar b); //greater than
    static scalar ge(scalar a, scalar b); //greater than or equal to
    static scalar eq(scalar a, scalar b); //equal to
    static scalar le(scalar a, scalar b); //less than or equal to
    static scalar lt(scalar a, scalar b); //less than
    static scalar Operation::logicalNot(scalar a) {
            return isEq(a, 1.0) ? 0.0 : 1.0; //Implementation in Operation.cpp

    and within the methods utilize the respective calls to Op::isGt, Op::isGE, etc.

    In Function.cpp, you need to add the new methods as follows:

    this->functions["gt"] = new BuiltInFunction("gt", &(fl::Op::gt));
    this->functions["ge"] = new BuiltInFunction("ge", &(fl::Op::ge));
    this->functions["eq"] = new BuiltInFunction("eq", &(fl::Op::eq));
    this->functions["le"] = new BuiltInFunction("le", &(fl::Op::le));
    this->functions["lt"] = new BuiltInFunction("lt", &(fl::Op::lt));
    int p = 7;
    this->operators["!"] = new Operator("!", &(fl::Op::logicalNot), p, 1);

    As for time, you will have to set the input value for Time manually before processing the Engine.

    I have already incorporated the aforementioned changes to fuzzylite v5.0, but I discourage you from using the master repository as it is work in progress and plenty of changes are being made.


    in reply to: Compiling for an iPad physical devide #965

    Hi JuanRS,

    I am not familiar with iOS at all, but I believe you do not need fuzzylite-static.a in your iPad because your application is being statically linked. Hence, your application and fuzzylite library are both be contained within the same executable file.

    Can you try excluding fuzzylite-static.a from installation to the iPad? Perhaps it could be some sort of security error? I am also guessing that you are not compiling your application within the iPad, but just copying to the iPad.

    in reply to: Can not convert scalar to unary #962


    Can you use fuzzylite in C#? What kind of changes did you have to make to compile for C#?

    As for the errors, could you try this:

    For first error:

    scalar BoundedSum::compute(scalar a, scalar b) const {
            return Op::min(scalar(1.0), a + b);

    For second error:

    this->operators["~"] = new Operator("~", &(fl::Op::negate), p, 1);


    in reply to: Using Fuzzy Lite with IDE #959


    I think the best option you have is to configure MPLab looking at the configuration of a well-configured IDE. I am guessing you need to add the path to the C++/STL headers in the INCLUDE_PATH and the path to the C++ libraries in the LIBRARY_PATH. Please, look in your filesystem where the header is located and add its path to the INCLUDE_PATH. Once it compiles most of the files, it will probably fail at link time due to the missing libraries, for which you will need to find out which are those libraries and add them to the project as -llibrary-name (e.g. -lfuzzylite). I think my best suggestion is to first configure a simple project to work with fuzzylite using a regular IDE (Netbeans, Eclipse, XCode or Visual Studio), and once you are able to build and run an example, explore the necessary configuration of the IDE to make it work in MPLab.

    Once you manage to make it work, we would all appreciate if you could put detailed information about configuring MPLab to run fuzzylite.


    in reply to: Running FuzzyLite on Mac OSX #957

    You have to add the path to fuzzylite in the INCLUDE_PATH of your project, such that #include <fl/Headers.h> is a file accessible from the path to include in INCLUDE_PATH.

    in reply to: Using Fuzzy Lite with IDE #955


    What IDE are you using? Indeed, the problem you are having for is basic configuration issues of your IDE or probably missing headers in your operating system. What OS are you using?

    As for fuzzylite, you must add “/path/to/fuzzylite” in your INCLUDE_PATH in order to find the headers.

    in reply to: Fuzzylite on VS 2012 does not compile #953


    can you please check the information in regarding the LNK1104 error?

    Considering the information from the page above, I believe if fl-bin is failing it might be because it cannot find the shared library. Can you please make sure that the fuzzylite.dll is within access of the result of fl-bin? You may try to copy fuzzylite.dll into the same folder of the final executable file.


Viewing 10 posts - 441 through 450 (of 472 total)