Each CSI(C&F) program has a RULESET object, that has not to be declared explicitly. It even can't be declared by the use of any RULESET statement. Whenever a FUZZYVAR, OPERATORSET, or PARAMETERSET object is declared in a CSI(C&F) program, it is automatically inserted in the RULESET object of CSI(C&F). Now we will discuss the functionality of RULESET in detail.
The CSI(C&F) object RULESET (FLIP++ class RuleSet in fliprule.h) aggregates all the different rules for a list of FUZZYVAR objects (FLIP++ class CombinedVariable in flipcvar.h) to one linear list, with additional parameters. Among them is a list of FUZZYVAR objects, a list of PARAMETERSET objects and one OPERATORSET object, so this class combines all of the functionality contained in FLIP++. All rules concerning one specific FUZZYVAR object (one CombinedVariable) are aggregated to one RuleBlock. Such rules consist of terms on the left side and a term on the right side. The left side terms are aggregated by a concatenation operator out of {AND, OR}, those functionality is specified inOPERATORSET. Additionally, every rule has a certainty attached to it. The format of a rule is
IF <termlist> THEN <term> WITH CERTAINTY c.
where
termlist = term | termlist ("AND" | "OR") term
term = Ident
Ident = (letter | digit) (letter | digit)*
digit = 0..9
letter = printable ascii characters
c [0,1]
The internal structure of a RULESET can be written to a file by the following statement:
EXPORT RULESET File_Name
Analogous to this we can read a whole RULESET from a file by the use of
IMPORT RULESET File_Name
To delete a whole RULESET we have to write
DELETE RULESET
To display the actual contents or a RULESET we can use the debugging statement
MEMDUMP RULESET
Now we complete the example started in 7.5.1 by giving the internal representation of an instantiation of a RULESET object:
My_parameterset (1)
0 50 20 0.9 0.9 1.0
/* #: 3 */ blue green red
/* #: 3 */ low medium high
/* #: 3 */ (2)
My_fuzzyvar 0 50 20 0.9 0.9 1.0
...linguistic terms, membership functions, etc., as in 7.5.1
in1 0 50 20 0.9 0.9 1.0
...linguistic terms, membership functions, etc., as in 7.5.1
in2 0 50 20 0.9 0.9 1.0
...linguistic terms, membership functions, etc., as in 5.1
minimum minimum maximum minimum maximum minimum cog 1 10 (3)
RuleSet (4)
/* #: 1 */
/* #: 9 */
IF in1 IS low AND in2 is high THEN My_fuzzyvar IS medium WITH CERTAINTY 1.
IF in1 IS medium AND in2 is low THEN My_fuzzyvar IS low WITH CERTAINTY 1.
IF in1 IS medium AND in2 is medium THEN My_fuzzyvar IS medium WITH CERTAINTY 1.
IF in1 IS medium AND in2 is high THEN My_fuzzyvar IS medium WITH CERTAINTY 1.
IF in1 IS high AND in2 is low THEN My_fuzzyvar IS medium WITH CERTAINTY 1.
IF in1 IS high AND in2 is medium THEN My_fuzzyvar IS medium WITH CERTAINTY 1.
IF in1 IS high AND in2 is high THEN My_fuzzyvar IS high WITH CERTAINTY 1.
In this example only one PARAMETERSET object My_parameterset
(1) was inserted after declaration in RULSET. Then we can find
3 FUZZYVAR objects, namely in1, in2,
and My_fuzzyvar (2). They were all created with the same