24小时热门版块排行榜    

Znn3bq.jpeg
汕头大学海洋科学接受调剂
查看: 769  |  回复: 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
回复此楼

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

fungarwai

新虫 (小有名气)

【答案】应助回帖

★ ★ ★ ★ ★
感谢参与,应助指数 +1
199107011523: 金币+5, ★★★很有帮助 2016-06-23 15:38:20
你没有Aeq,beq,空着

[t,fval]=fmincon(@(t) fun567(t),t,[],[],[],[],[],[],@mycon3_1)
3楼2016-06-22 17:57:54
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 8 个回答

199107011523

新虫 (小有名气)

哪位好心人帮帮忙了,急急急

发自小木虫Android客户端
2楼2016-06-22 10:18:08
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

199107011523

新虫 (小有名气)

引用回帖:
3楼: Originally posted by fungarwai at 2016-06-22 17:57:54
你没有Aeq,beq,空着

=fmincon(@(t) fun567(t),t,[],[],[],[],[],[],@mycon3_1)

好像不是这个问题的
4楼2016-06-22 18:32:19
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

fungarwai

新虫 (小有名气)

引用回帖:
4楼: Originally posted by 199107011523 at 2016-06-22 18:32:19
好像不是这个问题的...

我看到的是这样

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
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 材料工程085601,270求调剂 +42 @ASDF1234 2026-04-08 46/2300 2026-04-14 18:12 by 逍遥三郎
[考研] 材料相关专业344求调剂双非工科学校或课题组 +21 hualkop 2026-04-12 22/1100 2026-04-14 17:44 by lhj2009
[考研] 297,工科调剂?河南农业大学本科 +9 河南农业大学-能 2026-04-14 9/450 2026-04-14 16:03 by Art1977
[考研] 各位老师好,求调剂,本科211,一志愿天津大学生物与医药学硕,差两名录取。 +11 路六六jjj 2026-04-13 11/550 2026-04-14 16:01 by zs92450
[基金申请] RY:中国产出的科学垃圾论文,绝对数量和比例都世界第一 +6 zju2000 2026-04-14 17/850 2026-04-14 14:34 by jurkat.1640
[考研] 食品与营养(0955)271求调剂 +15 升格阿达 2026-04-12 16/800 2026-04-14 13:18 by 浮若_安生
[考研] 310求调剂 +15 666真好 2026-04-11 17/850 2026-04-13 22:27 by pies112
[考研] 297工科,求调剂? +13 河南农业大学-能 2026-04-12 13/650 2026-04-13 14:12 by dingyanbo1
[考研] 考研二轮调剂 +10 故人?? 2026-04-09 10/500 2026-04-13 09:55 by szhize
[考研] 085410 273求调剂 +10 X1999 2026-04-09 10/500 2026-04-12 09:24 by 逆水乘风
[考研] 0860004 求调剂 309分 +9 Yin DY 2026-04-08 9/450 2026-04-11 22:55 by dongdian1
[考研] 药学专硕调剂 +8 ? 一路生?花? 2026-04-10 10/500 2026-04-11 21:21 by zhouxiaoyu
[考研] 求调剂 +3 胃痉挛累了 2026-04-11 5/250 2026-04-11 14:13 by luhong1990
[考研] 281求调剂 +11 觉得好的吧 2026-04-10 11/550 2026-04-11 09:35 by 逆水乘风
[考研] 284求调剂 +12 archer.. 2026-04-10 13/650 2026-04-11 08:44 by zhq0425
[考研] 一志愿北理工298英一数二已上岸,感谢各位老师 +14 Reframe 2026-04-10 16/800 2026-04-10 23:07 by caotw2020
[考研] 085800 能源动力求调剂 +6 阿biu啊啊啊啊啊 2026-04-10 6/300 2026-04-10 15:03 by hemengdong
[考研] 材料化工总分334求调剂 +16 Riot2025 2026-04-08 17/850 2026-04-09 20:19 by maddjdld
[考研] 0860004 求调剂 309分 +6 Yin DY 2026-04-09 6/300 2026-04-09 10:19 by 啊李999
[考研] 招收有机化学、化工,药学,食品灯专业学生 +3 yrfhjgdj 2026-04-08 3/150 2026-04-09 10:15 by QYQX_123
信息提示
请填处理意见