请问一下,matlab中报错:Warning: Trust-region-reflective method does not currently solve this type of problem, using active-set (line search) instead.> In fmincon at 422Optimization terminated: no feasible solution found. Magnitude of search direction less than 2*options.TolX but constraints are not satisfied.这是什么原因导致的。附原程序:(function f=fun9(x)f=-(15 -10*x(4) -0.5*x(5) -30*x(6) -50*x(7))*x(1)-(20-15*x(4)-0.8*x(5)-24*x(6)-45*x(7)) *x(2)-(16-18*x(4)-1.0*x(5)-20*x(6)-46*x(7)) *x(3);>> A=[10 15 18 0 0 0 0;0.5 0.8 1 0 0 0 0;30 24 20 0 0 0 0;50 45 46 0 0 0 0];b=[1000;80;2000;4000];>> vlb=[50 40 40 0 0 0 0];vub=[];x0=[50;40;40;0;0;0;0];>> [x,fval]=fmincon('fun9',x0,A,b,[],[],vlb,vub)
我做出来也是这个答案,但是由于x(4),x(5),x(6),x(7)是成本,所以不可能为零。
|