home Forums # Technical Support Conjunction Operator Exception Fuzzylite 5.0

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

    Hi Juan,

    I am trying to run a program containing several inputs and a single output. My program runs without a problem as long as my rules contain only a single input, however whenever I try to create a rule using more than one input (e.g if IN_1 is HIGH and IN_2 is HIGH then OUTPUT is HIGH), the program throws an exception saying that the rule requires a conjunction operator.

    I have followed the structure given in the Fuzzylite 5.0 examples but can’t get it to run. The ruleblock section of my code is shown below, I would greatly appreciate any help.

    RuleBlock *ruleblock = new RuleBlock;
    ruleblock->setEnabled(true);
    ruleblock->setConjunction(new Minimum);
    ruleblock->setActivation(new Minimum);
    ruleblock->addRule(Rule::parse if IN_1 is HIGH and IN_2 is HIGH then OUTPUT is HIGH);
    engine->addRuleBlock(ruleblock);
    engine->ruleBlocks();

    Thanks,

    Louis

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