Info | Build status | Documentation | Contributing | Citation |
---|---|---|---|---|
A Julia library for fuzzy logic and applications.
If you use this in your research, please cite it as
@INPROCEEDINGS{ferranti2023fuzzylogicjl,
author={Ferranti, Luca and Boutellier, Jani},
booktitle={2023 IEEE International Conference on Fuzzy Systems (FUZZ)},
title={FuzzyLogic.jl: A Flexible Library for Efficient and Productive Fuzzy Inference},
year={2023},
pages={1-5},
doi={10.1109/FUZZ52849.2023.10309777}}
- Rich! Mamdani and Sugeno inference systems, both Type-1 and Type-2, several membership functions and algoritms options available.
- Compatible! Read your models from IEC 61131-7 Fuzzy Control Language, IEEE 1855-2016 Fuzzy Markup Language and Matlab Fuzzy toolbox
.fis
files. - Expressive! Clear Domain Specific Language to write your model as human readable Julia code
- Productive! Several visualization tools to help debug and tune your model.
- Portable! Compile your final model to Julia code.
-
If you haven't already, install Julia. The easiest way is to install Juliaup. This allows to easily manage julia versions.
-
Open the terminal and start a julia session by simply typing
julia
-
Install the library by typing
using Pkg; Pkg.add("FuzzyLogic")
- The package can now be loaded (in the interactive REPL or in a script file) with the command
using FuzzyLogic
- That's it, have fun!
fis = @mamfis function tipper(service, food)::tip
service := begin
domain = 0:10
poor = GaussianMF(0.0, 1.5)
good = GaussianMF(5.0, 1.5)
excellent = GaussianMF(10.0, 1.5)
end
food := begin
domain = 0:10
rancid = TrapezoidalMF(-2, 0, 1, 3)
delicious = TrapezoidalMF(7, 9, 10, 12)
end
tip := begin
domain = 0:30
cheap = TriangularMF(0, 5, 10)
average = TriangularMF(10, 15, 20)
generous = TriangularMF(20, 25, 30)
end
service == poor || food == rancid --> tip == cheap
service == good --> tip == average
service == excellent || food == delicious --> tip == generous
end
fis(service=1, food=2)
Contributions are welcome! Here is a small decision tree with useful links.
-
To chat withe the core dev(s), you can use the element chat. This is a good entry point for less structured queries.
-
If you find a bug or want to request a feature, open an issue.
-
There is a discussion section on GitHub. You can use the helpdesk for asking for help on how to use the software or the show and tell to share with the world your work using FuzzyLogic.jl.
-
You are also encouraged to send pull requests (PRs). For small changes, it is ok to open a PR directly. For bigger changes, it is advisable to discuss it in an issue first. Before opening a PR, make sure to check the contributing guidelines.
- Copyright (c) 2022 Luca Ferranti, released under MIT license.