1
Prezados, Seguem, já em Scilab, as funções que devem ser minimizadas pelos algoritmos estocásticos para os problemas de robótica e de combustão: function fitness = f(x) f1=0.004731*x(1)*x(3) - 0.3578*x(2)*x(3) -0.1238*x(1) + x(7) -0.001637*x(2) - 0.9338*x(4) -0.3571 f2 = 0.2238*x(1)*x(3) + 0.7623*x(2)*x(3) + 0.2638*x(1) -0.07745*x(2) -0.6734*x(4) -0.6022 f3 = x(6)*x(8) + 0.3578*x(1) + 4.731e-3*x(2) f4 = -0.7623*x(1) + 0.2238*x(2) + 0.3461 f5 = x(1)^2+x(2)^2-1; f6 = x(3)^2+x(4)^2-1; f7 = x(5)^2+x(6)^2-1; f8 = x(7)^2+x(8)^2-1; F = [f1;f2;f3;f4;f5;f6;f7;f8]; fitness = sum(F.^2) endfunction function fitness = f(x) R = 10 R5 = 0.193 R6 = 0.002597/sqrt(40) R7 = 0.003448/sqrt(40) //R8 = 0.00001799/sqrt(40) R8 = 4.497e-7 R9 = 0.0002155/sqrt(40) R10 = 0.00003846/40 f1 = x(1)*(100*x(2)) + x(1) - 3*x(5) f2 = 2*x(1)*(100*x(2)) + x(1) + (100*x(2))*x(3)^2 + R8*(100*x(2)) - R*x(5) + 2*R10*(100*x(2))^2 + R7*(100*x(2))*x(3) + R9*(100*x(2))*x(4) f3 = 2*(100*x(2))*x(3)^2 + 2*R5*x(3)^2 - 8*x(5) + R6*x(3) + R7*(100*x(2))*x(3) f4 = R9*(100*x(2))*x(4) + 2*x(4)^2 - 4*R*x(5) f5 = x(1)*((100*x(2))+1) + R10*(100*x(2))^2 + (100*x(2))*x(3)^2 + R8*(100*x(2)) + R5*x(3)^2 + x(4)^2 - 1 + R6*x(3) + R7*(100*x(2))*x(3) + R9*(100*x(2))*x(4) F = [f1;f2;f3;f4;f5]; fitness = sum(F.^2) endfunction

Problemas de Robótica e Combustão

Embed Size (px)

DESCRIPTION

Problemas de Robótica e Combustão

Citation preview

  • Prezados,

    Seguem, j em Scilab, as funes que devem ser minimizadas pelos algoritmos estocsticos para os problemas de robtica e de combusto:

    function fitness = f(x)f1=0.004731*x(1)*x(3) - 0.3578*x(2)*x(3) -0.1238*x(1) + x(7) -0.001637*x(2) - 0.9338*x(4) -0.3571f2 = 0.2238*x(1)*x(3) + 0.7623*x(2)*x(3) + 0.2638*x(1) -0.07745*x(2) -0.6734*x(4) -0.6022f3 = x(6)*x(8) + 0.3578*x(1) + 4.731e-3*x(2)f4 = -0.7623*x(1) + 0.2238*x(2) + 0.3461f5 = x(1)^2+x(2)^2-1;f6 = x(3)^2+x(4)^2-1;f7 = x(5)^2+x(6)^2-1;f8 = x(7)^2+x(8)^2-1;F = [f1;f2;f3;f4;f5;f6;f7;f8];fitness = sum(F.^2)endfunction

    function fitness = f(x)R = 10R5 = 0.193R6 = 0.002597/sqrt(40)R7 = 0.003448/sqrt(40)//R8 = 0.00001799/sqrt(40)R8 = 4.497e-7R9 = 0.0002155/sqrt(40)R10 = 0.00003846/40f1 = x(1)*(100*x(2)) + x(1) - 3*x(5)f2 = 2*x(1)*(100*x(2)) + x(1) + (100*x(2))*x(3)^2 + R8*(100*x(2)) - R*x(5) + 2*R10*(100*x(2))^2 + R7*(100*x(2))*x(3) + R9*(100*x(2))*x(4)f3 = 2*(100*x(2))*x(3)^2 + 2*R5*x(3)^2 - 8*x(5) + R6*x(3) + R7*(100*x(2))*x(3)f4 = R9*(100*x(2))*x(4) + 2*x(4)^2 - 4*R*x(5)f5 = x(1)*((100*x(2))+1) + R10*(100*x(2))^2 + (100*x(2))*x(3)^2 + R8*(100*x(2)) + R5*x(3)^2 + x(4)^2 - 1 + R6*x(3) + R7*(100*x(2))*x(3) + R9*(100*x(2))*x(4)F = [f1;f2;f3;f4;f5];fitness = sum(F.^2)endfunction