algorithm - Optimization of FIS membership functions, via GA -
i trying optimize fis of ga, matlab optimization toolbox. code looks this:
function errorr=fun3_2(x) name='eleni'; type='mamdani'; numinputs='8'; numoutputs='1'; % numrules='80'; andmethod='min'; ormethod='max'; impmethod='min'; aggmethod='max'; defuzzmethod='centroid'; a=newfis('eleni'); %inputs_______________input 1____________ a.input(1).name='arias'; a.input(1).range=[0 1]; a.input(1).mf(1).name='1'; a.input(1).mf(1).type='trimf'; a.input(1).mf(1).params=[x(1) x(2) x(3)]; a.input(1).mf(2).name='2'; a.input(1).mf(2).type='trimf'; a.input(1).mf(2).params=[x(4) x(5) x(6)]; a.input(1).mf(3).name='3'; a.input(1).mf(3).type='trimf'; a.input(1).mf(3).params=[x(7) x(8) x(9)];
.... ...and on, totally 8 inputs , 1 output of 10 mfs each.
i insert linear inequalities correctly, as
0<x(1)<x(2)<x(3)<1 0<x(4)<x(5)<x(6)<1
..etc..
but after 10 or less iterations process stops , following error message appers:
error running optimization. illegal parameter condition: b > c
any ideas of should keep running?
the tables , b linear inequalities, (assuming 2 mfs, , generalize it)
a=[-1 0 0 0 0 0; 1 -1 0 0 0 0; 0 1 -1 0 0 0; 0 0 1 0 0 0; 0 0 0 -1 0 0; 0 0 0 1 -1 0; 0 0 0 0 1 -1; 0 0 0 0 0 1] b=[0;0;0;1;0;0;0;1]
matrix b problem, because ΑΧ<=Β, in way suggests maybe x1=x2..etc. the equality must eliminated! assuming there slight difference between parameters, solves problem, table b must defined follows, , ga runs:
b=[-0.01;-0.01;-0.01;0.99;-0.01;-0.01;-0.01;0.99]
Comments
Post a Comment