QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2657|回复: 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
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!5 y. [! E- J7 u4 Y3 D, c
    我把程序贴在这,
    4 B- r/ q) _8 s$Title A Investment Problem( h4 Y3 z  P) z( M  S  \- d
    $ontext
    : w' s4 C+ `1 v2 X4 \4 g0 L( zthis problem finds a optimized investment that meets
    8 v# l4 l7 ?; N8 H* |. h5 prequirements in the city
    % a% `5 z3 f8 D$ i2 [+ l1 R$offtext
    - f# F! M7 P# ?5 F) A6 }Sets9 ]( Q: F+ M! A' E; N
        i  power plants  /plant-1, plant-2, plant-3, plant-4/& y3 ~& k2 `% S4 ^* t- n
        j  operating mode  /mode-1, mode-2, mode-3/;4 ]% z% ?& n  n4 b5 s, z4 k& G
    Parameters9 W" j6 n2 S4 a; m3 J$ ~. O7 W
        c(i)  the unit installed capacity of power plant i in cases3 A- [% ~$ u6 d
           /plant-1  103 x7 w5 g1 j0 i( o; T( w0 b
            plant-2  7% ?- K% h5 _" f9 [- s7 B& t1 z" w
            plant-3  16
    6 v* G* F: [: k$ S/ e5 ?0 ?9 `. H        plant-4  6/# m8 N( p4 |- G. V$ r
        d(j)  the electricity demand for power plant i in cases
    4 c- V7 ~7 U5 z2 H8 x  |( m1 L       /mode-1  36 D! `6 c: r& i" v: a2 E9 r' c
            mode-2  32 Q3 {: v! {) c' L4 y7 y' H! x
            mode-3  2/;
    6 z. E; P8 Q) ^) Q4 y1 m& W/ v; F) T- G% ITable f(i,j) the unit operating cost of each power plant/ r/ u% g0 B8 J/ i" O0 K
                     mode-1   mode-2   mode-34 w% Y8 {8 f+ n6 l+ E1 v
            plant-1   0.4      0.24     0.04' w! `, }" V. s9 N- g4 X8 p
            plant-2   0.45     0.27     0.045
    2 l; w1 \: Q0 ~+ K        plant-3   0.32     0.192    0.0329 B& ^3 N6 A" {! J/ {' d9 i7 b! D  ]
            plant-4   0.55     0.33     0.055;
    " K. Q* o0 u; Z% S5 G( nScalar m the minimum total installed capacity of the four power plant /12/9 K6 g  b2 O8 _) Q6 A) ?
           b the minimum tatal investment budget of the four power plant /120/;7 R# H9 l' S. j! m1 X6 }/ t+ _
    Variables
    ' u0 f+ l. F, u" E8 E, G       x(i) the installed capacity of the i power plant in cases4 g2 ?# z5 `8 P0 p
           y(i,j) the operating lever of the i power plant under the j operating mode6 K) l  C3 e# `# n
           z the total cost of the four power plant;
    9 o) v  R. F& S: t. y8 F; z; N! ~Positive Variable x;6 Y( o; l( q+ G7 e' a, Y
    Equations
    ( d5 {5 ?- N! ?  J       cost           define objective function, K! N: |" M# L  k0 D1 L
           capacity1(i)   observe total capacity linmit at plant i
    9 w9 ?+ k" r$ @6 L* I2 \       budget(i)      observe total investment budget limit at plant i
    - S7 q" P- I) J! }       capacity2(i)   observe installed capacity for each power plant
    6 d9 @, k* Q; {) q1 O+ ?. R       demand(i)      satisfy the electricity demand under each operating mode;
    ( c) G% L% l$ v' v  g8 i6 [cost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));
    7 T+ T6 a1 X$ u$ R/ Fcapacity1(i)..    sum(i,x(i)) =g= m;* n! D. K( k2 Y/ s1 b
    budget(i)..       sum(i,c(i)*x(i)) =l= b;0 v$ V6 t5 t& t3 V7 w
    capacity2(j)..    sum(j,y(i,j)) =l= x(i);, V! k  K  ]  ]4 [2 ^+ \1 p
    demand(i)..       sum(i,y(i,j)) =g= d(j);' X8 ~0 h% u/ z7 y6 u- {, p; N
    Model investment /all/;
    % V7 ~* y$ n! B. PSolve investment using lp minimizing z;
    7 h2 a( n% V5 F( U: LDisplay y.l, y.m;
      |/ O2 Z/ D: m5 e4 w
    ( P  T$ }: v2 E0 r+ I9 E+ w6 ~- f运行出错的,但是不知道怎么解决,请亲给处理一下哦!!!
    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, 2025-8-8 12:01 , Processed in 0.439567 second(s), 55 queries .

    回顶部