24小时热门版块排行榜    

查看: 977  |  回复: 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的回帖

199107011523

新虫 (小有名气)

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

发自小木虫Android客户端
2楼2016-06-22 10:18:08
已阅   回复此楼   关注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的回帖

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的回帖

199107011523

新虫 (小有名气)

引用回帖:
5楼: Originally posted by fungarwai at 2016-06-22 18:45:12
我看到的是这样

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 info ...

恩恩,就是这样子的,可是,t的结果为什么和约束条件这么大相径庭呢
6楼2016-06-22 19:40:41
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

fungarwai

新虫 (小有名气)

引用回帖:
6楼: Originally posted by 199107011523 at 2016-06-22 19:40:41
恩恩,就是这样子的,可是,t的结果为什么和约束条件这么大相径庭呢...

这些值改过来了吗?
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;

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

Solver stopped prematurely.

fmincon stopped because it exceeded the function evaluation limit,
options.MaxFunEvals = 700 (the default value).


t =

  -32.1395
  183.1122
   70.3997
   74.3837
   32.1395
    2.1947
    2.2426


fval =

  -2.1166e+10
7楼2016-06-22 20:18:00
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

199107011523

新虫 (小有名气)

是的…就是这个过程中t1,t2,t6,t7的变化太大…我原来设定约束条件Aeq=[1,0,0,0,0,0,0;0,1,0,0,0,0,0];beq=[67,110]做过分析,发现这个过程中,t6,t7的影响占据主要因素,变化和初值差距太大了…和预期想的结果不一样的

发自小木虫Android客户端
8楼2016-06-22 21:01:23
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 199107011523 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考博] 售SCI一区文章,我:8.O.55.1.O.54,科目齐全,可伽急 +3 1uaZt2kAZj2S 2026-10-30 12/600 2026-11-01 00:23 by YXM1FDCSE8Bn
[博后之家] 售SCI文章,我:8O5.5.1.O.54,科目齐全,可+急 +3 1uaZt2kAZj2S 2026-10-30 13/650 2026-11-01 00:23 by YXM1FDCSE8Bn
[基金申请] 售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急 +5 X5bHxOULxFqb 2026-10-30 19/950 2026-11-01 00:17 by YXM1FDCSE8Bn
[硕博家园] 售SCI一区T0P文章,我:8.O.55.1.O.54,科目齐全,可+急 +4 X5bHxOULxFqb 2026-10-30 12/600 2026-11-01 00:15 by YXM1FDCSE8Bn
[基金申请] 售SCI一区文章,我:8.O.55.1.O.54,科目齐全,可伽急 +3 xvJS1BYDxvBS 2026-10-31 6/300 2026-10-31 23:23 by YXM1FDCSE8Bn
[硕博家园] 售SCI一区T0P文章,我:8.O55.1.O.54,科目全,可十急 +3 xvJS1BYDxvBS 2026-10-31 7/350 2026-10-31 23:18 by YXM1FDCSE8Bn
[考研] 售SCI一区T0P文章,我:8.O.55.1.O54,科目全,可伽急 +3 1uaZt2kAZj2S 2026-10-31 6/300 2026-10-31 23:17 by YXM1FDCSE8Bn
[博后之家] 售SCI一区文章,我:8O5.5.1.O5.4,科目全,可伽急 +3 1uaZt2kAZj2S 2026-10-31 5/250 2026-10-31 23:10 by YXM1FDCSE8Bn
[找工作] 售一区SCI文章T0P,我:8O.551.O54,科目全,可十急 +3 1uaZt2kAZj2S 2026-10-31 4/200 2026-10-31 23:10 by YXM1FDCSE8Bn
[考博] 售SCI一区T0P文章,我:8.O.55.1.O.5.4,科目全,可+急 +4 X5bHxOULxFqb 2026-10-30 19/950 2026-10-31 22:44 by YXM1FDCSE8Bn
[考研] 售SCI一区文章,我:8O5.5.1.O5.4,科目全,可伽急 +3 xvJS1BYDxvBS 2026-10-31 5/250 2026-10-31 21:59 by YXM1FDCSE8Bn
[找工作] 售SCI一区文章,我:8.O.55.1.O.54,科目齐全,可伽急 +3 1uaZt2kAZj2S 2026-10-31 4/200 2026-10-31 21:54 by YXM1FDCSE8Bn
[考博] 售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急 +3 1uaZt2kAZj2S 2026-10-31 4/200 2026-10-31 21:51 by YXM1FDCSE8Bn
[基金申请] 售SCI一区T0P文章,我:8.O.55.1.O.54,科目齐全,可+急 +3 1uaZt2kAZj2S 2026-10-30 9/450 2026-10-31 21:34 by YXM1FDCSE8Bn
[考博] 2027博士申请-临床检验诊断学、病原生物学、微生物方向 50+3 yyh@ 2026-10-28 4/200 2026-10-31 12:47 by 可淡不可忘
[硕博家园] 越来越担心硕士毕业后没有竞争力了 +8 zuesli 2026-10-27 14/700 2026-10-30 22:44 by 好运连连公主
[基金申请] 论文的挂名怎么评判贡献?基金申请中,排名第一的挂名文章 +3 biily 2026-10-25 3/150 2026-10-30 18:33 by 旁观2020
[硕博家园] 申博自荐 2篇一区TOP+1篇EI+2公开发明专利 2027博士申请 +3 小小阿光 2026-10-27 3/150 2026-10-29 23:56 by 起风了的快乐
[文学芳草园] 闲聊 +3 myrtle 2026-10-25 6/300 2026-10-29 15:28 by myrtle
[考博] 申博求助 20+3 Katrinae 2026-10-26 4/200 2026-10-27 09:56 by 北京莱茵编辑
信息提示
请填处理意见