clear all;clc;
global Cs rhos Cc fc fy b0 rd fc fy L F
xuehao=6301;
Cs=4500;rhos=7.8e-9;Cc=400e-9;b0=200;rd=1.2;fc=10;fy=310;L=6500;
F=xuehao/8*1000;
% F=651000
options = optimoptions('ga','PlotFcn',@gaplotbestf,'Display','iter','MaxGenerations',150);
% x(1)=b;
% x(2)=h;
% x(3)=n;
% x(4)=d;
lb=[b0 0 4 12];
ub=[];
A = [1,-1,0,0];
b = [0];
nvars=4;
[x,fval,exitflag,output]= ga(@fun,nvars,A,b,[],[],lb,ub,@mycon,[1,2,3,4],options);
b=x(1)
h=x(2)
n=x(3)
d=x(4)
As=n*pi/4*d^2
cost=fval*1000 %Ԫ/m
评论0