ZKX's LAB

matlab做非线性规划如何把好几个约束条件一起加上去? 非线性函数约束如何编写

2020-10-02知识12

非线性约束规划 我编制了 目标函数和约束函数 为什么在matlab中还是出错 求大神看看这不给力的 function f=myfun(x)f=0.192457*10^(-4)*(x(2)+2)*x(1)^2*x(3);function[c,cep]=mycon(x)c(1)=350-163*x(1)^(-2.86)*x(3)^0.86;c(2)=10-0.14*0.01*x(1)^-4*x(2)*x(3)^3;c(3)=(x(2)+1.5)*x(1)+0.44*0.01*x(1)^(-4)*x(2)*x(3)^3-3.7*x(3);c(4)=375-0.356*10^6*x(1)*x(2)^(-1)*x(3)^(-2);c(5)=4-x(3)/x(1);cep=[];A=[-1 0 01 0 00-1 00 1 00 0-10 0 1];b=[-1;4;4.5;50;10;30];x0=[2.0;5.0;25.0];lb=zeros(3,1);[x,fval,exitflag,output,lambda]=fmincon(@myfun,x0,A,b,[],[],lb,[],@mycon)Warning:Trust-region-reflective method does not currently solve this typeof problem,using active-set(line search)instead.In fmincon at 439Local minimum possible.Constraints satisfied.fmincon stopped because the size of the current search direction is less thantwice the default value of the step size tolerance and constraints weresatisfied to within the default value of the constraint tolerance.Active inequalities(to within options.TolCon=1e-006):lower upper ineqlin ineqnonlin13x=1.00004.500011.7155fval=0.0015。

matlab做非线性规划如何把好几个约束条件一起加上去? 非线性函数约束如何编写

matlab做非线性规划如何把好几个约束条件一起加上去? 参数NONLCON只能写一个约束条件啊 10,009 如果非线性约束中同时出现等式约束和不等式约束,或者仅仅出现某一类约束中的多条,你可以直接自定义函数来编写你的NONLCON 。

matlab做非线性规划如何把好几个约束条件一起加上去? 非线性函数约束如何编写

非线性函数分段线性化时,如何约束分段变量取值的优先顺序? 1:http://homepages.rpi.edu/~mitchj/handouts/piecew.

matlab做非线性规划如何把好几个约束条件一起加上去? 非线性函数约束如何编写

如何将非线性规划转换成线性规划 令x^2=u>;0,则目标函数为u+y+4z求最小值约束条件如下:4u+y+z>;=5y-z=0,y>;=2,z>;=0

非线性函数分段线性化时,如何约束分段变量取值的优先顺序?

#fmincon#matlab函数#非线性#分段函数

随机阅读

qrcode
访问手机版