ARL Master Index
Defining fuzzy sets over Fuzzy variables
Fuzzy sets are declared in the Fuzzy
variable declaration.
There are many types of predefined fuzzy sets that you may
declare over a Fuzzy variable. If none of the
predefined types meet your needs, you can use the
Segments fuzzy set to define your own fuzzy shape.
On this page...
NOTE: Some sets are defined by specifying points
describing line segments. Because of the way in which the
surface of fuzzy sets are stored internally, you must never
describe a perfectly vertical line. For example, you must never
describe a trapezoidal set as (5, 5, 10, 10) which represents
perfectly vertical left and right sides. As a work around, use
(4.9, 5.1, 9.9, 10.1) or something similar instead.
NOTE: To define "upside-down" sets, use a Complement constructor. Each type of fuzzy set has a single argument constructor, where the argument is the name of the associated base fuzzy set. For example, to make an "upside-down" triangle, code:
Triangle myTriangle_Pointing_Up = new Triangle(10,15,20);
Triangle myTriangle_Pointing_Down = new Triangle(myTriangle_Pointing_Up);
A complement set has exactly the same shape and end points as
the original set, but the truth values are inversed.
A bell-shaped curve for representing fuzzy numbers; more tightly
compacted than the PI curve and the membership
function goes to zero only at extremely large widths.
Syntax
Beta <setName> = new Beta ( <centerPoint>, <width>, <weight>];
Beta <setNameComp> = new Beta( <setName>) ;
)
Parameters
- <setName>
- Is an identifier that names a
fuzzy set. The name must not already exist for the containing
Fuzzy variable.
- <centerPoint>
- Is a number within
the Fuzzy variable's universe of discourse on which
the curve is to be centered.
- <width>
- Is a number that is
the distance from the <centerPoint> to the curve's
inflexion point at the 0.5 truth value.
- <weight>
- Is a number that can
attenuate the shape of the curve. This parameter is optional,
and if omitted, defaults to 1.0, which produces an unattentuated
curve.
Examples
Beta medium = new Beta(50,5); // Inflection points at 45 and 55
Beta fatMedium = new Beta(50,10); // Inflection points at 40 and 60
Beta skinnyCurve = new Beta(50,1); // Inflexion points at 49 and 51
Return to top
A bell-shaped curve for representing fuzzy numbers; the slope of
membership goes to zero very quickly with a very short tail.
Syntax
Gaussian <setName> = new Gaussian ( <centerPoint> , <widthFactor>);
Gaussian <setNameComp> = new Gaussian(setName) ; // complement
Parameters
- <setName>
- Is an identifier that names
the fuzzy set. The name must not already exist for the containing
Fuzzy variable.
- <centerPoint>
- Is a number within
the Fuzzy variable's universe of discourse on which
the curve is to be centered.
- <widthFactor>
- Is a number that influences
the width of the curve, whose overall shape is hard to predict. Typical
values are from 0.9 through 5.0 inclusive, although any value greater
than zero is allowed. The larger the value, the wider the curve; the
smaller the value, the narrower the curve.
Examples
Gaussian gauss1 = new Gaussian(50,0.5);
Gaussian gauss2 = new Gaussian(50,9);
Gaussian gauss3 = new Gaussian(50,1);
Return to top
A straight-line fuzzy set.
Linear Up: / Linear Down: \
Syntax
Linear <setName> = new Linear (<beginPoint>,<endPoint>,<direction>);
Linear <setNameComp> = new Linear(setName) ; // complement
Parameters
- <setName>
- Is an identifier that names a
fuzzy set. The name must not already exist for the containing
Fuzzy variable.
- <beginPoint>
- Is a number within
the Fuzzy variable's universe of discourse at which the
line is to begin.
- <endPoint>
- Is a number within
the Fuzzy variable's universe of discourse at which the
line is to end. The number must be greater than beginPoint.
- <direction>
- Is a keyword, either
Up or Down, that specifies whether the line is
to slope up or down. If the line slopes up, the beginning
point (and all points to the left) will have a truth value of
0.0; the end point (and all points to the right) will have a
truth value of 1.0. If the line slopes down, the truth values
are reversed.
Example
Linear tall = new Linear(4.5, 6.5, Up);
Return to top
A bell-shaped curve for representing fuzzy numbers; the membership value
becomes zero at a discrete point.
Syntax
Pi <setName> = new Pi (<centerPoint>,<width>,<weight>);
Pi <setNameComp> = new Pi(setName) ;
Parameters
- <setName>
- Is an identifier that names a
fuzzy set. The name must not already exist for the containing
Fuzzy variable.
- <centerPoint>
- Is a number within
the Fuzzy variable's universe of discourse on which
the curve is to be centered.
- <width>
- Is a number that is
the distance from the <centerPoint> to the curve's
end point at the 0.0 truth value.
- <weight>
- Is a number that can
attenuate the shape of the curve. This parameter is optional,
and if omitted, defaults to 1.0, which produces an unattentuated
curve.
Examples
Pi foo = new Pi(50,5); // End points at 45 and 55 (Inflection at 47.5 and 52.5) bar Pi(50,10) // End points at 40 and 60 baz Pi(50,1) // End points at 49 and 51
Return to top
A surface specified by point/truth-value pairs, with line segments
interpolated between the points. At least two pairs must be
given, and any values falling outside the range of points have a
0.0 truth value.
Syntax
Segments <setName> = new Segments (<point1 truthValue1, point2 truthValue2[, ..., pointn truthValuen]>);
Segments <setNameComp> = new Complement( <setName> );
Parameters
- <setName>
- Is an identifier that names a
fuzzy set. The name must not already exist for the containing
Fuzzy variable.
- <point>
- Is a number within
the Fuzzy variable's universe of discourse for which
a truth value is specified. Points must be increasing from left
to right.
- <truthValue>
- Is a number from 0.0
to 1.0 inclusive, and specifies the truth value at the given
point.
Example
Segments risk = new Segments(5 0.0, 10 0.5, 15 0.75, 20 0.75, 25 0.5, 30 0.5);
Return to top
__ __
Left shoulder: \ Right shoulder: /
Syntax
Shoulder <setName> = new Shoulder (<beginPoint>,<endPoint>,<direction>);
Shoulder <setNamecomp> = new Shoulder(<setName>) ;
Parameters
- <setName>
- Is an identifier that names a
fuzzy set. The name must not already exist for the containing
Fuzzy variable.
- <beginPoint>
- Is a number within
the Fuzzy variable's universe of discourse at which
the vertical part of the shoulder is to begin. For Left
shoulders, the horizontal part of the shoulder extends from the
universe of discourse low value to this point.
- <endPoint>
- Is a number within
the Fuzzy variable's universe of discourse at which
the vertical part of the shoulder is to end. The number must be
greater than beginPoint. For Right shoulders, the
horizontal part of the shoulder extends from to this point to
the universe of discourse high value.
- <direction>
- Is a keyword, either
Left or Right, that specifies whether the
horizontal part of the shoulder (that is, the segment with
membership values of 1.0) appears on the left or right of the
vertical part of the shoulder. The vertical part of left
shoulders decrease, while the vertical part of right shoulders
increase.
Examples
For some fuzzy variable 0 to 100:
Shoulder foo = new Shoulder( 5, 10, Left ); // 0-5 horizontal; 5-10 decreasing bar Shoulder(80, 90, Right) // 80-90 increasing; 90-100 horizontal
Return to top
An S-shaped curve.
Syntax
Sigmoid <setName> = new Sigmoid (<leftPoint>,<flexPoint>,<rightPoint>,<direction>);
Sigmoid <setNameComp> = new Sigmoid( <setName> ) ;
Parameters
- <setName>
- Is an identifier that names a
fuzzy set. The name must not already exist for the containing
Fuzzy variable.
- <leftPoint>
- Is a number within
the Fuzzy variable's universe of discourse that
specifies the point at which the curve is to begin.
- <flexPoint>
- Is a number within
the Fuzzy variable's universe of discourse that
specifies the point at which the curve is to flex. The number
must be greater than leftPoint.
- <rightPoint>
- Is a number within
the Fuzzy variable's universe of discourse that
specifies the point at which the curve is to end. The number
must be greater than flexPoint.
- <direction>
- Is a keyword, either
Up or Down, that specifies whether the membership
function of the S-shaped curve is to increase from truth value
0.0 to truth value 1.0, or decrease from truth value 1.0 to
truth value 0.0, respectively.
Examples
Sigmoid foo = new Sigmoid(50, 55, 60, Up ); // A symmetrical, increasing S-curve bar Sigmoid(50, 59, 60, Down) // An asymmetrical, decreasing S-curve
Return to top
A rectangular-shaped set, sometimes used in place of bell-shaped
sets.
Syntax
Trapezoid <setName> = new Trapezoid (<leftPoint>,<leftCorePoint>,<rightCorePoint>,<rightPoint>);
Trapezoid <setNameComp> = new Trapezoid( < setName>);
Parameters
- <setName>
- Is an identifier that names a
fuzzy set. The name must not already exist for the containing
Fuzzy variable.
- <leftPoint>
- Is a number within
the Fuzzy variable's universe of discourse that
specifies the point at which the lower left corner of the
trapezoid is placed. The point has a truth value of 0.0.
- <leftCorePoint>
- Is a number within
the Fuzzy variable's universe of discourse that
specifies the point at which the upper left corner of the
trapezoid is placed. The number must be greater than
leftPoint. The point has a truth value of 1.0.
- <rightCorePoint>
- Is a number within
the Fuzzy variable's universe of discourse that
specifies the point at which the upper right corner of the
trapezoid is placed. The number must be greater than
leftCorePoint. The point has a truth value of 1.0.
- <rightPoint>
- Is a number within
the Fuzzy variable's universe of discourse that
specifies the point at which the lower right corner of the
trapezoid is placed. The number must be greater than
rightCorePoint. The point has a truth value of 0.0.
Example
Trapezoid foo = new Trapezoid( 50,55,60,65 );
Return to top
A triangular-shaped set.
Syntax
Triangle <setName> = new Triangle (<leftPoint>,<centerPoint>,<rightPoint>);
Triangle <setNameComp> = new Triangle(<setName>);
Parameters
- <setName>
- Is an identifier that names a
fuzzy set. The name must not already exist for the containing
Fuzzy variable.
- <leftPoint>
- Is a number within
the Fuzzy variable's universe of discourse that
specifies the point at which the lower left corner of the
triangle is placed. The point has a truth value of 0.0.
- <centerPoint>
- Is a number within
the Fuzzy variable's universe of discourse that
specifies the point at which the peak of the triangle is
placed. The number must be greater than leftPoint. The
point has a truth value of 1.0.
- <rightPoint>
- Is a number within
the Fuzzy variable's universe of discourse that
specifies the point at which the lower right corner of the
triangle is placed. The number must be greater than
centerPoint. The point has a truth value of 0.0.
Example
Triangle foo = new Triangle(50,55,60);
Return to top
Able Rule Language master index.
Able RuleSet Editor master index.
Rules package table of contents.
Last modified: Thu Mar 29 10:12:46 CST 2001