QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 4255|回复: 7
打印 上一主题 下一主题

[问题求助] MatlAB非线性规划的小问题~~~~

[复制链接]
字体大小: 正常 放大
zapstart 实名认证       

1

主题

4

听众

214

积分

升级  57%

  • TA的每日心情
    无聊
    2011-12-4 21:33
  • 签到天数: 2 天

    [LV.1]初来乍到

    自我介绍
    小小大学生一个
    跳转到指定楼层
    1#
    发表于 2010-5-15 14:34 |只看该作者 |倒序浏览
    |招呼Ta 关注Ta
    function  [c,ceq]=mycon(x)
    c=1-0.7*x(2)+2.1/x(1)-x(2)*x(3);
    ceq=[];

    fun='4*x(1)^2*0.5*(x(2)*(1-x(2))*(1-x(3))+1/2*(1-x(2)^2)+(1-x(2)*x(3))*(3/x(1)+(1-x(2)*x(3))/1.4)+x(3)*x(2)*((1-x(2)*x(3))/0.7)+3/x(1)+x(2)*x(3)/1.4)';
    X0=[10 1 3];
    lb=[0 0 0]';
    ub=[200 1 1]';
    [x,fval]=fmincon(fun,X0,[],[],[],[],lb,ub,@mycon);

    Warning: Trust-region-reflective algorithm does not solve this type of problem, using active-set algorithm. You could also try the interior-point or sqp algorithms: set the Algorithm
    option to 'interior-point' or 'sqp' and rerun. For more help, see Choosing the Algorithm in the documentation.
    > In fmincon at 472
    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 were satisfied to within the default value of the constraint tolerance.
    <stopping criteria details>
    Active inequalities (to within options.TolCon = 1e-006):
      lower      upper     ineqlin   ineqnonlin
        1          2                     
                   3
    zan
    转播转播0 分享淘帖0 分享分享0 收藏收藏0 支持支持0 反对反对0 微信微信
    安树庭 实名认证       

    112

    主题

    10

    听众

    962

    积分

    数模爱好者

    升级  90.5%

  • TA的每日心情
    开心
    2014-7-12 07:33
  • 签到天数: 335 天

    [LV.8]以坛为家I

    国际赛参赛者

    新人进步奖 发帖功臣

    群组中南民族大学

    群组数学建摸协会

    群组湖南工业大学数学建模同盟会

    群组LINGO

    群组小草的客厅

    回复

    使用道具 举报

    zapstart 实名认证       

    1

    主题

    4

    听众

    214

    积分

    升级  57%

  • TA的每日心情
    无聊
    2011-12-4 21:33
  • 签到天数: 2 天

    [LV.1]初来乍到

    自我介绍
    小小大学生一个
    回复

    使用道具 举报

    494

    主题

    5

    听众

    51

    积分

    升级  48.42%

  • TA的每日心情
    郁闷
    2011-9-11 20:29
  • 签到天数: 3 天

    [LV.2]偶尔看看I

    自我介绍
    hhhhhhh
    ???好像没有问题啊。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
    回复

    使用道具 举报

    少幻 实名认证       

    1

    主题

    3

    听众

    216

    积分

    该用户从未签到

    自我介绍
    美哉!看我中国少年;壮哉!看我少年中国。

    群组Matlab讨论组

    群组东北三省联盟

    群组数学建模

    回复

    使用道具 举报

    zapstart 实名认证       

    1

    主题

    4

    听众

    214

    积分

    升级  57%

  • TA的每日心情
    无聊
    2011-12-4 21:33
  • 签到天数: 2 天

    [LV.1]初来乍到

    自我介绍
    小小大学生一个
    我改了下,
    X0=[0.1 0 0];
    lb=[0 0 0]';
    ub=[150 0.25 1]';
    为什么结果超过这个范围了?

      x =150.1603    0.4103    1.1603


    fval =

      5.8621e+004


    exitflag =

         0


    output =

             iterations: 18
              funcCount: 203
           lssteplength: 0.5000
               stepsize: 0.0114
              algorithm: 'medium-scale: SQP, Quasi-Newton, line-search'
          firstorderopt: 1.8044e+004
        constrviolation: 0.2655
                message: [1x143 char]
    回复

    使用道具 举报

    hechaonan 实名认证       

    11

    主题

    3

    听众

    433

    积分

    升级  44.33%

    该用户从未签到

    自我介绍
    喜欢数学建模,希望从中学到东西开阔自己的视野。。。。
    回复

    使用道具 举报

    zapstart 实名认证       

    1

    主题

    4

    听众

    214

    积分

    升级  57%

  • TA的每日心情
    无聊
    2011-12-4 21:33
  • 签到天数: 2 天

    [LV.1]初来乍到

    自我介绍
    小小大学生一个
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 注册地址

    qq
    收缩
    • 电话咨询

    • 04714969085
    fastpost

    关于我们| 联系我们| 诚征英才| 对外合作| 产品服务| QQ

    手机版|Archiver| |繁體中文 手机客户端  

    蒙公网安备 15010502000194号

    Powered by Discuz! X2.5   © 2001-2013 数学建模网-数学中国 ( 蒙ICP备14002410号-3 蒙BBS备-0002号 )     论坛法律顾问:王兆丰

    GMT+8, 2026-4-11 00:53 , Processed in 0.429581 second(s), 91 queries .

    回顶部