⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ga_frobot.m

📁 其中提到遺傳學的程式碼與應用提供給次淚相向的研究者參考下載
💻 M
字号:
function PI=GA_frobot(x)
global MIN_offset MUL_factor Emin MDL r_deg Init_P Init_V
global V11 V12 V21 V22 W11 W12 b11 b21 c11 FT Mode Ki K a
% Fitness function evaluation
% PenChen Chou, 1-18-2003

V11=GA_round4dp(x(1));
V12=GA_round4dp(x(2));
V21=GA_round4dp(x(3));
V22=GA_round4dp(x(4));
b11=GA_round4dp(x(5));
b21=GA_round4dp(x(6));
W11=GA_round4dp(x(7));
W12=GA_round4dp(x(8));
c11=GA_round4dp(x(9));
Ki=GA_round4dp(x(10));
% Get Y
[t, X, Y]=sim(MDL,[0:0.05:FT]);
error=100*abs(Y(:,1)); 
ERR=sum(abs(error));
abs_in=abs(Y(:,2)); abs_y=abs(Y(:,3));
I=find(abs_y>abs_in); abs_err=abs(error); 
[max_ERR,II]=max(abs_err(I));max_ERR=max_ERR/abs(abs_in(II));
if max_ERR>0.1, ERR=ERR+5000; end;
[t, X, Y]=sim(MDL,[0:0.05:FT]);
error=100*abs(Y(:,1)); 
ERR=ERR+sum(abs(error));
abs_in=abs(Y(:,2)); abs_y=abs(Y(:,3));
I=find(abs_y>abs_in); abs_err=abs(error);
[max_ERR,II]=max(abs_err(I));max_ERR=max_ERR/abs(abs_in(II));
if max_ERR>0.1, ERR=ERR+5000; end;
[t, X, Y]=sim(MDL,[0:0.05:FT]);
error=100*abs(Y(:,1)); 
ERR=ERR+sum(abs(error));
abs_in=abs(Y(:,2)); abs_y=abs(Y(:,3));
I=find(abs_y>abs_in); abs_err=abs(error); 
[max_ERR,II]=max(abs_err(I));max_ERR=max_ERR/abs(abs_in(II));
if max_ERR>0.1, ERR=ERR+5000; end;
PI=ERR;
attached_part;
if Emin>=ERR
   Emin=ERR; fprintf('\nERR=%f',ERR);
   %save ex614_data V11 V12 V21 V22 W11 W12 b11 b21 c11 ERR
   %pause(2)
else
   fprintf('>'); 
end;   

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -