欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

fmincon函数求解过程中出现无解的情况

发布时间:2025/4/5 编程问答 25 豆豆
生活随笔 收集整理的这篇文章主要介绍了 fmincon函数求解过程中出现无解的情况 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

求最优解问题的抛出:

求这个函数的最小值 function f = myfun(x)f = (pi*(x(3)+2)*x(2)*x(1)^2)/4; 运行后返回(约束在最后面有写) Warning: Trust-region-reflective method does not currently solve this type of problem,using active-set (line search) instead. > In fmincon at 439 Solver stopped prematurely. fmincon stopped because it exceeded the function evaluation limit, options.MaxFunEvals = 300 (the default value). x =4.049914.00131.0013 FVAL =541.3289说是这个trust……解不了这个问题,那么该怎么改一下?help过没发现怎么改……非线性约束 function [c,ceq] = mycon(x)k=1.6*(x(1)/x(2))^0.14; %曲度系数F=13; %最大力f=20.2416; %气门最大升程G=8100; %切变模量

总结

以上是生活随笔为你收集整理的fmincon函数求解过程中出现无解的情况的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。