QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2986|回复: 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
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!
    % }) N* l8 F& y/ }3 v我把程序贴在这,# j- ?3 i4 T- Q, g
    $Title A Investment Problem3 Z! l7 w2 L% P2 c1 R3 h5 R
    $ontext
    1 `" X! U: k- i. Z( F% |9 ythis problem finds a optimized investment that meets
    # A: [! ]$ r. {8 {requirements in the city
    1 n, |. L1 x  h, N5 D0 p$offtext
    ' W+ j3 k3 t) S( g0 fSets
    . J- ]* ?* o( D* \    i  power plants  /plant-1, plant-2, plant-3, plant-4/
    + X' d2 V: d2 {+ Q7 D8 z    j  operating mode  /mode-1, mode-2, mode-3/;
    $ b/ x' m! Q4 j6 N- fParameters3 S5 w% `9 b3 b2 i
        c(i)  the unit installed capacity of power plant i in cases
    $ J/ S& Q! \1 C. s& K       /plant-1  10' ?$ z/ C8 D0 }
            plant-2  7# |7 {! O5 W& m: A1 c( P! l
            plant-3  16) Q& P4 P! \- V& e
            plant-4  6/7 P# c& u% f  a: b# V8 s
        d(j)  the electricity demand for power plant i in cases
    $ O4 X! M9 _, L- I# B# v. b* y       /mode-1  31 Y9 H: p$ u8 i  `5 y5 ~
            mode-2  3% t1 d4 z5 q! L# p& @; k3 t/ y! S
            mode-3  2/;" l; d- C/ H9 S6 M+ B+ l
    Table f(i,j) the unit operating cost of each power plant
    ; `8 `! Y, y7 x& D  U                 mode-1   mode-2   mode-3+ o3 u% {6 t) @" Q0 F( m! ?) y2 C
            plant-1   0.4      0.24     0.04
    4 n$ a& B1 M6 x% L2 C! E        plant-2   0.45     0.27     0.045( K' P6 @7 U0 ~1 C; t# _
            plant-3   0.32     0.192    0.032# C" u  x6 ~9 h/ w# D9 [! g. J
            plant-4   0.55     0.33     0.055;
    ! {" x4 u, u  B! Q2 l" lScalar m the minimum total installed capacity of the four power plant /12/& c: g! W/ h) ~: a
           b the minimum tatal investment budget of the four power plant /120/;
    $ Q4 |% G7 A! G, ~* N* ?Variables2 U9 }  U5 g) \3 Q
           x(i) the installed capacity of the i power plant in cases
    1 M6 ], f1 g3 f: o/ `       y(i,j) the operating lever of the i power plant under the j operating mode
    6 m6 b) P5 C' i) y* b' N       z the total cost of the four power plant;
    ' Z& r) o* A0 D: k( mPositive Variable x;. I( i2 b0 `* p& Q4 p
    Equations/ M; K! g4 b  d5 V" I: |
           cost           define objective function
    ( ~8 y/ H- [8 Y; A9 \+ ~+ R, _       capacity1(i)   observe total capacity linmit at plant i
    1 `# y) k0 R5 H# `. r3 H! b       budget(i)      observe total investment budget limit at plant i
    ! M" u/ j0 p! R& Y. l; G( [       capacity2(i)   observe installed capacity for each power plant
    - [/ {2 u$ Y) D2 n: _       demand(i)      satisfy the electricity demand under each operating mode;  u) e1 v4 S3 c6 H, V! p5 Y
    cost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));' `, V% V4 n7 T/ ^9 Z
    capacity1(i)..    sum(i,x(i)) =g= m;, r% i- A2 V- Y6 `/ R0 Z5 D
    budget(i)..       sum(i,c(i)*x(i)) =l= b;  W  a' s. S1 F6 Q) b
    capacity2(j)..    sum(j,y(i,j)) =l= x(i);: j: w3 i. E/ m' @% \# ^0 H
    demand(i)..       sum(i,y(i,j)) =g= d(j);9 P- ?2 X1 F$ `) M& n
    Model investment /all/;7 _+ {* A# H4 l( v
    Solve investment using lp minimizing z;9 y& k; Z% S$ V3 X8 r( f
    Display y.l, y.m;: F9 Q5 j1 h( a9 i0 R) |+ r

    , W3 m' g# \* [; |7 G运行出错的,但是不知道怎么解决,请亲给处理一下哦!!!
    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-9-5 03:13 , Processed in 0.812508 second(s), 50 queries .

    回顶部