谁可以用matlab或者lingo解决这个非线性规划问题

来源:百度知道 编辑:UC知道 时间:2024/06/01 06:10:24
min=sqrt(x^2+y^2)+sqrt(x^2+(y-52)^2)+sqrt(x^2+(y-139.5)^2)+sqrt(x^2+(y-228)^2)+sqrt(x^2+(y-288)^2)+sqrt((x-65)^2+y^2)+sqrt((x-84)^2+y^2)+sqrt((x-110)^2+(y-288)^2)+sqrt((x-110)^2+(y-217)^2)+sqrt((x-110)^2+(y-93)^2)+sqrt((x-110)^2+y^2)+sqrt((x-65)^2+y^2);
x>0;
x<110;
y>0;
y<288;

fun=@(x)sqrt(x(1)^2+x(2)^2)+sqrt(x(1)^2+(x(2)-52)^2)+sqrt(x(1)^2+(x(2)-139.5)^2)+sqrt(x(1)^2+(x(2)-228)^2)+sqrt(x(1)^2+(x(2)-288)^2)+sqrt((x(1)-65)^2+x(2)^2)+sqrt((x(1)-84)^2+x(2)^2)+sqrt((x(1)-110)^2+(x(2)-288)^2)+sqrt((x(1)-110)^2+(x(2)-217)^2)+sqrt((x(1)-110)^2+(x(2)-93)^2)+sqrt((x(1)-110)^2+x(2)^2)+sqrt((x(1)-65)^2+x(2)^2);
lb=[0;0];
ub=[110;228];
options=optimset('PlotFcns',{@optimplotx,@optimplotfirstorderopt,@optimplotstepsize,@optimplotfval});
[x,fval]=fmincon(fun,rand(2,1),[],[],[],[],lb,ub,[],options)

Optimization terminated: magnitude of directional derivative in search
direction less than 2*options.TolFun and maximum constraint violation
is less than options.TolCon.
No active inequalities.

x =

55.3467
74.3034

fval =

1.3748e+003