回复: function 的问题
建议楼主不要用matlab求解这个题目,因为matlab求解此类题目很烦。
lingo求解程序:
model:
min=200*@sqrt((x-30)^2+(y-8)^2)
+300*@sqrt((x-6)^2+(y-11)^2)
+250*@sqrt((x-12)^2+(y-65)^2)
+100*@sqrt((x-56)^2+(y-28)^2)
+150*@sqrt((x-45)^2+(y-39)^2);
@sqrt((x-30)^2+(y-8)^2)-35<0;
@sqrt((x-6)^2+(y-11)^2)-35<0;
@sqrt((x-12)^2+(y-65)^2)-35<0;
@sqrt((x-56)^2+(y-28)^2)-35<0;
@sqrt((x-45)^2+(x-39)^2)-35<0;
@bnd(6,x,56);
@bnd(8,y,65);
end
程序求解结果:
Global optimal solution found.
Objective value: 28546.47
Objective bound: 28546.45
Infeasibilities: 0.000000
Extended solver steps: 13
Total solver iterations: 1285
Variable Value Reduced Cost
X 22.22188 0.000000
Y 31.52593 0.000000
|