Full Description of File
FuzzGen: Source Code generator for Fuzzy Logic
Most of us in programming have heard of Fuzzy
Logic before, but few of us know much about
it. So far, the superior decision making
techniques allowed by Fuzzy Logic have not
been available for less than hundreds of
dollars -- until now. FuzzGen allows you to
graphically model decisions and output source
code in C, PASCAL, and BASIC. This CASE tool
will put you a step ahead of your programming
peers and give you new insights. Don't wait
for knowledge of Fuzzy Logic to be something
you have to take a class for to keep your job
-- get a copy of FuzzGen today.
Contents of the EXAMPLE1.DOC file
This is the documentation for Sample file EXAMPLE1.
Essentially, EXAMPLE1 is used to show the "temperature input from
0 to 100 degrees C" graph, the use of colour to denote membership
functions, and to show the rudiments of Fuzzy Logic as implemented
The low end of the graph is shown in RED and represents a
trapezoidal decision shape; it is named LOW.
The middle ground in VIOLET shows a classic triangular shape. It
is named MEDIUM.
The high end in BLUE shows another trapezoidal shape, and we
named it HIGH.
The Rule set we chose uses the input variable TEMPIN to trigger
output variable OUTSTATE. The code generated by FuzzGen is
designed to look at an input data point (i.e. TEMPIN) and determine
not only what set contains the highest membership percentage but also
to assign an output state based on this.
Rules use plain english syntax:
OR --------- Logical
For instance, Rule 1 looks to see if the output state (OUTSTATE)
is set to 1, which is the set assigned to LOW. OUTSTATE has a
number of ordinal pseudo-variables assigned to it as follows:
1 = HIGH HEAT
2 = NO_CHANGE
3 = LOW_COOL
Construction of simple rules look like this:
RULE 1: IF TEMPIN IS LOW THEN OUTSTATE IS HIGH_HEAT
Which means --
If the input data (TEMPIN) is a member of the LOW set (denoted
by RED) then the output state is HIGH_HEAT. Essentially, this is
the sort of logic you'd expect to see in a temperature controller,
but it serves to illustrate how Fuzzy Logic works.
You'll note that FuzzGen has generated all the code you need except
for implementation of the RULE set. However, this isn't overly hard
#define HIGH_HEAT 1
#define NO_CHANGE 2
#define LOW_COOL 3
If(InputTest(data_that_got_input) == 1)
This code fragment uses the generated code as an extension of
Fuzzy Rule #1 and applies it to some function called