Fuzzy Logic Tools
v1.0.5.1
Main Page
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Macros
Pages
flt
messages.h
Go to the documentation of this file.
1
/* Copyright (C) 2004-2015
2
ANTONIO JAVIER BARRAGAN, antonio.barragan@diesia.uhu.es
3
http://uhu.es/antonio.barragan
4
5
Collaborators:
6
JOSE MANUEL ANDUJAR, andujar@diesia.uhu.es
7
8
DPTO. DE ING. ELECTRONICA, DE SISTEMAS INFORMATICOS Y AUTOMATICA
9
ETSI, UNIVERSITY OF HUELVA (SPAIN)
10
11
For more information, please contact with authors.
12
13
This software is free software: you can redistribute it and/or modify
14
it under the terms of the GNU General Public License as published by
15
the Free Software Foundation, either version 3 of the License, or
16
(at your option) any later version.
17
18
This software is distributed in the hope that it will be useful,
19
but WITHOUT ANY WARRANTY; without even the implied warranty of
20
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
GNU General Public License for more details.
22
23
You should have received a copy of the GNU General Public License
24
along with this program. If not, see <http://www.gnu.org/licenses/>.
25
*/
26
27
#ifndef _MESSAGES_H_
28
#define _MESSAGES_H_
29
30
#include <cstdlib>
31
#include <iostream>
32
33
#ifdef MATLAB_MEX_FILE
34
#include <mex.h>
35
#endif
36
55
namespace
FLT
// Use the FTL (Fuzzy Logic Tools) namespace
56
{
65
#ifdef MATLAB_MEX_FILE
66
#define WARNINGMSG(menssage) {mexWarnMsgTxt(menssage);}
67
#else
68
#define WARNINGMSG(menssage) {std::cerr << menssage << std::endl;}
69
#endif
70
79
#ifdef MATLAB_MEX_FILE
80
#define ERRORMSG(menssage) {mexErrMsgTxt(menssage); return;}
81
#else
82
#define ERRORMSG(menssage) {std::cerr << menssage << std::endl; return;}
83
#endif
84
93
#ifdef MATLAB_MEX_FILE
94
#define ERRORMSGVAL(menssage, value) {mexErrMsgTxt(menssage); return value;}
95
#else
96
#define ERRORMSGVAL(menssage, value) {std::cerr << menssage << std::endl; return value;}
97
#endif
98
99
// Some constants
100
101
#define MAX_CHAR_LONG 256
102
#define MAX_FILE_NAME 256
103
#define PRECISION 10
104
105
// Warning Messages( W_... ) ###############################################
106
#define W_InputsLimitsExceeded "Warning, the input exceeds the limits of the system."
107
#define W_OutputsLimitsExceeded "Warning, the output exceeds the limits of the system."
108
109
// Error Messages( E_... ) #################################################
110
// Model
111
#define E_Model "Error reading model."
112
#define E_NoSugeno "Model 'type' should be 'sugeno'."
113
#define E_NoOutputs "Error, the model has not any Output."
114
#define E_NoInputs "Error, the model has not any Input."
115
#define E_NoRules "Error, some Outputs of the model have not any Rule."
116
#define E_No1Conseq "Only one consequent for rule is allowed."
117
#define E_SameIns "All models must have the same inputs."
118
#define E_NoCoherent "The Controller is not coherent with the Plant."
119
#define E_InNoCoherent "Inputs arguments are not coherent with fuzzy model."
120
#define E_BadModel "Undefined or wrong fuzzy model.\nCheck rules, membership functions and theirs parameters"
121
#define E_NoCoherent_BadX "The Controller is not coherent with the Plant, or the point is not coherent with the closed loop system."
122
#define E_ArgNoValid "Empty and NaN matrices are not valid inputs arguments."
123
#define E_AccuracyNoNum "The accuracy should be a number."
124
#define E_Acquire "Error reading model or incorrect initial model."
125
#define E_Store "Error storing data. Wrong vector size or any data not valid for membership function, i.e. a zero width in Gaussmf function."
126
127
// FIS
128
#define E_NoFIS "Fuzzy Model must be a Sugeno FIS structure."
129
#define E_CreateFIS "Error at create FIS."
130
#define E_NoProd "Implication method must be 'prod'."
131
#define E_FISOut "Error writing FIS."
132
#define E_InputExceded "Input limit exceeded."
133
#define E_OutputExceded "Output limit exceeded."
134
#define E_RulesExceded "Rule limit exceeded."
135
#define E_ParamExceded "Parameter number exceeded the number of parameters of the membership function."
136
137
// Membership functions
138
#define E_MFType "Error reading membership function type:"
139
#define E_BadMF "Membership function was not identified."
140
#define E_MFTypeDef "Error in membership function type."
141
#define E_ParamMF "Error reading membership function parameters."
142
#define E_NoValidFP "Any parameter of membership function is not valid."
143
#define E_MFDef "Error in membership function definition."
144
#define E_AnymfUse "ANYMF function must not be evaluated. It is possible that there is an error in the sources, contact with authors, please."
145
146
// Consequents
147
#define E_Conseq "It is not posible read consequent type in rule:"
148
#define E_ParamConseq "Error reading TSK's consequent parameters."
149
#define E_BadConseq "Not valid cosequent."
150
151
// Files
152
#define E_FileInput "Input file error."
153
#define E_FileOutput "Output file error."
154
155
// Design
156
#define E_Syntax "Syntax error."
157
#define E_NumberParam "Number of parameters incorrect."
158
#define E_NumberArg "Error in number of arguments."
159
#define E_NumberArgIn "Error in inputs arguments"
160
#define E_NumberArgOut "Error in outputs arguments."
161
#define E_NumberRulesOut "Error, the number of rules must be a vector of size equal to the number of system outputs."
162
#define E_Column "The state vector must be a column vector."
163
#define E_In_Out_Column "Input and output vector must be column vectors."
164
#define E_InNames "Error reading names of inputs."
165
#define E_OutNames "Error reading names of outputs."
166
#define E_Controller_Init "Controller initialization error."
167
#define E_No_Points_Extracted "No points were extracted."
168
#define E_Jacobian_Calculation "It happened an error during the calculation of the Jacobian."
169
170
// Others
171
#define E_ArrayExceded "Array limit exceded."
172
#define E_ChangingParameter "Error changing the parameter."
173
#define E_WritingRule "Error writing the rule"
174
#define E_NoSumProm "Error, 'defuzzMethod' should be 'wtaver'."
175
#define E_RuleOutputFileVector "Rules and Outputs should be a file vector."
176
#define E_PointCoherent "The point/s should be coherent with fuzzy models."
177
#define E_In_No_Scalar "The number of input must be a scalar."
178
#define E_Out_No_Scalar "The number of output must be a scalar."
179
#define E_R_No_Scalar "The number of rule must be a scalar."
180
#define E_Param_No_Scalar "The number of the parameter must be a scalar."
181
#define E_Epoch_No_Scalar "The number of epoch must be a scalar."
182
#define E_Alfa_No_Scalar "Alfa must be a scalar."
183
#define E_Error_No_Scalar "The error must be a scalar."
184
#define E_ModelError "Modeling error."
185
#define E_H_GE_0 "'h' must be >= 0."
186
#define E_N_MESH_P "Number of point to make the mesh must be >1."
187
#define E_PRECISION "Precision must be >0."
188
189
// Messages to users ( U_... ) ###############################################
190
// FIS
191
#define U_FISName "Unnamed"
192
#define U_FISInput "Input"
193
#define U_FISOutput "Output"
194
#define U_RuleAbbreviation "R"
195
#define U_InputAbbreviation "-In"
196
#define U_OutputAbreviation "-Out"
197
#define U_If "IF"
198
#define U_Is "is"
199
#define U_And "and"
200
#define U_OR "or"
201
#define U_Then "THEN"
202
203
// Others
204
#define U_SeeManual "See also Fuzzy Logic Toolbox Manual."
205
#define U_SeeHelp "see the help."
206
#define U_CheckModel "Check model's definition."
207
#define U_MathException "Warning. Math exception generated."
208
#define U_Overflow "Happened an overflow."
209
#define U_FewData "There are few data for modeling the system."
210
211
// Others messages ( O_... ) ####################################################
212
// Inputs
213
#define O_Input "Input:"
214
#define O_OfIn "of in"
215
216
// Outputs
217
#define O_OfOut "of out"
218
219
// Rules
220
#define O_RuleWeigh "The rule's weigh:"
221
#define O_RuleConnection "The rule's connection:"
222
#define O_AntecedentSize "The size of rule's antecedent"
223
#define O_ConsequentSize "The size of rule's consequent"
224
#define O_Rule "Rule:"
225
226
// Others
227
#define O_DifferentOf "is different of"
228
#define O_IsNotCorrect "is not correct."
229
#define O_MF "Membership Function:"
230
#define O_OfPlant "of the Plant"
231
#define O_OfController "of Controller"
232
#define O_GeneralError "An error occurred. Please, check all parameters or contact with authors."
233
}
// Namespace FLT
234
#endif
FLT
Fuzzy Logic Tools (FLT) namespace.
Definition:
derivatives.hpp:41
Generated on Mon Mar 9 2015 17:22:43 for Fuzzy Logic Tools by
1.8.8