24小时热门版块排行榜    

查看: 2163  |  回复: 7
当前主题已经存档。

zsgandy

至尊木虫 (职业作家)

[交流] 【求助】求助三元函数条件极值(已解决)

要求有详细执行程序及结果(推荐用MATLAB),题目如下:

y=x(1)*(-271.21+211.206579*x(3)-38.5844296*x(3)*log(x(3))+0.018531982*x(3)^2-0.000005764227*x(3)^3+74092*x(3)^(-1)+7934*10^(-20)*x(3)^7)+(1-x(1)-x(2))*(-5677.958+146.176046*x(3)-32.4913959*x(3)*log(x(3))+0.00154613*x(3)^2)+x(2)*(9496.31-9.809114*x(3)-8.2590486*x(3)*log(x(3))-0.016814429*x(3)^2+2.623132*10^(-6)*x(3)^3-1081244*x(3)^(-1))+8.314*x(3)*(x(1)*log(x(1))+x(2)*log(x(2))+(1-x(1)-x(2))*log(1-x(1)-x(2)))
+x(1)*(1-x(1)-x(2))*(47933.6-10.71995*x(3)+(14407.33-6.65287*x(3))*(2*x(1)+x(2)-1)+(4742.6-0.72034*x(3))*(2*x(1)+x(2)-1)^2)+x(1)*x(2)*(16330-4.983*x(3)+(4112-1.151*x(3))*(x(1)-x(2))+(1765-0.574*x(3))*(x(1)-x(2))^2)
+x(2)*(1-x(1)-x(2))*(6200-0.418*x(3)+(1-x(1)-2*x(2))*(790-1.914*x(3)))
+x(1)*x(2)*(1-x(1)-x(2))*((-100000+57.7*x(3))*x(1)-3286*(1-x(1)-x(2))-364*x(2))    其中,  0 式中log指自然对数,^2是2次方,以此类推^3,^4....,

求出y极小值点及对应的x(1),x(2),x(3),求出的y值应该是负数。
通过电子邮件发给我:zsgandyliu@126.com

[ Last edited by woshilsh on 2009-6-13 at 22:24 ]
回复此楼
已阅   关注TA 给TA发消息 送TA红花 TA的回帖

hakuna

木虫 (知名作家)


mingdong(金币+1,VIP+0):谢谢! 5-29 06:37
引用回帖:
Originally posted by zsgandy at 2009-5-27 18:21:
要求有详细执行程序及结果(推荐用MATLAB),题目如下:

y=x(1)*(-271.21+211.206579*x(3)-38.5844296*x(3)*log(x(3))0.018531982*x(3)^2-0.000005764227*x(3)^3+74092*x(3)^(-1)+7934*10^ ...

你可以找个遗传算法求函数极值的程序,把里面的函数改一下试试看。
2楼2009-05-27 21:01:30
已阅   关注TA 给TA发消息 送TA红花 TA的回帖

zsgandy

至尊木虫 (职业作家)

请应助者直接给出结果,不需要建议,本人小白!!呵呵
3楼2009-05-27 21:28:27
已阅   关注TA 给TA发消息 送TA红花 TA的回帖

q68

铁杆木虫 (著名写手)

★ ★ ★ ★ ★
zsgandy(金币+5,VIP+0):谢谢 5-28 11:48
我来试一试!
QQ531550249联系一下你的表达式有问题!

[ Last edited by q68 on 2009-5-28 at 10:18 ]
4楼2009-05-28 10:01:54
已阅   关注TA 给TA发消息 送TA红花 TA的回帖

zsgandy

至尊木虫 (职业作家)

引用回帖:
Originally posted by q68 at 2009-5-28 10:01:
我来试一试!
QQ531550249联系一下你的表达式有问题!

[ Last edited by q68 on 2009-5-28 at 10:18 ]

已改正,少了个加号,谢谢!!
5楼2009-05-28 11:45:49
已阅   关注TA 给TA发消息 送TA红花 TA的回帖

q68

铁杆木虫 (著名写手)

★ ★ ★ ★ ★
zsgandy(金币+5,VIP+0):虽然没错误了,但是很感动您的热心! 5-28 13:29
函数仍然有问题!
6楼2009-05-28 13:15:55
已阅   关注TA 给TA发消息 送TA红花 TA的回帖

sldsunny

木虫 (小有名气)

★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ...
zsgandy(金币+90,VIP+0):太谢谢了!!!!!!! 5-28 23:32
-38.5844296*x(3)*log(x(3))+0.018531982*x(3)^2-0.000005764227*x(3)^3+74092*x(3)^(-1)+7934*10^(-20)*x(3)^7)+(1-x(1)-x(2))*(-5677.958+146.176046*x(3)-32.4913959*x(3)*log(x(3))+0.00154613*x(3)^2)+x(2)*(9496.31-9.809114*x(3)-8.2590486*x(3)*log(x(3))-0.016814429*x(3)^2+2.623132*10^(-6)*x(3)^3-1081244*x(3)^(-1))+8.314*x(3)*(x(1)*log(x(1))+x(2)*log(x(2))+(1-x(1)-x(2))*log(1-x(1)-x(2)))+x(1)*(1-x(1)-x(2))*(47933.6-10.71995*x(3)+(14407.33-6.65287*x(3))*(2*x(1)+x(2)-1)+(4742.6-0.72034*x(3))*(2*x(1)+x(2)-1)^2)+x(1)*x(2)*(16330-4.983*x(3)+(4112-1.151*x(3))*(x(1)-x(2))+(1765-0.574*x(3))*(x(1)-x(2))^2)+x(2)*(1-x(1)-x(2))*(6200-0.418*x(3)+(1-x(1)-2*x(2))*(790-1.914*x(3)))+x(1)*x(2)*(1-x(1)-x(2))*((-100000+57.7*x(3))*x(1)-3286*(1-x(1)-x(2))-364*x(2))    ','x')
LB=[0.004 0.7355 456.15];
UB=[1 1 753.15];
x0=[0.003 0 400]
[x,fval,exitflag]=fmincon(Y,x0,[],[],[],[],LB,UB)

