You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -12,7 +13,7 @@ A Julia library for fuzzy inference.
12
13
To install the package, open a Julia session and run
13
14
14
15
```julia
15
-
using Pkg; Pkg.add(url="https://github.com/lucaferranti/FuzzyLogic.jl.git")
16
+
using Pkg; Pkg.add("FuzzyLogic")
16
17
```
17
18
18
19
the package can then be loaded with
@@ -21,13 +22,11 @@ the package can then be loaded with
21
22
using FuzzyLogic
22
23
```
23
24
24
-
## Roadmap
25
+
## Features
25
26
26
-
-**Rich!** Mamdani and Sugeno inference systems, both Type-1 and Type-2, several [membership functions](https://lucaferranti.github.io/FuzzyLogic.jl/stable/api/memberships) and [algoritms options](https://lucaferranti.github.io/FuzzyLogic.jl/stable/api/fis) available.
27
-
-**Compatible!** Able to read/write your model from/to [IEEE 1855-2016 Fuzzy Markup Language](https://en.wikipedia.org/wiki/Fuzzy_markup_language) and [IEC 61131-7 Fuzzy Control Language](https://ffll.sourceforge.net/fcl.htm) and Matlab Fuzzy toolbox `.fis` files.
27
+
-**Rich!** Mamdani and Sugeno Type-1 inference systems, several membership functions and algoritms options available.
28
28
-**Expressive!** Clear Domain Specific Language to write your model as human readable Julia code
29
29
-**Productive!** Several visualization tools to help debug and tune your model.
30
-
-**Portable!** Compile your final model to Julia or C/C++ code.
31
30
32
31
## Quickstart example
33
32
@@ -58,7 +57,7 @@ fis = @mamfis function tipper(service, food)::tip
58
57
service == excellent || food == delicious --> tip == generous
59
58
end
60
59
61
-
fis(; service=1, food=2)
60
+
fis(service=1, food=2)
62
61
```
63
62
64
63
## Documentation
@@ -74,12 +73,15 @@ Contributions are welcome! If you find a bug or want to request a feature, [open
From now on, these instructions assume you are in the `FuzzyLogic.jl` folder
32
40
33
41
**2.**[Fork the repository](https://github.com/lucaferranti/FuzzyLogic.jl).
34
42
35
-
**3.** Add your for as remote with
43
+
**3.** Add your fork as remote with
36
44
37
45
```
38
46
git remote add $new_remote_name $your_fork_link
@@ -84,6 +92,25 @@ git switch -c $new-branch-name
84
92
## Coding guideline
85
93
86
94
* The package follows [SciMLStyle](https://github.com/sciml/SciMLStyle).
95
+
* You can run the tests locally from the Julia REPL with
96
+
97
+
```julia
98
+
include("test/runtests.jl")
99
+
```
100
+
101
+
* Each test file is stand-alone, hence you can also run individual files, e.g. `include("test/test_parser.jl")`
102
+
103
+
* To make finding tests easier, the test folder structure should (roughly) reflect the structure of the `src` folder.
104
+
105
+
## Working on the documentation
106
+
107
+
* You can build the documentation locally with
108
+
109
+
```
110
+
julia --project=docs docs/make.jl
111
+
```
112
+
113
+
* Tutorials and applications are written using [Literate.jl](https://github.com/fredrikekre/Literate.jl), hence if working on those, you should edit the source file under the `literate` folder and not directly the markdown.
To install the package, open a Julia session and run
13
14
14
15
```julia
15
-
using Pkg; Pkg.add(url="https://github.com/lucaferranti/FuzzyLogic.jl.git")
16
+
using Pkg; Pkg.add("FuzzyLogic")
16
17
```
17
18
18
19
the package can then be loaded with
@@ -21,46 +22,44 @@ the package can then be loaded with
21
22
using FuzzyLogic
22
23
```
23
24
24
-
## Roadmap
25
+
## Features
25
26
26
-
-**Rich!** Mamdani and Sugeno inference systems, both Type-1 and Type-2, several [membership functions](https://lucaferranti.github.io/FuzzyLogic.jl/stable/api/memberships) and [algoritms options](https://lucaferranti.github.io/FuzzyLogic.jl/stable/api/fis) available.
27
-
-**Compatible!** Able to read/write your model from/to [IEEE 1855-2016 Fuzzy Markup Language](https://en.wikipedia.org/wiki/Fuzzy_markup_language) and [IEC 61131-7 Fuzzy Control Language](https://ffll.sourceforge.net/fcl.htm) and Matlab Fuzzy toolbox `.fis` files.
27
+
-**Rich!** Mamdani and Sugeno Type-1 inference systems, several membership functions and algoritms options available.
28
28
-**Expressive!** Clear Domain Specific Language to write your model as human readable Julia code
29
29
-**Productive!** Several visualization tools to help debug and tune your model.
30
-
-**Portable!** Compile your final model to Julia or C/C++ code.
service == excellent || food == delicious => tip == generous
34
+
fis =@mamfisfunctiontipper(service, food)::tip
35
+
service :=begin
36
+
domain =0:10
37
+
poor =GaussianMF(0.0, 1.5)
38
+
good =GaussianMF(5.0, 1.5)
39
+
excellent =GaussianMF(10.0, 1.5)
40
+
end
41
+
42
+
food :=begin
43
+
domain =0:10
44
+
rancid =TrapezoidalMF(-2, 0, 1, 3)
45
+
delicious =TrapezoidalMF(7, 9, 10, 12)
46
+
end
47
+
48
+
tip :=begin
49
+
domain =0:30
50
+
cheap =TriangularMF(0, 5, 10)
51
+
average =TriangularMF(10, 15, 20)
52
+
generous =TriangularMF(20, 25, 30)
53
+
end
54
+
55
+
service == poor || food == rancid --> tip == cheap
56
+
service == good --> tip == average
57
+
service == excellent || food == delicious --> tip == generous
50
58
end
51
59
52
-
fis(; service=1, food=2)
60
+
fis(service=1, food=2)
53
61
```
54
62
55
-
## Documentation
56
-
57
-
-[**STABLE**](https://lucaferranti.github.io/FuzzyLogic.jl/stable/): Documentation of the latest release
58
-
-[**DEV**](https://lucaferranti.github.io/FuzzyLogic.jl/dev/): Documentation of the version on main
59
-
60
-
## Contributing
61
-
62
-
Contributions are welcome! If you find a bug or want to request a feature, [open an issue](https://github.com/lucaferranti/FuzzyLogic.jl/issues). 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](https://lucaferranti.github.io/FuzzyLogic.jl/dev/contributing).
0 commit comments