ARL Master Index


Defining fuzzy sets over Fuzzy variables

Fuzzy sets are declared in the SetDefinitions( ... ) statement of a 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 the Complement statement. For example, to make an "upside-down" triangle, code:


myTriangle_Pointing_Up  Triangle(10,15,20)
                          Complement(myTriangle_Pointing_Down)
    

A complement set has exactly the same shape and end points as the original set, but the truth values are inversed.


Beta curve

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

   <setName> Beta ( <centerPoint> [,] <width> [[,] <weight>] )
      Complement( <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


   medium Beta(50,5)      // Inflexion points at 45 and 55
   fatMedium Beta(50,10)  // Inflexion points at 40 and 60
   skinnyCurve Beta(50,1) // Inflexion points at 49 and 51
      
Return to top

Gaussian curve

A bell-shaped curve for representing fuzzy numbers; the slope of membership goes to zero very quickly with a very short tail.

Syntax

   <setName> Gaussian ( <centerPoint> [,] <widthFactor>)
      Complement( <setName> )
      

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


   gauss1 Gaussian(50,0.5)
   gauss2 Gaussian(50,9)
   gauss3 Gaussian(50,1)
      
Return to top

Linear

A straight-line fuzzy set.


     Linear Up: /    Linear Down: \
    

Syntax

   <setName> Linear ( <beginPoint> [,] <endPoint> [,] <direction> )
      Complement( <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 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


   tall Linear(4.5, 6.5, Up)
      
Return to top

Pi curve

A bell-shaped curve for representing fuzzy numbers; the membership value becomes zero at a discrete point.

Syntax

   <setName> Pi ( <centerPoint> [,] <width> [[,] <weight>] )
      Complement( <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


   foo Pi(50,5)  // End points at 45 and 55 (Inflexion 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

Segments

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

   <setName> Segments ( <point1 truthValue1, point2 truthValue2[, ..., pointn truthValuen]> )
      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


   risk Segments(5 0.0,  10 0.5,  15 0.75,  20 0.75,  25 0.5,  30 0.5)
      
Return to top

Shoulder

                    __                      __
     Left shoulder:   \    Right shoulder: /
    

Syntax

   <setName> Shoulder ( <beginPoint> [,] <endPoint> [,] <direction> )
      Complement( <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:

   foo Shoulder( 5, 10, Left )  //  0-5 horizontal;   5-10  decreasing
   bar Shoulder(80, 90, Right)  // 80-90 increasing; 90-100 horizontal
      
Return to top

Sigmoid

An S-shaped curve.

Syntax

   <setName> Sigmoid ( <leftPoint> [,] <flexPoint> [,] <rightPoint> [,] <direction> )
      Complement( <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


   foo Sigmoid(50, 55, 60, Up  )  // A symmetrical, increasing S-curve
   bar Sigmoid(50, 59, 60, Down)  // An asymmetrical, decreasing S-curve
      
Return to top

Trapezoid

A rectangular-shaped set, sometimes used in place of bell-shaped sets.

Syntax

   <setName> Trapezoid ( <leftPoint> [,] <leftCorePoint> [,] <rightCorePoint> [,] <rightPoint> )
      Complement( <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


   foo Trapezoid( 50,55,60,65 )
      
Return to top

Triangle

A triangular-shaped set.

Syntax

   <setName> Triangle ( <leftPoint> [,] <centerPoint> [,] <rightPoint> )
      Complement( <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


   foo 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