I am using GA to optimize the parameters of the membership functions in my fuzzy system. I create a function for fitness:
function y = gafuzzy(x)
global FISsys
global allData
global realResult
FISsys = readfis('aCAess.fis');
allData = importdata('ab.mat');
realResult = importdata('ad.mat');
FISsys.input(1,1).mf(1,1).params = [x(1) x(2) x(3)];
FISsys.input(1,1).mf(1,2).params = [x(4) x(5) x(6)];
FISsys.input(1,2).mf(1,1).params = [x(7) x(8) x(9)];
FISsys.input(1,2).mf(1,2).params = [x(10) x(11) x(12)];
FISsys.output.mf(1,1).params = [x(13) x(14) x(15)];
FISsys.output.mf(1,2).params = [x(16) x(17) x(18)];
c = evalfis(allData,FISsys);
e=sum(abs(c-realResult));
y = e;
end
And A[15*18] matrix for linear inequalities is :
A = [1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
0,1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
0,0,0,1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0;
0,0,0,0,1,-1,0,0,0,0,0,0,0,0,0,0,0,0;
0,0,0,0,0,0,1,-1,0,0,0,0,0,0,0,0,0,0;
0,0,0,0,0,0,0,1,-1,0,0,0,0,0,0,0,0,0;
0,0,0,0,0,0,0,0,0,1,-1,0,0,0,0,0,0,0;
0,0,0,0,0,0,0,0,0,0,1,-1,0,0,0,0,0,0;
0,0,0,0,0,0,0,0,0,0,0,0,1,-1,0,0,0,0;
0,0,0,0,0,0,0,0,0,0,0,0,0,1,-1,0,0,0;
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-1,0;
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-1;
0,1,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0;
0,0,0,0,0,0,0,1,0,0,-1,0,0,0,0,0,0,0;
0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,-1,0]
and b[15*1] vector is:
b = [0;0;0;0;0;0;0;0;0;0;0;0;0;0;0]
but when I run GA, I get this error: Illegal parameters in fisTriangleMf() --> a > b
why?