A FUZZYVAR object is a representation of a fuzzy variable consisting of various linguistic terms with their own parameters, membership functions and instantiated membership functions.
The parameters for the fuzzy variable and its linguistic terms are taken from the PARAMETERSET object that was associated to a FUZZYVAR on declaration of the latter by a statement with the following syntax:
FUZZYVAR fuzzyvar_name parameterset_name
In contrast to crisp variables, fuzzy variables have to be declared before use. This makes sense, because we are not able to work on a FUZZYVAR object that is not described by a PARAMETERSET.
A FUZZYVAR is implemented by the use of the FLIP++ class CombinedVariable (flipcvar.h). To illustrate the concept of a FUZZYVAR object we give a complete internal representation of My_fuzzyvar from the example in 7.5.2:
range_lower_end: 0
range_upper_end: 50
median: 20
distribution: 0.9
dilatation: 0.9
importance: 1.0
linguistic_term: low
lower_support_end: 0
upper_support_end: 19.1
fs_color: blue
function: point_list
match_value: 0
membership_function: 0/0 0/1 11/1 19.1/0
instanciated_membership_function: 0/0 19.1/0
linguistic_term: medium
lower_support_end: 2.9
upper_support_end: 37.1
fs_color: green
function: point_list
match_value: 0.167
membership_function: 2.9/0 11/1 29/1 37.1/0
instanciated_membership_function: 2.9/0 4.25/0.167 35.8/0.167 37.1/0
linguistic_term: high
lower_support_end: 20.9
upper_support_end: 50
fs_color: red
function: point_list
match_value: 0
membership_function: 20.9/0 29/1 50/1 50/0
The membership and instanciated membership functions are represented by a linear list of point (x and y-coordinate) objects. This is indicated by the type of function that is used: point_list. The match_value represents the value of intersection between the crisp_value of a FUZZYVAR (CombinedVariable) and the membership function of a specific linguistic term, or, in other words, match_value indicates the satisfaction of a linguistic term achieved by a crisp_value.
A FUYYZVAR is assigned a value by the SET statement:
SET My_fuzzyvar ( = | : ) <expression>
The evaluation of a FUZZYVAR objects can be forced by the following statement:
EVAL My_fuzzyvar
This statement starts the process of converting a fuzzy value to a crisp value. The most common method of defuzzification is the centroid, or center of gravity, defuzzification method. This evaluation happens according to the rules stated in the RULESET for My_fuzzyvar and the selected operators used in the OPERATORSET. Once evaluated, a FUZZYVAR object can be accessed like any other (crisp) variable in CSI(C&F).