Fuzzy-Logic-Sharp icon indicating copy to clipboard operation
Fuzzy-Logic-Sharp copied to clipboard

FuzzyEngine Defuzzify working only once

Open glmnet opened this issue 6 years ago • 8 comments

I've found out that once a calculation is made the premise is not reset when calculating for another value, thus calculating invalid values.

PremiseModifier value gets a value and it never gets a lower value, even on the Defuzzify method where it says //reset membership functions, it does nothing as the setter filters out setting a lower value.

I've fixed it for myself by adding a reset method which sets the PremiseModifier to zero.

glmnet avatar Dec 14 '18 17:12 glmnet

I confirm that. Faced the same issue while testing this library.

SzymonKatra avatar Jan 12 '19 20:01 SzymonKatra

I had the same issue. Glmnet, would you post your fix here?

tdion avatar Feb 22 '19 18:02 tdion

I've forked this repo and pushed my changes there, I added a reset method to BaseMembershipFunction so I call it instead of the 0 assignation in FuzzyEngine.cs line 83... in the original repo this is failing as the setter has a filter (value > currentValue) and as value is 0 this never happens. I respect the effort of the author and I learn a lot of fuzzy logic with this library but overall code quality is not very good. I'm not using it so I cannot work on it.

glmnet avatar Feb 22 '19 20:02 glmnet

David,

Thanks for your reply. Is there a Fuzzy C# library that you recommend instead of FLS?

I was thinking about going over the FLS code and cleaning it up, but I am new to Fuzzy Logic. I am going to use the library for a fluid control simulation.

Thanks,

Tim

-- Timothy Walter Dion [email protected] c408-624-6938

On Fri, Feb 22, 2019, at 12:32 PM, Guillermo Ruffino wrote:

I've forked this repo and pushed my changes there, I added a reset method to BaseMembershipFunction so I call it instead of the 0 assignation in FuzzyEngine.cs line 83... in the original repo this is failing as the setter has a filter (value > currentValue) and as value is 0 this never happens. I respect the effort of the author and I learn a lot of fuzzy logic with this library but overall code quality is not very good. I'm not using it so I cannot work on it.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/davidgrupp/Fuzzy-Logic-Sharp/issues/1#issuecomment-466537263, or mute the thread https://github.com/notifications/unsubscribe-auth/AtriXzMlyHKd2ek0UnzmJP0gK-foGLZPks5vQFPKgaJpZM4ZT7k0.

tdion avatar Feb 22 '19 20:02 tdion

I did not find anything better than this library. Did not find many either.

glmnet avatar Feb 22 '19 20:02 glmnet

@glmnet @tdion Hi all, sorry for late reply. I'd be happy to merge in your fix you mentioned if you create a PR. If not I can take a stab at fixing it myself.

davidgrupp avatar Mar 28 '19 22:03 davidgrupp

Sure I’ll send a PR

El El jue, 28 mar. 2019 a las 19:09, david grupp [email protected] escribió:

@glmnet https://github.com/glmnet @tdion https://github.com/tdion Hi all, sorry for late reply. I'd be happy to merge in your fix you mentioned if you create a PR. If not I can take a stab at fixing it myself.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/davidgrupp/Fuzzy-Logic-Sharp/issues/1#issuecomment-477789585, or mute the thread https://github.com/notifications/unsubscribe-auth/AAF3oozusTUndF182YJe09dbyF5zWJWjks5vbT2hgaJpZM4ZT7k0 .

-- GLM

glmnet avatar Mar 28 '19 22:03 glmnet

@tdion

David, Thanks for your reply. Is there a Fuzzy C# library that you recommend instead of FLS? I was thinking about going over the FLS code and cleaning it up, but I am new to Fuzzy Logic. I am going to use the library for a fluid control simulation. Thanks, Tim

Try Accord.Fuzzy it was based based on AForge.NET Fuzzy Computations Library https://www.nuget.org/packages/Accord.Fuzzy/3.8.0

3xau1o avatar Nov 01 '19 00:11 3xau1o