Y =

     Inline function:
     Y(x) = x(1)*(-271.21+211.206579*x(3)-38.5844296*x(3)*log(x(3))+0.018531982*x(3)^2-0.000005764227*x(3)^3+74092*x(3)^(-1)+7934*10^(-20)*x(3)^7)+(1-x(1)-x(2))*(-5677.958+146.176046*x(3)-32.4913959*x(3)*log(x(3))+0.00154613*x(3)^2)+x(2)*(9496.31-9.809114*x(3)-8.2590486*x(3)*log(x(3))-0.016814429*x(3)^2+2.623132*10^(-6)*x(3)^3-1081244*x(3)^(-1))+8.314*x(3)*(x(1)*log(x(1))+x(2)*log(x(2))+(1-x(1)-x(2))*log(1-x(1)-x(2)))+x(1)*(1-x(1)-x(2))*(47933.6-10.71995*x(3)+(14407.33-6.65287*x(3))*(2*x(1)+x(2)-1)+(4742.6-0.72034*x(3))*(2*x(1)+x(2)-1)^2)+x(1)*x(2)*(16330-4.983*x(3)+(4112-1.151*x(3))*(x(1)-x(2))+(1765-0.574*x(3))*(x(1)-x(2))^2)+x(2)*(1-x(1)-x(2))*(6200-0.418*x(3)+(1-x(1)-2*x(2))*(790-1.914*x(3)))+x(1)*x(2)*(1-x(1)-x(2))*((-100000+57.7*x(3))*x(1)-3286*(1-x(1)-x(2))-364*x(2))


x0 =

    0.0030         0  400.0000

Warning: Large-scale (trust region) method does not currently solve this type of problem,
switching to medium-scale (line search).
> In fmincon at 260
Optimization terminated: first-order optimality measure less
than options.TolFun and maximum constraint violation is less
than options.TolCon.
Active inequalities (to within options.TolCon = 1e-006):
  lower      upper     ineqlin   ineqnonlin
    1          3                     
    2                                 

x =

    0.0040    0.7355  753.1500


fval =

-5.3350e+004


exitflag =

     1
略加调整自变量,使之在迭代范围内收敛。
7楼2009-05-28 21:00:08
已阅   关注TA 给TA发消息 送TA红花 TA的回帖

zsgandy

至尊木虫 (职业作家)

求助已结束,请版主删帖,谢谢!
8楼2009-05-29 10:02:06
已阅   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 zsgandy 的主题更新
信息提示
请填处理意见