alvesoaj / eFLL

eFLL (Embedded Fuzzy Logic Library) is a standard library for Embedded Systems
MIT License
211 stars 91 forks source link

3 ouput #26

Closed murtadhodaf closed 3 years ago

murtadhodaf commented 3 years ago

is this library allow to 3 output on fuzzy ?

alvesoaj commented 3 years ago

Yes, the library has no limitations in numbers of inputs, rules and outputs... the limitation is the hardware.

murtadhodaf commented 3 years ago

thx for helping me

murtadhodaf commented 3 years ago

if the ouput more than 2 what is the syntx for it ? is just adding the output or using joinWithAND

alvesoaj commented 3 years ago

Not exactly, https://github.com/zerokol/eFLL/blob/master/examples/general_advanced_sample/general_advanced_sample.cpp take a look in this example. It uses two outputs, to create a new output you will need to set new FuzzyOutput, with its FuzzySet s and then create some FuzzyRuleConsequent with its Rules. =)

murtadhodaf commented 3 years ago

oooh i got it just add the output after FuzzyRuleConsequent. is it like this ?

`FuzzyRuleAntecedent *FP_N1 = new FuzzyRuleAntecedent();
FP_N1->joinWithAND(FP, N1);

FuzzyRuleConsequent *SEDANG1_SEBENTAR3_2 = new FuzzyRuleConsequent();
SEDANG1_SEDANG3_2->addOutput(SEDANG1);
SEDANG1_SEDANG3_2->addOutput(SEBENTAR3);
SEDANG1_SEDANG3_2->addOutput(ZERO2);

FuzzyRule *fuzzyRule41 = new FuzzyRule(41, FP_N1, SEDANG1_SEBENTAR3_2);
fuzzy->addFuzzyRule(fuzzyRule41);`
alvesoaj commented 3 years ago

yes, basically, it you have a FuzzyOutpput, it works.

murtadhodaf commented 3 years ago

thx for helping me is it can be to close or not ?

alvesoaj commented 3 years ago

Graeat!