QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2979|回复: 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
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!0 L& }& Y1 O9 P9 {( p
    我把程序贴在这,
    - D/ N% N7 q6 Q$Title A Investment Problem- a( S! ]3 C9 o6 u" V5 A, W
    $ontext
    * `: }8 A) N) C8 f6 Qthis problem finds a optimized investment that meets. C& E; t3 q8 s% ^: g' ]( p
    requirements in the city
    0 i4 w4 w- f% f$ Z; i# B1 ]- S$offtext
    ; J# [8 c1 L  {$ e9 F7 SSets
    ; K1 Q* |  i/ @9 V5 p; o    i  power plants  /plant-1, plant-2, plant-3, plant-4/0 |& K! M6 k' h% G- g2 Q6 o3 ~
        j  operating mode  /mode-1, mode-2, mode-3/;+ c: z$ o2 e" T9 k6 S; }2 E* M& ]
    Parameters
    & W2 T& R9 y8 l, }    c(i)  the unit installed capacity of power plant i in cases
    1 M% W5 x+ J4 i/ J3 g. Z/ k) Y       /plant-1  10
    8 @! ?, d9 d2 Y8 G5 E        plant-2  7% l% |4 j* m5 ^3 Q/ t2 m" R+ h
            plant-3  16! Z) @; W3 K2 u' E3 R
            plant-4  6/  ]& \" Z$ W) h' H' {! J
        d(j)  the electricity demand for power plant i in cases! i) `+ S" W/ y3 `
           /mode-1  3
    8 `8 g/ ~3 f. N9 p' u  n        mode-2  3
    4 ^7 ^7 W. k8 g        mode-3  2/;0 u, f, P0 a" e! c3 |
    Table f(i,j) the unit operating cost of each power plant! l" x1 [2 ?. N% Z3 F7 }
                     mode-1   mode-2   mode-38 L# p$ A) v  r* n" |3 `% @2 a1 B
            plant-1   0.4      0.24     0.04
    ) F0 g4 G9 h1 a+ x! u* i        plant-2   0.45     0.27     0.045# B: {$ B& f9 I- P9 v
            plant-3   0.32     0.192    0.032. H- P) q3 g3 i! d* X% _4 k
            plant-4   0.55     0.33     0.055;
    : z2 y( D7 q$ h: G. EScalar m the minimum total installed capacity of the four power plant /12/# f1 `6 f8 S! _, j+ u9 O% G) ^
           b the minimum tatal investment budget of the four power plant /120/;
    3 W0 V( \$ b3 W8 _7 X5 b( c9 ZVariables2 P: B2 N" t( _. x
           x(i) the installed capacity of the i power plant in cases9 _. g( n( j# H$ b3 d
           y(i,j) the operating lever of the i power plant under the j operating mode
    * ?* q0 D3 c) J. i3 H       z the total cost of the four power plant;7 Z- \! O0 e; z6 z
    Positive Variable x;
    * r6 Y& d/ _1 o/ m, k1 [Equations
    3 m  D# p  ^( r9 i1 s% G) u       cost           define objective function  q9 c( W, ^) a5 z6 p
           capacity1(i)   observe total capacity linmit at plant i
    " Z2 J0 E4 e" R) r       budget(i)      observe total investment budget limit at plant i
      P. C: H1 O: P$ N       capacity2(i)   observe installed capacity for each power plant+ Q2 I  }: [$ O. e0 U' l/ N" l6 X3 O
           demand(i)      satisfy the electricity demand under each operating mode;8 u+ o) e) {$ G3 I
    cost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));. n& S; |. Q; u% T; F
    capacity1(i)..    sum(i,x(i)) =g= m;
    ! p- k$ A  O: N0 I2 Y8 w9 S1 ]budget(i)..       sum(i,c(i)*x(i)) =l= b;
    2 o) C3 k2 t- N5 ]6 Rcapacity2(j)..    sum(j,y(i,j)) =l= x(i);
    8 ^% W" c2 v3 P: N( B" I7 odemand(i)..       sum(i,y(i,j)) =g= d(j);# d5 S- N2 F/ o  D8 ]6 g
    Model investment /all/;
    . S5 {' Q2 V  N, ISolve investment using lp minimizing z;6 P" b( E: K$ }" |. p9 A
    Display y.l, y.m;1 d0 u  u8 R# N% `/ V. O( |% |

    6 k0 T- x* H! x运行出错的,但是不知道怎么解决,请亲给处理一下哦!!!
    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-8-29 11:24 , Processed in 0.361198 second(s), 51 queries .

    回顶部