Debian Codegraph @

examples/original/takagi-sugeno/octave/sugeno_tip_calculator.fis

raw
1 ## Copyright (C) 2011-2012 L. Markowsky <[email protected]>
2 ##
3 ## This file is part of the fuzzy-logic-toolkit.
4 ##
5 ## The fuzzy-logic-toolkit is free software; you can redistribute it
6 ## and/or modify it under the terms of the GNU General Public License
7 ## as published by the Free Software Foundation; either version 3 of
8 ## the License, or (at your option) any later version.
9 ##
10 ## The fuzzy-logic-toolkit is distributed in the hope that it will be
11 ## useful, but WITHOUT ANY WARRANTY; without even the implied warranty
12 ## of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ## General Public License for more details.
14 ##
15 ## You should have received a copy of the GNU General Public License
16 ## along with the fuzzy-logic-toolkit; see the file COPYING. If not,
17 ## see <http://www.gnu.org/licenses/>.
18
19 ## Author: L. Markowsky
20 ## Keywords: fuzzy-logic-toolkit fis
21 ## Directory: fuzzy-logic-toolkit/inst/
22 ## Filename: sugeno_tip_calculator.fis
23 ## Last-Modified: 28 Aug 2012
24
25 % Sugeno Tip Calculator
26
27 % Computes cheap, average, and generous tips
28 % given food quality and service ratings.
29
30 [System]
31
32 Name = 'Sugeno-Tip-Calculator'
33 Type = 'sugeno'
34 Version = 1.0
35 NumInputs = 2
36 NumOutputs = 3
37 NumRules = 10
38 AndMethod = 'einstein_product'
39 OrMethod = 'einstein_sum'
40 ImpMethod = 'prod'
41 AggMethod = 'sum'
42 DefuzzMethod = 'wtaver'
43
44 [Input1]
45
46 Name = 'Food-Quality'
47 Range = [1 10]
48 NumMFs = 2
49 MF1 = 'Bad' : 'trapmf', [0 1 3 7]
50 MF2 = 'Good' : 'trapmf', [3 7 10 11]
51
52 [Input2]
53
54 Name = 'Service'
55 Range = [1 10]
56 NumMFs = 2
57 MF1 = 'Bad' : 'trapmf', [0 1 3 7]
58 MF2 = 'Good' : 'trapmf', [3 7 10 11]
59
60 [Output1]
61
62 Name = 'Cheap-Tip'
63 Range = [5 25]
64 NumMFs = 3
65 MF1 = 'Low' : 'constant', [10]
66 MF2 = 'Medium' : 'constant', [15]
67 MF3 = 'High' : 'constant', [20]
68
69 [Output2]
70
71 Name = 'Average-Tip'
72 Range = [5 25]
73 NumMFs = 3
74 MF1 = 'Low' : 'constant', [10]
75 MF2 = 'Medium' : 'constant', [15]
76 MF3 = 'High' : 'constant', [20]
77
78 [Output3]
79
80 Name = 'Generous-Tip'
81 Range = [5 25]
82 NumMFs = 3
83 MF1 = 'Low' : 'constant', [10]
84 MF2 = 'Medium' : 'constant', [15]
85 MF3 = 'High' : 'constant', [20]
86
87 [Rules]
88
89 1.30 1.30, 1.30 1.20 1.00 (1) : 1
90 2.00 1.30, 1.00 1.00 2.00 (1) : 1
91 2.20 1.20, 1.00 2.00 3.00 (1) : 1
92 1.00 1.00, 1.00 1.00 2.00 (1) : 1
93 2.00 1.00, 1.00 2.00 3.00 (1) : 1
94 2.30 1.00, 1.00 2.00 3.20 (1) : 1
95 1.00 2.00, 1.00 2.00 3.00 (1) : 1
96 2.00 2.00, 2.00 2.00 3.20 (1) : 1
97 1.20 2.20, 1.00 2.00 3.00 (1) : 1
98 2.40 2.40, 3.00 3.20 3.30 (1) : 1