{ Xr[i]=Xc[i]+af*(Xc[i]-Xh[i]); }
if(cons(Xr)==1) { if(F(Xr)>=F(Xh)) { if(af<=ep) { for(i=0;i {af=1/*af;gotoss;} } else { for(i=0;i s333:printf(\ for(i=0;i } printf(\} printf(\姓名:丁文浩学号: 四、实验结果: 五、应用举例: 复合形法程序测试题 1、minF(X)=(x1?2)2+(x2?1)2 g(X)=x2?x12≥0 g(X)=2?x2?x1≥0 取:x1∈【?5 6】x2∈【?5 8】k=4?=10?3 实验结果: 2、 minF(X)=100(x2?x1)2+(1?x1)2+90(x4?x32)2 + (1?x3)2+10[(x1?1)2+(x4?1)2]+19.8(x2?1)(x4?1) 实验结果: 3、minF(X)?x1?x2?x1x2?10x1?4x2?60 实验结果: 22
复合形法C语言程序
{Xr[i]=Xc[i]+af*(Xc[i]-Xh[i]);}if(cons(Xr)==1){if(F(Xr)>=F(Xh)){if(af<=ep){for(i=0;i
推荐度:
点击下载文档文档为doc格式