Forum Replies Created

Viewing 8 posts - 11 through 18 (of 18 total)
  • Author
    Posts
  • in reply to: Compiling with different compiler(BCC) #1396
    AvatarShaheryar
    Participant

    Hey,
    After fixing it i get this massage.

    root@ubuntu:/home/tayyab/Desktop/fuzzylite-4.0/fuzzylite# sparc-linux-g++ AllTerms.cpp -I/home/tayyab/Desktop/fuzzylite-4.0/fuzzylite -L/home/tayyab/Desktop/fuzzylite-4.0/fuzzylite/bin -lfuzzylite-static
    In file included from /home/tayyab/Desktop/fuzzylite-4.0/fuzzylite/fl/Headers.h:29,
    from AllTerms.cpp:1:
    /home/tayyab/Desktop/fuzzylite-4.0/fuzzylite/fl/Engine.h:26:26: calling fdopen: Bad file descriptor
    In file included from /home/tayyab/Desktop/fuzzylite-4.0/fuzzylite/fl/Headers.h:30,
    from AllTerms.cpp:1:
    /home/tayyab/Desktop/fuzzylite-4.0/fuzzylite/fl/Exception.h:26:26: calling fdopen: Bad file descriptor
    In file included from /home/tayyab/Desktop/fuzzylite-4.0/fuzzylite/fl/norm/Norm.h:28,
    from /home/tayyab/Desktop/fuzzylite-4.0/fuzzylite/fl/norm/SNorm.h:26,
    from /home/tayyab/Desktop/fuzzylite-4.0/fuzzylite/fl/factory/SNormFactory.h:29,
    from /home/tayyab/Desktop/fuzzylite-4.0/fuzzylite/fl/Headers.h:46,
    from AllTerms.cpp:1:
    /home/tayyab/Desktop/fuzzylite-4.0/fuzzylite/fl/Operation.h:26:26: calling fdopen: Bad file descriptor

    in reply to: Compiling with different compiler(BCC) #1393
    AvatarShaheryar
    Participant

    Hey
    Now i am trying to compile it using following command

    sparc-linux-g++ AllTerms.cpp -I/home/tayyab/Desktop/fuzzylite-4.0 -L/home/tayyab/Desktop/fuzzylite-4.0/fuzzylite/bin -lfuzzylite-static

    Still i am having same error
    What should i do now?

    in reply to: Compiling with different compiler #1389
    AvatarShaheryar
    Participant

    i am trying to compile it using BCC compiler.
    Manual for BCC compiler is available in this link : http://www.gaisler.com/doc/bcc.pdf

    i want to know how can i compile fuzzylite or design a fuzzy engine using BCC compiler ?

    please check this also : http://www.gaisler.com/index.php/downloads/compilers?task=view&id=161

    in reply to: Unable to run the fuzzy logic controller linux #1185
    AvatarShaheryar
    Participant

    Thank u very much its done…
    Your technical support is really good.

    in reply to: Unable to run the fuzzy logic controller linux #1184
    AvatarShaheryar
    Participant

    I have include that part in my code now i thinks its calculating output variable. how i am going to see the output?
    Just cout the output variable?

    in reply to: Unable to run the fuzzy logic controller linux #1182
    AvatarShaheryar
    Participant

    I have the include this in the end of my code? and how i am going to see the output ?

    in reply to: Unable to run the fuzzy logic controller linux #1180
    AvatarShaheryar
    Participant

    Hello
    I want to use this fuzzy engine to give me optimized output depending on the input. How can i specify input values to this engine?

    in reply to: Unable to run the fuzzy logic controller linux #1171
    AvatarShaheryar
    Participant

    Its working ….NO error now..
    Thanks

    Now when i am running the a.out file its not showing any output. as shown below

    tayyab@ubuntu:~/Desktop/fuzzylite-4.0/fuzzylite$ ./a.out
    tayyab@ubuntu:~/Desktop/fuzzylite-4.0/fuzzylite$

    can you please explain this response, is there any file where output has been saved ?

    My main code which i am running is

    #include <fl/Headers.h>

    int main(int argc, char** argv){
    fl::Engine* engine = new fl::Engine;
    engine->setName(“qtfuzzylite”);

    fl::InputVariable* inputVariable = new fl::InputVariable;
    inputVariable->setEnabled(true);
    inputVariable->setName(“AllInputTerms”);
    inputVariable->setRange(0.000, 6.500);
    inputVariable->addTerm(new fl::Sigmoid(“A”, 0.500, -20.000));
    inputVariable->addTerm(new fl::ZShape(“B”, 0.000, 1.000));
    inputVariable->addTerm(new fl::Ramp(“C”, 1.000, 0.000));
    inputVariable->addTerm(new fl::Triangle(“D”, 0.500, 1.000, 1.500));
    inputVariable->addTerm(new fl::Trapezoid(“E”, 1.000, 1.250, 1.750, 2.000));
    inputVariable->addTerm(new fl::Rectangle(“F”, 1.750, 2.250));
    inputVariable->addTerm(fl::Discrete::create(“G”, 10, 2.000, 0.000, 2.250, 1.000, 2.500, 0.500, 2.750, 1.000, 3.000, 0.000));
    inputVariable->addTerm(new fl::Gaussian(“H”, 3.000, 0.200));
    inputVariable->addTerm(new fl::GaussianProduct(“I”, 3.500, 0.100, 3.300, 0.300));
    inputVariable->addTerm(new fl::Bell(“J”, 4.000, 0.250, 3.000));
    inputVariable->addTerm(new fl::PiShape(“K”, 4.000, 4.500, 4.500, 5.000));
    inputVariable->addTerm(new fl::SigmoidDifference(“L”, 4.750, 10.000, 30.000, 5.250));
    inputVariable->addTerm(new fl::SigmoidProduct(“M”, 5.250, 20.000, -10.000, 5.750));
    inputVariable->addTerm(new fl::Ramp(“N”, 5.500, 6.500));
    inputVariable->addTerm(new fl::SShape(“O”, 5.500, 6.500));
    inputVariable->addTerm(new fl::Sigmoid(“P”, 6.000, 20.000));
    engine->addInputVariable(inputVariable);

    fl::OutputVariable* outputVariable = new fl::OutputVariable;
    outputVariable->setEnabled(true);
    outputVariable->setName(“AllOutputTerms”);
    outputVariable->setRange(0.000, 6.500);
    outputVariable->fuzzyOutput()->setAccumulation(new fl::Maximum);
    outputVariable->setDefuzzifier(new fl::Centroid(200));
    outputVariable->setDefaultValue(fl::nan);
    outputVariable->setLockValidOutput(false);
    outputVariable->setLockOutputRange(false);
    outputVariable->addTerm(new fl::Sigmoid(“A”, 0.500, -20.000));
    outputVariable->addTerm(new fl::ZShape(“B”, 0.000, 1.000));
    outputVariable->addTerm(new fl::Ramp(“C”, 1.000, 0.000));
    outputVariable->addTerm(new fl::Triangle(“D”, 0.500, 1.000, 1.500));
    outputVariable->addTerm(new fl::Trapezoid(“E”, 1.000, 1.250, 1.750, 2.000));
    outputVariable->addTerm(new fl::Rectangle(“F”, 1.750, 2.250));
    outputVariable->addTerm(fl::Discrete::create(“G”, 10, 2.000, 0.000, 2.250, 1.000, 2.500, 0.500, 2.750, 1.000, 3.000, 0.000));
    outputVariable->addTerm(new fl::Gaussian(“H”, 3.000, 0.200));
    outputVariable->addTerm(new fl::GaussianProduct(“I”, 3.500, 0.100, 3.300, 0.300));
    outputVariable->addTerm(new fl::Bell(“J”, 4.000, 0.250, 3.000));
    outputVariable->addTerm(new fl::PiShape(“K”, 4.000, 4.500, 4.500, 5.000));
    outputVariable->addTerm(new fl::SigmoidDifference(“L”, 4.750, 10.000, 30.000, 5.250));
    outputVariable->addTerm(new fl::SigmoidProduct(“M”, 5.250, 20.000, -10.000, 5.750));
    outputVariable->addTerm(new fl::Ramp(“N”, 5.500, 6.500));
    outputVariable->addTerm(new fl::SShape(“O”, 5.500, 6.500));
    outputVariable->addTerm(new fl::Sigmoid(“P”, 6.000, 20.000));
    engine->addOutputVariable(outputVariable);

    fl::RuleBlock* ruleBlock = new fl::RuleBlock;
    ruleBlock->setEnabled(true);
    ruleBlock->setName(“”);
    ruleBlock->setConjunction(new fl::Minimum);
    ruleBlock->setDisjunction(new fl::Maximum);
    ruleBlock->setActivation(new fl::Minimum);
    ruleBlock->addRule(fl::Rule::parse(“if AllInputTerms is A then AllOutputTerms is P”, engine));
    ruleBlock->addRule(fl::Rule::parse(“if AllInputTerms is B then AllOutputTerms is O”, engine));
    ruleBlock->addRule(fl::Rule::parse(“if AllInputTerms is C then AllOutputTerms is N”, engine));
    ruleBlock->addRule(fl::Rule::parse(“if AllInputTerms is D then AllOutputTerms is M”, engine));
    ruleBlock->addRule(fl::Rule::parse(“if AllInputTerms is E then AllOutputTerms is L”, engine));
    ruleBlock->addRule(fl::Rule::parse(“if AllInputTerms is F then AllOutputTerms is K”, engine));
    ruleBlock->addRule(fl::Rule::parse(“if AllInputTerms is G then AllOutputTerms is J”, engine));
    ruleBlock->addRule(fl::Rule::parse(“if AllInputTerms is H then AllOutputTerms is I”, engine));
    ruleBlock->addRule(fl::Rule::parse(“if AllInputTerms is I then AllOutputTerms is H”, engine));
    ruleBlock->addRule(fl::Rule::parse(“if AllInputTerms is J then AllOutputTerms is G”, engine));
    ruleBlock->addRule(fl::Rule::parse(“if AllInputTerms is K then AllOutputTerms is F”, engine));
    ruleBlock->addRule(fl::Rule::parse(“if AllInputTerms is L then AllOutputTerms is E”, engine));
    ruleBlock->addRule(fl::Rule::parse(“if AllInputTerms is M then AllOutputTerms is D”, engine));
    ruleBlock->addRule(fl::Rule::parse(“if AllInputTerms is N then AllOutputTerms is C”, engine));
    ruleBlock->addRule(fl::Rule::parse(“if AllInputTerms is O then AllOutputTerms is B”, engine));
    ruleBlock->addRule(fl::Rule::parse(“if AllInputTerms is P then AllOutputTerms is A”, engine));
    engine->addRuleBlock(ruleBlock);

    }

    Apart from this .fld is also present in the folder

    • This reply was modified 7 years, 4 months ago by AvatarShaheryar.
Viewing 8 posts - 11 through 18 (of 18 total)