| 查看: 1782 | 回复: 4 | ||
qinzhen724新虫 (小有名气)
|
[求助]
Matlab中用fmincon求解最小值问题,调试了好多次,一直找不到可行解,求大神指导 已有2人参与
|
|
用fmincon求解最小值问题(1个目标函数、9个变量、6个线性等式约束),一直都是No feasible solution,不知道本身无解还是什么问题。 x0=[4000;4000;2000;500;100;10;10;10;10]; A=[]; b=[]; Aeq=[-88.840439250000020, 20.679950666666663, -2.158236236666667e+02, -3.601469919166667e+02, -36.694763666666690, 21.462819666666660, -13.261596999999995, 7.477251833333336, -1.023975406666667e+02; 0.012, 0, 0, 0.012, 0.012, 0, 0, 0, 0.012; 0, 0.002, 0.002, 0, 0.004, 0, 0.003, 0.002, 0; 0.016, 0, 0.016, 0.032, 0, 0, 0, 0, 0.016; 0, 0, 0, 0, 0, 0.028, 0.014, 0, 0; 0, 0, 0, 0, 0, 0, 0, 0.032, 0.032] beq=[4588048.12066667; 171.600000000000; 21.5666666666667; 241.933333333333; 2.10000000000000; 0.600000000000000] VLB=[0.001;0.001;0.001;0.001;0.001;0.001;0.001;0.001;0.001]; VUB=[6601.833333;4978.305556;4978.305556;5172.684028;2489.152778;34.625;69.25;8.65625;8.65625]; options = optimoptions(@fmincon,'Algorithm','interior-point','MaxIter',5000); [x,fval,exitflag,output]=fmincon(@Gibbsfun,x0,A,b,Aeq,beq,VLB,VUB,[],options) %%目标函数为myobjfun function G=myobjfun(x) deltaG1=-8.841665127258336e+04; deltaG2=-1.661952727160000e+05; deltaG3=5.504948170966668e+04; deltaG4=-1.666712325249982e+03; deltaG5=1.092642304030001e+05; deltaG6=-2.281491138470000e+05; deltaG7=1.169078584030000e+05; deltaG8=1.087887085851667e+05; deltaG9=4.941138012599998e+04; G=x(1)*(deltaG1+8314*log(x(1)/sum(x)*1.2))+x(2)*(deltaG2+8314*log(x(2)/sum(x)*1.2))... +x(3)*(deltaG3+8314*log(x(3)/sum(x)*1.2))+x(4)*(deltaG4+8314*log(x(4)/sum(x)*1.2))... +x(5)*(deltaG5+8314*log(x(5)/sum(x)*1.2))+x(6)*(deltaG6+8314*log(x(6)/sum(x)*1.2))... +x(7)*(deltaG7+8314*log(x(7)/sum(x)*1.2))+x(8)*(deltaG8+8314*log(x(8)/sum(x)*1.2))... +x(9)*(deltaG9+8314*log(x(9)/sum(x)*1.2)) 计算结果如下: No feasible solution found. fmincon stopped because the size of the current step is less than the default value of the step size tolerance but constraints are not satisfied to within the default value of the constraint tolerance. <stopping criteria details> x = 1.0e+03 * 4.666024308553983 3.857233354391819 2.387214185792911 0.000001000000005 0.000001000000001 0.015465337002847 0.000001000000003 0.008656249999525 0.006364985001793 fval = -1.006342210855910e+09 exitflag = -2 output = iterations: 70 funcCount: 710 constrviolation: 5.438285104570996e+06 stepsize: 9.313859771460607e-10 algorithm: 'interior-point' firstorderopt: 0.043644013275751 cgiterations: 76 message: 'No feasible solution found. |
» 猜你喜欢
职称评审,求友友推荐见刊最快的期刊
已经有3人回复
为什么网上很多人说本周 12号出结果
已经有6人回复
听说今天filecode变了
已经有49人回复
帮忙看看fileCode
已经有12人回复
FileCode能看出啥?
已经有17人回复
奇怪,两个人的filecode固定段从头到尾一模一样
已经有6人回复
filecode
已经有9人回复
应该是93bebmhtak前后十一个字符比较关键
已经有23人回复
我的国基提前知道中了,可是同事的操作让我实在接受不了,怎么会有这样的人
已经有13人回复
小木虫上这么多卖论文的,真有人买论文么?感觉没必要啊
已经有6人回复
dingd
铁杆木虫 (职业作家)
- 应助: 1641 (讲师)
- 金币: 15037.3
- 散金: 101
- 红花: 234
- 帖子: 3410
- 在线: 1223.7小时
- 虫号: 291104
- 注册: 2006-10-28
2楼2016-01-22 20:36:15
qinzhen724
新虫 (小有名气)
- 应助: 0 (幼儿园)
- 金币: 1526.9
- 帖子: 135
- 在线: 46.4小时
- 虫号: 2706419
- 注册: 2013-10-08
- 性别: GG
- 专业: 工程热物理相关交叉领域
3楼2016-01-27 09:10:11
wang_chuan
银虫 (正式写手)
- 应助: 64 (初中生)
- 金币: 1786
- 散金: 1900
- 红花: 9
- 帖子: 512
- 在线: 90.7小时
- 虫号: 953632
- 注册: 2010-02-07
- 性别: GG
- 专业: 人工智能与知识工程
4楼2016-01-27 22:30:02
qinzhen724
新虫 (小有名气)
- 应助: 0 (幼儿园)
- 金币: 1526.9
- 帖子: 135
- 在线: 46.4小时
- 虫号: 2706419
- 注册: 2013-10-08
- 性别: GG
- 专业: 工程热物理相关交叉领域
5楼2016-02-01 23:25:11










回复此楼