未注册
2008-08-21, 11:52
我在做优化的时候建立模型如下:
1,建立的优化目标函数为(M文件):
%opt1_1f.m
function f=opt1_1f(x)
f=(106.05*x(1)+464.148*(x(1)*(x(2)-44.5)^(-1))^(-0.5)+0.005694*x(4)+4783.451)*0.000115+0.00855372*x(3)+59.3+29.67+1.28;
2.其中一个非线性约束条件为(M文件):
%opt1_1f2.m
function [g,geq] =opt1_1f2(x)
g=1617.59*x(1)*(50-x(2))*(x(2)-44.5)^(-1)-x(4);
geq=0;
3.命令栏中输入的程序为:
>> x0=[500,48,1500,600000];
A=[0 -1 0 0;0 1 0 0;0 0 -1 0;0 0 1 0;0 0 0 -1;0 0 0 1;-1 0 0 0];b=[-44.5;50;0;2018.4;0;74263.2;0]
Aeq=[0 0 367.964 -1];beq=0;
options=optimset('largescale','off');
[x,f]=fmincon(@opt1_1f,x0,A,b,Aeq,beq,zeros(3,1),[],@opt1_1f2);
问题是:在运行后出现一下的文字:
Warning: Large-scale (trust region) method does not currently solve this type of problem,
switching to medium-scale (line search).
> In fmincon at 260
Maximum number of function evaluations exceeded;
increase OPTIONS.MaxFunEvals.
请问有谁知道怎么解决啊?能不能帮忙写个完整的程序啊?
1,建立的优化目标函数为(M文件):
%opt1_1f.m
function f=opt1_1f(x)
f=(106.05*x(1)+464.148*(x(1)*(x(2)-44.5)^(-1))^(-0.5)+0.005694*x(4)+4783.451)*0.000115+0.00855372*x(3)+59.3+29.67+1.28;
2.其中一个非线性约束条件为(M文件):
%opt1_1f2.m
function [g,geq] =opt1_1f2(x)
g=1617.59*x(1)*(50-x(2))*(x(2)-44.5)^(-1)-x(4);
geq=0;
3.命令栏中输入的程序为:
>> x0=[500,48,1500,600000];
A=[0 -1 0 0;0 1 0 0;0 0 -1 0;0 0 1 0;0 0 0 -1;0 0 0 1;-1 0 0 0];b=[-44.5;50;0;2018.4;0;74263.2;0]
Aeq=[0 0 367.964 -1];beq=0;
options=optimset('largescale','off');
[x,f]=fmincon(@opt1_1f,x0,A,b,Aeq,beq,zeros(3,1),[],@opt1_1f2);
问题是:在运行后出现一下的文字:
Warning: Large-scale (trust region) method does not currently solve this type of problem,
switching to medium-scale (line search).
> In fmincon at 260
Maximum number of function evaluations exceeded;
increase OPTIONS.MaxFunEvals.
请问有谁知道怎么解决啊?能不能帮忙写个完整的程序啊?