Coder Social home page Coder Social logo

dotfuzzy's Introduction

No Maintenance Intended

DotFuzzy

Disclaimer

โš ๏ธ This is the project I did for my bachelor thesis in 2008 and I never updated nor mantained it. I published the source because some developers are using it and I hope they can improve the library.

What is DotFuzzy?

DotFuzzy is an open source stand-alone class library for fuzzy logic. The library is built in C# and can therefore be used by all languages the .NET environment supports. Because of a clean natural Object Oriented approach the library is easy to use and implement. DotFuzzy is designed to be a flexible, robust and scalable. DotFuzzy implements fuzzification, rules validation/evaluation and defuzzification with the centroid method. It is also possible to save and load projects in XML, whose tags are similar to Fuzzy Control Language.

Usage

LinguisticVariable water = new LinguisticVariable("Water"); 
water.MembershipFunctionCollection.Add(new MembershipFunction("Cold", 0, 0, 20, 40)); 
water.MembershipFunctionCollection.Add(new MembershipFunction("Tepid", 30, 50, 50, 70)); 
water.MembershipFunctionCollection.Add(new MembershipFunction("Hot", 50, 80, 100, 100));

LinguisticVariable power = new LinguisticVariable("Power"); 
power.MembershipFunctionCollection.Add(new MembershipFunction("Low", 0, 25, 25, 50)); 
power.MembershipFunctionCollection.Add(new MembershipFunction("High", 25, 50, 50, 75));

FuzzyEngine fuzzyEngine = new FuzzyEngine(); 
fuzzyEngine.LinguisticVariableCollection.Add(water); 
fuzzyEngine.LinguisticVariableCollection.Add(power); 
fuzzyEngine.Consequent = "Power"; 
fuzzyEngine.FuzzyRuleCollection.Add(new FuzzyRule("IF (Water IS Cold) OR (Water IS Tepid) THEN Power IS High")); 
fuzzyEngine.FuzzyRuleCollection.Add(new FuzzyRule("IF (Water IS Hot) THEN Power IS Low"));

water.InputValue = 60;

try 
{ 
    MessageBox.Show(fuzzyEngine.Defuzzify().ToString()); 
} 
catch (Exception e) 
{ 
    MessageBox.Show(e.Message); 
}

dotfuzzy's People

Contributors

michelebertoli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.