By: Juan Rada-Vilela, Ph.D.
Released: 20/March/2017
License
Introduction
Features
Example
Compile, Link, and Execute
Bulding from Source
Binaries
What's new
What's next
fuzzylite 6.0
is licensed under the GNU General Public License (GPL) 3.0. You are strongly encouraged to support the development of the FuzzyLite Libraries by purchasing a license of QtFuzzyLite 6
.
QtFuzzyLite 6
is the new and (very likely) the best graphical user interface available to easily design and directly operate fuzzy logic controllers in real time. Available for Windows, Mac, and Linux, its goal is to significantly speed up the design of your fuzzy logic controllers, while providing a very useful, functional and beautiful user interface. Please, download it and check it out for free at www.fuzzylite.com/downloads/.
fuzzylite
is a free and open-source fuzzy logic control library programmed in C++ for multiple platforms (e.g., Windows, Linux, Mac, iOS). jfuzzylite
is the equivalent library for Java and Android platforms. Together, they are the FuzzyLite Libraries for Fuzzy Logic Control.
If you are using the FuzzyLite Libraries, please cite the following reference in your article:
Juan Rada-Vilela. fuzzylite: a fuzzy logic control library, 2017. URL http://www.fuzzylite.com/.
The documentation for the fuzzylite
library is available at: www.fuzzylite.com/documentation/.
**(6) Controllers**: Mamdani, Takagi-Sugeno, Larsen, Tsukamoto, Inverse Tsukamoto, Hybrids
**(21) Linguistic terms**: (4) Basic: triangle, trapezoid, rectangle, discrete. (9) Extended: bell, cosine, gaussian, gaussian product, pi-shape, sigmoid difference, sigmoid product, spike. (5) Edges: binary, concave, ramp, sigmoid, s-shape, z-shape. (3) Functions: constant, linear, function.
**(7) Activation methods**: general, proportional, threshold, first, last, lowest, highest.
**(8) Conjunction and Implication (T-Norms)**: minimum, algebraic product, bounded difference, drastic product, einstein product, hamacher product, nilpotent minimum, function.
**(10) Disjunction and Aggregation (S-Norms)**: maximum, algebraic sum, bounded sum, drastic sum, einstein sum, hamacher sum, nilpotent maximum, normalized sum, unbounded sum, function.
**(7) Defuzzifiers**: (5) Integral: centroid, bisector, smallest of maximum, largest of maximum, mean of maximum. (2) Weighted: weighted average, weighted sum.
**(7) Hedges**: any, not, extremely, seldom, somewhat, very, function.
**(3) Importers**: FuzzyLite Language fll
, Fuzzy Inference System fis
, Fuzzy Control Language fcl
.
**(7) Exporters**: C++
, Java
, FuzzyLite Language fll
, FuzzyLite Dataset fld
, R
script, Fuzzy Inference System fis
, Fuzzy Control Language fcl
.
**(30+) Examples** of Mamdani, Takagi-Sugeno, Tsukamoto, and Hybrid controllers from fuzzylite
, Octave, and Matlab, each included in the following formats: C++
, Java
, fll
, fld
, R
, fis
, and fcl
.
#### FuzzyLite Language
#### C++
Once you have an engine written in C++, you can compile it to create an executable file which links to the fuzzylite
library. The linking can be either static or dynamic. Basically, the differences between static and dynamic linking are the following. Static linking includes the fuzzylite
library into your executable file, hence increasing its size, but the executable no longer needs to have access to the fuzzylite
library files. Dynamic linking does not include the fuzzylite
library into your executable file, hence reducing its size, but the executable needs to have access to the fuzzylite
shared library file. When using dynamic linking, make sure that the shared library files are either in the same directory as the executable, or are reachable via environmental variables:
The commands to compile your engine in Windows are the following:
C++11 (default)
C++98
The commands to compile your engine in Unix are the following:
C++11 (default)
C++98
Alternatively, you can use CMake to build your project linking to fuzzylite
. Please, refer to the example application available at examples/application.
You can build the fuzzylite
library from source using CMake
(cmake.org).
The files fuzzylite/build.bat
and fuzzylite/build.sh
are build scripts for the Windows and Unix platforms, respectively. After building from source, the resulting binaries will be located in the sub-folders fuzzylite/release/bin
and fuzzylite/debug/bin
. The usage of these scripts is presented as follows.
#### Windows
#### Unix
For advanced building options, please check the contents of fuzzylite/build.bat
or fuzzylite/build.sh
, and the contents of fuzzylite/CMakeLists.txt
.
The following building options available:
-DFL_USE_FLOAT=ON
builds the binaries utilizing the fl::scalar
data type as a float
represented in 4 bytes. By default, the binaries are built utilizing -DFL_USE_FLOAT=OFF
to utilize fl::scalar
as a double
represented in 8 bytes and hence providing better accuracy. If fuzzylite
is built with -DFL_USE_FLOAT=ON
, then the applications linking to fuzzylite
also need to specify this compilation flag.-DFL_CPP98=ON
builds binaries utilizing C++98
features. By default, fuzzylite
is built with -DFL_CPP98=OFF
to utilize C++11
features. If compiling for C++98
, be aware that you will not be able to benchmark the performance of your engine using the Benchmark
class.-DFL_BACKTRACE=OFF
disables the backtrace information in case of errors (default is ON). In Windows, the backtrace information requires the external library dbghelp
, which is generally available in your system.-DCMAKE_BUILD_TYPE=[Debug|Release]
sets the mode of your build. You can only build one mode at a time with a single CMake script.The source code of fuzzylite
is very well documented using doxygen
formatting, and the documentation is available at fuzzylite.com/documentation. If you want to generate the documentation locally, you can produce the html
documentation from the file Doxyfile using the command line: doxygen Doxyfile
. The documentation will be created in the documentation
folder.
After building from source, the following are the relevant binaries that will be created in Release
mode. In Debug
mode, the file names end with -debug
(e.g., fuzzylite-debug.exe
).
fuzzylite.exe
fuzzylite.dll
, fuzzylite.lib
fuzzylite-static.lib
fuzzylite
libfuzzylite.so
libfuzzylite-static.a
fuzzylite
libfuzzylite.dylib
libfuzzylite-static.a
The console application of fuzzylite
allows you to import and export your engines. Its usage can be obtained executing the console binary. In addition, the console can be set in interactive mode. The FuzzyLite Interactive Console
allows you to evaluate a given controller by manually providing the input values. The interactive console is triggered by specifying an input file and an output format. For example, to interact with the ObstacleAvoidance
controller, the interactive console is launched as follows:
Accumulated
to Aggregated
.ActivationFactory
provides a factory of activation methods.Benchmark
to evaluate the performance and accuracy of engines.Complexity
to estimate the computational complexity of an engine.RScriptExporter
to export the surfaces of an engine using the ggplot2
library.Binary
term for binary edges.UnboundedSum
S-Norm in SNormFactory
.SNormFunction
and TNormFunction
to create custom functions on any two values using the Function
class.Engine
, Variable
and RuleBlock
Term
, Variable
, Rule
, Defuzzifier
, [Cloning|Construction]Factory
, Importer
, Exporter
, amongst others.int
for std::size_t
where necessary, thereby additionally removing warnings in Windows 64bitOperation.cpp
and inlined its methods into Operation.h
.travis.yml
to use Docker, and build using g++ (versions 6, 5, 4.9, 4.8, 4.7) and clang (versions 3.8, 3.7, 3.6, and 3.5).appveyor.yml
to use continuous integration in Windows under Visual Studio 2013 and 2015.pdf
formats.CloningFactory::deregisterObject()
. Bug: Object was deleted before removing it from the map, leaving an invalid object in the map which would cause a segmentation fault. Solution: Remove the object from the map before deleting it.NormalizedSum
S-Norm.RuleBlock
to reset and clone the implication operator. Bug: implication operator is not copied and reset. Fix: copy and reset implication operator when cloning the RuleBlock
.Function
term. Bug: given a formula = "tan(y)" and a map["y"] = 1.0, and executing Function::load(formula)
, then the map of variables is reset because load()
calls unload()
first, causing the deregistration of variable y
. Solution: Removed method unload()
from load()
, thereby causing future load()
not to reset variables.Function
when enclosing variable in double parenthesis.fuzzylite® is a registered trademark of FuzzyLite Limited.
jfuzzylite™ is a trademark of FuzzyLite Limited.
QtFuzzyLite™ is a trademark of FuzzyLite Limited.
Copyright © 2010-2017 FuzzyLite Limited. All rights reserved.