| 查看: 773 | 回复: 7 | |||
| 当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖 | |||
199107011523新虫 (小有名气)
|
[求助]
优化分析 已有1人参与
|
||
|
已知t1=67;t2=110;t3=82;t4=73;t5=33;t6=0.5;t7=0.54;69≤t4≤75;31≤t5≤35;3%≤t7-t6≤5%; y1=2t5-5t5^2-3/t5^2+(a-1)t5-at3 y2=2t5-5t5^2-3/t5^2+3t4 y3=3t4+5t5^2-3/t5^3+(a-1)t-at1 z1=y1/(t1+3*t2); z2=y2/(3*t3+2*t2); z3=y3/(t1+t5); a=t7/(t7-t6); 10≤a≤50; Z=z1+z2+z3; F=(y1+y2)/y3; 求min f=Z/F maxF minZ 以min f=Z/F为例,编写m.文件如下,运行有警告提示,希望得到高手指点: function f=fun567(t) a=t(7)/(t(7)-t(6)); y1=2*t(5)-5*t(5)^2-3/t(5)^2+(a-1)*t(2)-a*t(3); y2=2*t(5)-5*t(5)^2-3/t(5)^2+3*t(4); y3=3*t(4)+5*t(5)^2-3/t(5)^3+(a-1)*t(2)-a*t(1); z1=y1/(t(1)+3*t(2)); z2=y2/(3*t(3)+2*t(2)); z3=y3/(t(1)+t(5)); Z=z1+z2+z3; F=(y1+y2)/y3; f=Z/F function [c,ceq]=mycon3_1(t) c(1)=t(4)-8; c(2)=5-t(4); c(3)=t(5)-7; c(4)=3-t(5); c(5)=t(7)/(t(7)-t(6))-50; c(6)=10-t(6)/(t(7)-t(6)); c(7)=t(7)-t(6)-0.06; c(8)=0.03-t(7)+t(6); ceq=[]; 调用函数如下: t=[67;110;82;73;33;0.5;0.54]; [t,fval]=fmincon(@(t) fun567(t),t,[],[],Aeq,beq,[],[],@mycon3_1)@laosam280 |
» 猜你喜欢
急需调剂
已经有9人回复
申博/考博
已经有4人回复
化工学硕294分,求导师收留
已经有37人回复
求调剂
已经有11人回复
260求调剂
已经有4人回复
一志愿华中农业071010,320求调剂
已经有19人回复
304求调剂
已经有7人回复
求博导|生物质基多孔碳/超级电容方向,已有相关成果,寻能源材料/碳材料方向老师
已经有3人回复
二苯甲酮酸类衍生物
已经有6人回复
接受任何调剂
已经有4人回复
|
我看到的是这样 Warning: The default trust-region-reflective algorithm does not solve problems with the constraints you have specified. FMINCON will use the active-set algorithm instead. For information on applicable algorithms, see Choosing the Algorithm in the documentation. > In fmincon at 500 In test at 4 Warning: Your current settings will run a different algorithm (interior-point) in a future release. > In fmincon at 505 In test at 4 Local minimum found that satisfies the constraints. Optimization completed because the objective function is non-decreasing in feasible directions, to within the default value of the function tolerance, and constraints are satisfied to within the default value of the constraint tolerance. <stopping criteria details> Active inequalities (to within options.TolCon = 1e-06): lower upper ineqlin ineqnonlin 2 5 t = 1.0e+08 * -0.8936 -0.2746 1.2088 0.0000 0.0000 0.0000 0.0000 fval = -3.4171 你的c里面那些值怎么取得跟题目不一样 c(1)=t(4)-75; c(2)=69-t(4); c(3)=t(5)-35; c(4)=31-t(5); c(7)=t(7)-t(6)-0.05; |
5楼2016-06-22 18:45:12
199107011523
新虫 (小有名气)
- 应助: 0 (幼儿园)
- 金币: 234.8
- 帖子: 93
- 在线: 31.9小时
- 虫号: 3441617
- 注册: 2014-09-25
- 专业: 工程热物理相关交叉领域
2楼2016-06-22 10:18:08
3楼2016-06-22 17:57:54
199107011523
新虫 (小有名气)
- 应助: 0 (幼儿园)
- 金币: 234.8
- 帖子: 93
- 在线: 31.9小时
- 虫号: 3441617
- 注册: 2014-09-25
- 专业: 工程热物理相关交叉领域
4楼2016-06-22 18:32:19













回复此楼