| 查看: 1634 | 回复: 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. |
» 猜你喜欢
国家基金申请书模板内插入图片不可调整大小?
已经有9人回复
退学或坚持读
已经有20人回复
免疫学博士有名额,速联系
已经有14人回复
面上基金申报没有其他的参与者成吗
已经有4人回复
多组分精馏求助
已经有6人回复
国家级人才课题组招收2026年入学博士
已经有6人回复
qinzhen724
新虫 (小有名气)
- 应助: 0 (幼儿园)
- 金币: 1526.9
- 帖子: 135
- 在线: 46.4小时
- 虫号: 2706419
- 注册: 2013-10-08
- 性别: GG
- 专业: 工程热物理相关交叉领域
5楼2016-02-01 23:25:11
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













回复此楼