|
9 jaren geleden | |
---|---|---|
.. | ||
fuzzylite | 10 jaren geleden | |
.gitignore | 11 jaren geleden | |
.travis.yml | 11 jaren geleden | |
AUTHOR | 11 jaren geleden | |
COPYING | 11 jaren geleden | |
COPYING.LESSER | 11 jaren geleden | |
ChangeLog | 11 jaren geleden | |
FuzzyLite.cbp | 9 jaren geleden | |
FuzzyLite.vcxproj | 10 jaren geleden | |
INSTALL | 11 jaren geleden | |
LICENSE | 11 jaren geleden | |
NEWS | 11 jaren geleden | |
README.md | 11 jaren geleden | |
fuzzylite.png | 11 jaren geleden |
By: Juan Rada-Vilela, Ph.D.
License Introduction Features Example What's new : General, Macros, Operation, Engine, Input Variables and Output Variables, Linguistic Terms, Linear and Discrete Terms, Function Term, [T|S]Norms and Hedges, Rules, Rule Blocks, Weighted Defuzzifiers, Integral Defuzzifiers, Importers and Exporters, Examples, Console, Fixed Bugs and Leaks What's next Migrating to v5.0 Bulding from source Binaries
fuzzylite
will always be free and open source. However, fuzzylite
is no longer released under the Apache License. Since version 5.0, fuzzylite
is dual-licensed under the GNU Lesser General Public License (LGPL) v3.0 and a paid commercial license.
In brief, an important restriction the LGPL imposes on your closed-source application is that you are no longer allowed to statically link against fuzzylite
. If your application requires static linking, you will need to purchase a commercial license from FuzzyLite Limited. Please, contact [email protected] for commercial licenses, and refer to the GNU LGPL for further information on your rights.
The change of license is an attempt to raise funds in order to be able to work part-time in the development of the fuzzylite
family of products, namely fuzzylite
(C++), jfuzzylite
(Java), pyfuzzylite
(Python), and QtFuzzyLite
(Windows/Linux/Mac).
There are still many things to do!
Besides donations, you can significantly contribute by purchasing a license of the entirely new QtFuzzyLite
commercial application. In addition, if you require (paid) private support, please contact [email protected].
fuzzylite
is a free and open-source fuzzy logic control library programmed in C++ for multiple platforms (Windows, Linux, Mac, iOS). Its goal is to allow you to easily create fuzzy logic controllers in a few steps utilizing object-oriented programming without requiring any third-party libraries.
If you are using fuzzylite
, please cite the following reference in your article:
Juan Rada-Vilela. fuzzylite: a fuzzy logic control library, 2014. URL http://www.fuzzylite.com.
@misc{fl::fuzzylite,
author={Juan Rada-Vilela},
title={fuzzylite: a fuzzy logic control library},
url={http://www.fuzzylite.com},
year={2014}}
Controllers Types (5) Mamdani, Takagi-Sugeno, Larsen, Tsukamoto, Inverse Tsukamoto
Linguistic terms Basic (4) triangle, trapezoid, rectangle, discrete. Extended (9) bell, cosine, gaussian, gaussian product, pi-shape, sigmoid difference, sigmoid product, spike. Edges (4) concave, ramp, sigmoid, s-shape, z-shape. Functions (3) constant, linear, function.
Conjunction and Activation T-Norm (7) minimum, algebraic product, bounded difference, drastic product, einstein product, hamacher product, nilpotent minimum.
Disjunction and Accumulation S-Norm (8) maximum, algebraic sum, bounded sum, normalized sum, drastic sum, einstein sum, hamacher sum, nilpotent maximum.
Defuzzifiers Integral (5) centroid, bisector, smallest of maximum, largest of maximum, mean of maximum, Weighted (2) weighted average, weighted sum.
Hedges Types (6) any, not, extremely, seldom, somewhat, very.
Import Types (3) FuzzyLite Language fll
, Fuzzy Inference System fis
, Fuzzy Control Language fcl
.
Export Types (6) C++
, Java
, FuzzyLite Language fll
, FuzzyLite Dataset fld
, Fuzzy Inference System fis
, Fuzzy Control Language fcl
.
Examples (30+) of Mamdani, Takagi-Sugeno and Tsukamoto controllers from fuzzylite
, Octave and Matlab, each included in the following formats: C++
, Java
, fll
, fld
, fis
, and fcl
.
#include "fl/Headers.h"
int main(int argc, char* argv[]){
using namespace fl;
Engine* engine = new Engine("simple-dimmer");
InputVariable* ambient = new InputVariable;
ambient->setName("Ambient");
ambient->setRange(0.000, 1.000);
ambient->addTerm(new Triangle("DARK", 0.000, 0.500));
ambient->addTerm(new Triangle("MEDIUM", 0.250, 0.750));
ambient->addTerm(new Triangle("BRIGHT", 0.500, 1.000));
engine->addInputVariable(ambient);
OutputVariable* power = new OutputVariable;
power->setName("Power");
power->setRange(0.000, 2.000);
power->setDefaultValue(fl::nan);
power->addTerm(new Triangle("LOW", 0.000, 1.000));
power->addTerm(new Triangle("MEDIUM", 0.500, 1.500));
power->addTerm(new Triangle("HIGH", 1.000, 2.000));
engine->addOutputVariable(power);
RuleBlock* ruleblock = new RuleBlock;
ruleblock->addRule(Rule::parse("if Ambient is DARK then Power is HIGH", engine));
ruleblock->addRule(Rule::parse("if Ambient is MEDIUM then Power is MEDIUM", engine));
ruleblock->addRule(Rule::parse("if Ambient is BRIGHT then Power is LOW", engine));
engine->addRuleBlock(ruleblock);
engine->configure("", "", "Minimum", "Maximum", "Centroid");
std::string status;
if (not engine->isReady(&status))
throw Exception("Engine not ready. "
"The following errors were encountered:\n" + status, FL_AT);
for (int i = 0; i < 50; ++i){
scalar light = ambient->getMinimum() + i * (ambient->range() / 50);
ambient->setInputValue(light);
engine->process();
FL_LOG("Ambient.input = " << Op::str(light) << " -> " <<
"Power.output = " << Op::str(power->getOutputValue()));
}
}
The entire fuzzylite
library has been thoroughly revised, refactored, validated, and significantly improved. The following sections detail the changes and enhancements of version 5.0. Users of previous versions are strongly encouraged to carefully read the list before migrating to version 5.0. Important changes and enhancements are marked as (important), (VERY important) and (EXTREMELY important).
fuzzylite v5.0
is dual-licensed under the GNU LGPL v3.0 and a paid commercial license.C++98
and C++11
using the latest features.g++
, Clang
, MSVC
.Accumulated
, FactoryManager
, Function
, OutputVariable
, Rule
, and RuleBlock
).RuleBlock::[conjunction|disjunction|activation]
, Accumulated::accumulation
, and OutputVariable::defuzzifier
are required but set to fl::null
, thereby replacing the operations that would lead to [signal 11] Segmentation fault
to operations that throw a fl::Exception
instead.fuzzylite
in debug
and release
mode.d
(e.g.,fuzzylited.dll
, libfuzzylited.so
).fuzzylite/src/m/compare.m
to compare the output values of your fuzzylite
engines with the evaluation of the same engine in Octave/Matlab.fuzzylite
and those obtained with Octave/Matlab. Based on the examples, the average mean square error (MSE) between the output values is less than 7.3e-12
(or 0.0000000000073
) due to negligible differences in floating-point arithmetic. The results and comparison can be found in examples/examples.mat
.####Macros
C++11
with smart pointers, method identifiers, move constructors and move operators as follows. For precise information, refer to file fuzzylite/fl/fuzzylite.h
. FL_IOVERRIDE override
, FL_IFINAL final
, FL_IDEFAULT = default
, FL_IDELETE = delete
, FL_INOEXCEPT noexcept
, FL_DEFAULT_COPY(Class)
, FL_DEFAULT_MOVE(Class)
, and FL_DEFAULT_COPY_AND_MOVE(Class)
.FL_unique_ptr
to refer to std::auto_ptr
(C++98
) or std::unique_ptr
(C++11
), and its respective FL_move_ptr(x)
to move a smart pointer, albeit FL_move_ptr(x)
is not used within the library as it is not needed.const long fl::null = 0L
to refer to the null pointer in C++98
and const std::nullptr_t null = nullptr
to refer to the null pointer in C++11
.FL_DEBUG
to FL_DBG
.FL_BEGIN_DEBUG_BLOCK
and FL_END_DEBUG_BLOCK
to FL_DEBUG_BEGIN
and FL_DEBUG_END
, respectively.FL_EXPORT
to FL_API
FL_EXPORT_LIBRARY
and FL_IMPORT_LIBRARY
. If you are building fuzzylite
as a shared library, you need to define FL_EXPORT_LIBRARY
. If you are building fuzzylite
executable and it utilizes the fuzzylite
shared library, you need to define FL_IMPORT_LIBRARY
. If you are building fuzzylite
as a static library and/or building fuzzylite
executable using the fuzzylite
static library, then you do not need to define either FL_[IMPORT|EXPORT]_LIBRARY
. Note that the same conditions apply for your application. This is particularly important in Windows platforms, as FL_IMPORT_LIBRARY
and FL_EXPORT_LIBRARY
define FL_API
to __declspec(dllimport)
and __declspec(dllexport)
, respectively. If in doubt, please check fuzzylite/CMakeLists.txt
Operation::toScalar(std::string x, scalar alternative) FL_INOEXCEPT
which returns alternative
if x
is not a valid scalar
, and never throws an exception.Operation::toScalar(std::string x)
that returns the scalar value of x
or throws a fl::Exception
if x
is not a valid scalar
.Operation::toScalar(std::string, bool, scalar) FL_IDELETE;
and removed its implementation such that its usage is prevented at compile time in C++11
and at linker time in C++98
. Please, use the appropriate Op::toScalar
methods mentioned above.Op::isNan
to Op::isNaN
.fl::Op::isFinite(x)
which returns not (isNaN(x) or isInf(x))
.fl::Op::isEq(a,b)
to return true
if a == b == NaN
.fl::Op::isEq(a,b)
to return true
if a == b == Inf
.fl::Op::isEq
affect other comparison methods fl::Op::is[Lt|LEq|GEq|Gt]
.fl::Op::[gt,lt,ge,le,eq,neq](scalar a, scalar b)
, mostly to provide binary versions (without macheps
) for term Function
.Op::repeat
.fuzzylite::configuration()
.fuzzylite::_macheps = 1e-6;
.Op::makeValidId
to Op::validName
, which now returns "unnamed"
for empty strings.####Engine
Engine::hedges
(and relevant methods) to Rule::hedges
.enum Engine::Type{Mamdani, Larsen, TakagiSugeno, Tsukamoto, InverseTsukamoto, Hybrid, Unknown}
.Type Engine::type(std::string* name, std::string* reason)
to infer the type of the engine based on its configuration, additionally provides the name of the type and the inference reasons for its type.Engine::isReady(std::string)
to satisfy the default operation of controllers. The method Engine::isReady(std::string)
was initially conceived to provide information before a potential [signal 11] Segmentation fault
happened due to improper configuration. However, given the improved handling of signals and exceptions mentioned in Section General, using method Engine::isReady(std::string)
is not necessary except for providing suggestions of what could potentially cause an error.Engine::set[Input|Output]Variables(std::vector)
and Engine::setRuleBlocks(std::vector)
.Engine::[input|output]Variables()
and Engine::ruleBlocks()
to return mutable references.Engine::variables()
to retrieve a vector (copy) containing the InputVariables
followed by the OutputVariables
.Engine::updateReferences()
to update the references to the engine in all the necessary linguistic terms (i.e., Linear
and Function
).Engine::clone()
.Engine
.####Input Variables and Output Variables
OutputVariable::[get|set]OutputValue()
to [retrieve|store] value from defuzzificationscalar OutputVariable::defuzzify()
to void OutputVariable::defuzzify()
because now it automatically stores the defuzzified output value, and also stores the previous valid output value regardless of locks. Like in version 4.0, if OutputVariable::lockPreviousOutputValue=true
, and the defuzzified output value is not valid (i.e., [NaN|Inf]
) or no rules were activated, then the defuzzified output value is replaced for the previous valid output value.OutputVariable::defuzzifyNoLocks()
.OutputVariable::lastValidOutputValue
to OutputVariable::previousOutputValue
.OutputVariable::[get|set]LastValidOutput()
to OutputVariable::[get|set]PreviousOutputValue()
.OutputVariable::lockValidOutput
to OutputVariable::lockPreviousOutputValue
.OutputVariable::setLockValidOutput()
to OutputVariable::setLockPreviousOutputValue()
.OutputVariable::isLockingValidOutput()
to OutputVariable::isLockedPreviousOutputValue()
.OutputVariable::lockOutputRange
to OutputVariable::lockOutputValueInRange
.OutputVariable::setLockOutputRange()
to OutputVariable::setLockOutputValueInRange()
.OutputVariable::isLockingOutputRange()
to OutputVariable::isLockedOutputValueInRange()
.std::string InputVariable::fuzzyInputValue()
and std::string OutputVariable::fuzzyOutputValue()
.OutputVariable::clear()
to clear the fuzzy output, and set OutputVariable::previousOutputValue = fl::nan
and set OutputVariable::outputValue = fl::nan
.Variable::terms()
to return mutable reference.OutputVariable::[defuzzifier|fuzzyOutput]
to smart pointers (FL_unique_ptr
).Term
.fl::nan
.Term::copy()
to Term::clone()
in every Term
.Term::updateReference(Term*, Engine*)
to ensure Linear
and Function
terms have updated pointers to the Engine
(useful when cloning and copy-constructing).Concave
, Cosine
and Spike
.Accumulated
to take Activated*
terms instead of const Terms*
.const
from return type of method SNorm* Accumulated::[get|set]Accumulation()
.Accumulated::accumulation
to a smart pointer (FL_unique_ptr
).Accumulated::terms()
to return mutable reference.Triangle::[set|get][A|B|C]
to ::[set|get]Vertex[A|B|C]
.Trapezoid::[set|get][A|B|C|D]
to ::[set|get]Vertex[A|B|C|D]
.Thresholded
to Activated
.Thresholded::[set|get]Threshold()
to Activated::[set|get]Degree()
.[Ramp|Sigmoid]::Direction{ NEGATIVE, ZERO, POSITIVE }
to refer to the slope.Ramp::direction()
and Sigmoid::direction()
to retrieve direction of slope.Discrete
, Linear
and Function
terms.Linear
from having pointers to the input variables to having a pointer to the Engine
.Linear::coefficients
to protected
.Linear::coefficients()
, Linear::setCoefficients()
.Linear
term no longer throws exception when inputVariables != |coefficients|
.Discrete::[x|y]
.typedef std::pair<scalar, scalar> Discrete::Pair
.Discrete::[x|y]
from std::vector<scalar>
to std::vector<Discrete::Pair>
.Discrete::setXY()
and Discrete::xy()
to set and get the new representation of pairs.Discrete::xy(int index)
to retrieve Discrete::Pair
at index
.Discrete::toPairs(std::vector<scalar>)
which throws an exception if the vector is missing a value (i.e., std::vector<scalar>.size() % 2 != 0
), and Discrete::toPairs(std::vector<scalar>, scalar missingValue)
which adds missingValue
in case std::vector<scalar>.size() %2 == 1
, hence never throwing an exception.Discrete::toVector(std::vector<Discrete::Pair>)
to convert std::vector<Discrete::Pair>
to a std::vector<scalar>
.Discrete::formatXY()
to get pairs (x,y)
nicely formatted.####Function Term
Function::Operator
and Function::BuiltInFunction
into a single struct Function::Element
.Function::Element
of type Operator
starting from 100
and decreasing by 10
. The precedence of built-in operators is the following: (100)
Logical not [!]
and Negation [~]
; (90)
Power [^]
; (80)
Multiplication [*]
, Division [/]
and Modulo [%]
; (70)
Addition [+]
and Subtraction [-]
; (60)
Logical AND [and]
and Logical OR [or]
. If you have registered your own operators, please adjust their precedence as required.Function
built-in comparison functions gt,lt,ge,le,eq
and operator logical not !
.Function::Unary
and Function::Binary
to take scalar
instead of double
.public Function::root
to protected Function::_root
and it is now a smart pointer (FL_unique_ptr
).Function::root()
to return pointer to Function::root
.Function
to a FunctionFactory
.if Ambient is not very extremely bright
, now evaluates as follows not(very(extremely(bright)))
.TNorm
nilpotent minimum and SNorm
nilpotent maximum.Norm
.Hedge
.Engine::hedges
to Rule::hedges
.Engine::hedges
(and methods) to Rule::hedges
.Rule::isLoaded()
to determine whether a rule was properly parsed and thus can be activated.Rule::unload()
to allow the existence of a rule in an inactive state (useful for invalid rules).Rule::FL_ASSIGNS
and method Rule::assignsKeyword()
, for which the symbol =
in rules is no longer valid.Rule::setText()
to public
.Rule::load(const Engine*)
.Rule::[antecedent|consequent]
to smart pointers (FL_unique_ptr
).Antecedent::[get|set]Root()
to Antecedent::[get|set]Expression()
.[Antecedent|Consequent]::[get|set]Text()
.[Antecedent|Consequent]::[load|unload]()
, with the same objective as Rule::[load|unload]()
.RuleBlock::reloadRules()
.RuleBlock::setRules(std::vector)
.RuleBlock::rules()
to return mutable reference.const
from TNorm
and SNorm
in RuleBlock::[get|set][Conjunction|Disjunction|Activation]()
, respectively.RuleBlock::[conjunction|disjunction|activation]
to smart pointers (FL_unique_ptr
).OutputVariable
can be utilized in the Antecedent
of a Rule
. For example, considering the rule if Power is high then InversePower is low
, where Power
and InversePower
are both output variables, the activation degree of the Antecedent
will correspond to the accumulated activation degree of the term high
in the fuzzy output of Power
. If Power::accumulation = none
, the accumulated activation degree of the term high
will be computed as the regular sum of the activation degrees of term high
in the fuzzy output of Power
. Otherwise, the accumulated activation degree is computed utilizing the Power::accumulation
operator.WeightedDefuzzifier
from which classes Weighted[Average|Sum]
are derived.WeightedDefuzzifier::Type{Automatic, TakagiSugeno, Tsukamoto}
and respective methods WeightedDefuzzifier::[get|set]Type()
and WeightedDefuzzifer::getTypeName()
.WeightedDefuzzifier::inferType(Term*)
to automatically determine the WeightedDefuzzifier::Type
based on the class of Term
.WeightedDefuzzifier::type = Automatic
, which automatically infers the type based on the WeightedDefuzzifier::inferType()
.WeightedDefuzzifier::type = Automatic
because WeightedDefuzzifier::inferType()
performs three dynamic_cast<>
.Tsukamoto
. Its method static tsukamoto()
was moved to virtual WeightedDefuzzifier::tsukamoto()
, which allows overriding itTsukamoto
with Concave
terms.OutputVariable::accumulation = none
. Unlike version 4.0, the RuleBlock::activation
will not have any effect on Takagi-Sugeno nor Tsukamoto controllers, for which RuleBlock::activation
should also be set to none
. More information about the roles of the OutputVariable::accumulation
and RuleBlock::activation
operators are detailed as follows. Refer to sciweavers to convert LaTeX equations.RuleBlock::activation
TNorm
on the Weighted[Average|Sum]
always performs a regular multiplication of the weights and the values (i.e., $w_i \times z_j$) regardless of the TNorm
chosen. In other words, selecting any RuleBlock::activation
for Weighted[Average|Sum]
is irrelevant, and should be set to none
as every TNorm
will have the same multiplication effect. This operation is different from fuzzylite
version 4.0, where the RuleBlock::activation
operator was utilized to multiply the weights and values (i.e. $w_i \otimes z_j$), and therefore the traditional operation of the Weighted[Average|Sum]
was achieved when RuleBlock::activation = AlgebraicProduct;
.OutputVariable::accumulation = none
on the Weighted[Average|Sum]
results in a regular sum of the multiplied weights and values, i.e., $\dfrac{\sum_i^n w_i \times z_j}{\sum_i^n w_i}$. However, if the OutputVariable::accumulation != none
, the role of the SNorm
will be to accumulate the activation degrees of the repeated terms in the fuzzy output of the variable. For example, considering the rules if Ambient is dark then Power is high
and if Ambient is medium then Power is high
, for any input value of Ambient
that activates both rules, the fuzzy output of Power
will have the term high
activated with the degree from Rule 1
, and the term high
activated with the degree from Rule 2
. Since the term high
appears twice in the fuzzy output, the role of the accumulation operator will be to accumulate the activation degree of high
resulting in $\dfrac{(w_1 \oplus w2) \times z{high}}{(w_1 \oplus w_2)}$. If another term were activated, the result would be $\dfrac{(w_1 \oplus w2) \times z{high} + w_i \times z_j}{(w_1 \oplus w_2) + w_i}$. In version 4.0, the accumulation operator had no effect on the Weighted[Average|Sum]
.fl::nan
when [minimum|maximum]=[NaN|Inf]
.static int IntegralDefuzzifier::defaultResolution=200
, and can be changed via static IntegralDefuzzifier::setDefaultResolution()
.fuzzylite
, the accumulation operator has been for several versions associated with the output variables and not with the rule blocks, despite that the FCL format and other fuzzy logic control libraries associate the accumulation operator with the rule blocks. The argument for such a decision is that fuzzylite
provides coherent support for multiple rule blocks operating on the same engine and on the same output variables. For example, if multiple rule blocks operate on the same output variables, it only makes sense to have a single accumulation operator associated with each output variable such that the defuzzifier can naturally operate over the accumulated fuzzy output. Differently, if the accumulation operator were associated with the rule block, the possibility of having different accumulation operators in different rule blocks questions (1) the possibility of having multiple rule blocks operating over the same output variables; and (2) the usage of different accumulation operators over the accumulation and defuzzification processes. Certainly, if (1) is not possible, i.e, different rule blocks only operate on different output variables, then (2) is not a problem because the accumulation process and defuzzification of each variable will only have a single accumulation operator. It is therefore that the association of the accumulation operator with the output variable in fuzzylite
provides a better design and an additional feature that allows having multiple rule blocks operating over the same output variables.Defuzzifier::clone()
.####Importers and Exporters
height
property, [Fll|Fis|Fcl]Exporter
exports terms with an additional scalar
at the end, which indicates the height
of the term. However, if height=1.0
, the additional scalar is not exported.[Fll|Fis|Fcl]Importer
, when importing terms, if there is an additional scalar
it will be assumed as the height
of the term. For example, term: high Gaussian 1.0 0.5 0.75
will create a Gaussian
term with mean 1.0
, standard deviation 0.5
and height 0.75
. This is extremely important because there are some examples from Matlab in fis
format that append a useless 0.0
to some terms.FisExporter
, if the Takagi-Sugeno controller has no activation
or accumulation
operators (as it should generally be the case), Octave and Matlab will not be able to import the fis
file. To overcome this issue, you will have to set ImpMethod="min"
and AggMethod="max"
, where ImpMethod
and AggMethod
are just dummy operators that can be set to any TNorm
and SNorm
, respectively.[Fis|Fcl]Exporter
by exporting the additional features of fuzzylite
only when these are different from the default operation. For example, the following features will not be exported given their values: [Input|Output]Variable::enabled = true;
, OutputVariable::lock-previous = false;
, OutputVariable::lock-range = false;
, amongst others.'lock-valid'
to 'lock-previous'
.'LockValid'
to 'LockPrevious'
.'LOCK: VALID'
to 'LOCK: PREVIOUS'
.[Fll|Fld|Fis|Fcl]Exporter::toFile()
.[Fll|Fis|Fcl]Importer::fromFile()
.FldExporter
exports the FuzzyLite Dataset of an engine utilizing the input values of another FuzzyLite Dataset.FldExporter
no longer restarts the engine when exporting.FldExporter::toWriter()
to FldExporter::write()
.int FldExporter::_maximum
.CppExporter
to prepend the namespace prefix fl::
to the classes, and by default it does not prepend prefix.FisImporter
when importing fis
files whose scalar values have more than three decimal numbers.[Fis|Fcl]Importer::extract*
to [Fis|Fcl]Importer::parse*
.CloningFactory<T>
to create clones of objects.FunctionFactory
based on CloningFactory<Function::Element>
where function operators and methods are stored to be cloned as necessary by Function
. Additional functions and operators can be easily registered.Function
to FunctionFactory
.Factory<T>::[register|deregister]Class()
to Factory<T>::[register|deregister]Constructor()
.Factory<T>
to ConstructionFactory<T>
.typedef Factory::Creator
to typedef Factory::Constructor
.FactoryManager
to smart pointers (FL_unique_ptr
).mamdani/SimpleDimmerInverse.fll
and mamdani/Laundry.fll
.original
example files in fis
format.examples/original/*.fis
to examples/original/*.fll
.original/takagi-sugeno
examples to reflect activation: none; accumulation: none;
.original
examples.fuzzylite/src/m/compare.m
to compare the output values of your fuzzylite
engines with the evaluation of the same engine in Octave/Matlab.examples/examples.mat
containing the comparison of the output values between fuzzylite
and Matlab's Fuzzy Logic Toolbox.fuzzylite -i SimpleDimmer.fll -of fld
.#### Fixes Bugs and Leaks
if Ambient is not very extremely bright
evaluates as follows not(very(extremely(bright)))
.Triangle
when a=b
or b=c
, and Trapezoid
when a=b
or c=d
.~RuleBlock::[conjunction|disjunction|activation]
.~Accumulated::accumulation
.~OutputVariable::defuzzifier
.~Function::Node
.~FactoryManager::[factories]
.throw ex;
to just throw;
-DFL_USE_FLOAT=ON
Building from source requires you to have CMake installed.
The files fuzzylite/build.bat
and fuzzylite/build.sh
are automatic build scripts for Windows and Unix platforms, respectively. The usage of these scripts is presented as follows.
> build.bat help
Usage: build.bat [options]
where [options] can be any of the following:
all builds fuzzylite in debug and release mode (default)
debug builds fuzzylite in debug mode
release builds fuzzylite in release mode
clean erases previous builds
help shows this information
$ ./build.sh help
Usage: [bash] ./build.sh [options]
where [options] can be any of the following:
all builds fuzzylite in debug and release mode (default)
debug builds fuzzylite in debug mode
release builds fuzzylite in release mode
clean erases previous builds
help shows this information
(important) After executing the building script, the binaries will be built and stored in the sub-folders release/bin
and debug/bin
.
For more 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 are available:
-DFL_USE_FLOAT=ON
builds the binaries using typedef float fl::scalar
instead of typedef double fl::scalar
(default is OFF, i.e., double is used)
-DFL_BACKTRACE=OFF
disables the backtrace information in case of errors (default in Unix platforms is ON, and in Windows platforms is OFF). In Windows, the backtrace information requires the library dbghelp
, which should be available in your system.
-DFL_CPP11=ON
builds fuzzylite
utilizing C++11
features (default is OFF, i.e., C++98
)
-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.
After building from source, the following are the relevant binaries that will be created in release
mode. In debug
mode, binaries will append a d
at the end of the name (e.g., fuzzylited.dll
).
fuzzylite.exe
fuzzylite.dll
, fuzzylite.lib
fuzzylite-static.lib
fuzzylite
libfuzzylite.so
libfuzzylite.a
fuzzylite
libfuzzylite.dylib
libfuzzylite.a
The console application of fuzzylite
allows you to import and export your controllers. Its usage can be obtained executing the console binary. In addition, the FuzzyLite Interactive Console is activated when exporting to fld
without providing an output file. The interactive console allows you to evaluate any controller by manually providing the input the values.
For more information, visit www.fuzzylite.com.
fuzzylite™ is a trademark of FuzzyLite Limited.
Copyright © 2010-2014 FuzzyLite Limited. All rights reserved.