QQ登录

只需要一步,快速开始

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

关于GAMS的问题,小弟询问咯??请大侠释义…………

[复制链接]
字体大小: 正常 放大

3

主题

3

听众

26

积分

升级  22.11%

  • TA的每日心情
    奋斗
    2014-9-20 16:56
  • 签到天数: 8 天

    [LV.3]偶尔看看II

    群组: 2013全国研究生数学建

    跳转到指定楼层
    1#
    发表于 2013-5-30 13:16 |只看该作者 |倒序浏览
    |招呼Ta 关注Ta
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!" K: a# I) x" s3 Z
    我把程序贴在这,
    8 R  A, G/ C0 z$Title A Investment Problem' R$ v( W2 j, k( ~& o1 p: u
    $ontext
    ) Z3 @: B/ V' ?. `this problem finds a optimized investment that meets* I4 k9 H  {' ^  u. T/ r
    requirements in the city
    - d- |/ C4 V0 |0 q4 y$offtext7 c/ J8 x7 O4 X4 O6 e( k
    Sets0 R0 U! F8 p1 u2 k! p
        i  power plants  /plant-1, plant-2, plant-3, plant-4// w  M0 U& D0 p# D& b! r. H
        j  operating mode  /mode-1, mode-2, mode-3/;
    + Q# \5 }% o& M2 u4 \* jParameters* F+ p" D, d% o1 r3 t
        c(i)  the unit installed capacity of power plant i in cases# e' a* b2 |7 ?0 ]
           /plant-1  10
    5 S3 A: d8 N6 A. }+ I( @        plant-2  7" l" d$ c* Z$ }- i5 @) e
            plant-3  16
    8 a, P0 {" U% o        plant-4  6/4 s' p; u2 Y" P% t9 _
        d(j)  the electricity demand for power plant i in cases' Y6 Q4 k7 c. p3 ~1 j
           /mode-1  3' I# P9 M+ \  C# o. g' w0 Y# z
            mode-2  3
    * f% ]7 I2 h% U+ n* L" n9 W        mode-3  2/;/ h. O1 m- }# }
    Table f(i,j) the unit operating cost of each power plant
    7 `9 z; }- N5 A                 mode-1   mode-2   mode-3
    7 K; k$ s0 z* d; @5 ]        plant-1   0.4      0.24     0.04
    % x- m: Z  a* V% O6 M! w/ _, U        plant-2   0.45     0.27     0.045
    4 U" f  A7 @2 I        plant-3   0.32     0.192    0.032' h% t/ A3 z* ?/ C6 ~& m
            plant-4   0.55     0.33     0.055;
    ! J1 u5 l9 u, n+ o# |' BScalar m the minimum total installed capacity of the four power plant /12/$ g+ u. t; ^: ^; D3 c. ]) m) s
           b the minimum tatal investment budget of the four power plant /120/;6 x/ `" V9 J. q' h* ~* n' N
    Variables- B* B0 d$ m. ?1 n, A/ |+ T8 K& A
           x(i) the installed capacity of the i power plant in cases+ J2 P+ X( x6 k. F' `: x; |5 x) L
           y(i,j) the operating lever of the i power plant under the j operating mode$ s2 F  m+ Y7 |1 ^; i
           z the total cost of the four power plant;7 p5 g9 C% u& j4 A  b4 b" v9 }
    Positive Variable x;
    ! {' R6 f1 W$ o. m- R5 z' d0 sEquations
    . x4 T1 ~4 Y, N: |       cost           define objective function
    + |1 }$ `! {" N$ I* o$ `2 \       capacity1(i)   observe total capacity linmit at plant i0 M) c# w! G9 ?4 w* A! ?- ~7 R# X1 \
           budget(i)      observe total investment budget limit at plant i" w/ L/ p# h% k- |6 ?
           capacity2(i)   observe installed capacity for each power plant
    - _+ c+ R, A: }; V1 j. O# r  r       demand(i)      satisfy the electricity demand under each operating mode;
      |1 M5 T& o7 ^  Gcost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));
    " O3 m& J! v# f! {1 A9 N( Zcapacity1(i)..    sum(i,x(i)) =g= m;- X* I" g3 |5 V; ~3 E! [
    budget(i)..       sum(i,c(i)*x(i)) =l= b;
    - t- a, b, ~- ?7 acapacity2(j)..    sum(j,y(i,j)) =l= x(i);
    + Y* Z. l0 g1 W+ y+ _demand(i)..       sum(i,y(i,j)) =g= d(j);' `8 ]. m* \0 T4 I  _
    Model investment /all/;
    ) w3 a& e3 f# Z+ Y$ W* q- dSolve investment using lp minimizing z;/ C: q$ [0 S" s7 L! f& c. g
    Display y.l, y.m;
    ; [( y" @9 j6 a1 q: E
    % s- r2 ?& e& A) B3 p运行出错的,但是不知道怎么解决,请亲给处理一下哦!!!
    zan
    转播转播0 分享淘帖0 分享分享0 收藏收藏0 支持支持0 反对反对0 微信微信
    您需要登录后才可以回帖 登录 | 注册地址

    qq
    收缩
    • 电话咨询

    • 04714969085
    fastpost

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

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

    蒙公网安备 15010502000194号

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

    GMT+8, 2026-10-23 08:47 , Processed in 0.932116 second(s), 51 queries .

    回顶部