QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2943|回复: 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 d8 z5 o" p7 I" v" ^我把程序贴在这,$ q& L# b9 r0 t: ?+ w
    $Title A Investment Problem/ j1 f( y1 P  N) p
    $ontext
    / j  i) D" p- @: zthis problem finds a optimized investment that meets
    & ?7 c5 J6 l, F& orequirements in the city
    $ d/ X/ X2 h/ r6 u$offtext
    . n/ L& E0 ?" F) ZSets" F; S$ ^1 V+ B4 w
        i  power plants  /plant-1, plant-2, plant-3, plant-4/) _: v* f( b1 D3 X5 c: q/ b
        j  operating mode  /mode-1, mode-2, mode-3/;9 h, S3 p$ y" r; }+ F- z
    Parameters1 z* q4 E. l0 }- x& g% o
        c(i)  the unit installed capacity of power plant i in cases
    + @  {* m) o7 d  Y' j6 X* s9 P- [       /plant-1  10
    / V% @; [6 _, D) X3 f  o% c        plant-2  7# b4 ?* ^. Z% {9 K) W/ b+ H) C
            plant-3  16( X) I3 R! V' F; \
            plant-4  6/2 _/ B; {8 R, ]7 E
        d(j)  the electricity demand for power plant i in cases' w! _% p4 N, p2 D( ]6 L* m
           /mode-1  3
    6 o& }- a- s/ x1 F+ [        mode-2  3
    0 ~+ X+ _8 D4 H/ P8 r        mode-3  2/;
    % \" l4 P' K( t1 I9 a+ @9 ~; dTable f(i,j) the unit operating cost of each power plant) V# Q, S( ?3 R0 Q1 _
                     mode-1   mode-2   mode-3
    ; Z/ ~  c& Q/ D0 x0 C        plant-1   0.4      0.24     0.04; q6 x. [+ Y' G; q5 G4 B
            plant-2   0.45     0.27     0.045
    : z9 p8 R8 q- k/ f3 X6 o        plant-3   0.32     0.192    0.032
    $ ^! k& |* S% c6 b2 s9 a8 j        plant-4   0.55     0.33     0.055;6 K& `5 Q/ {+ }; [+ |* p
    Scalar m the minimum total installed capacity of the four power plant /12/
    0 Q1 X% r1 |& W# z7 s       b the minimum tatal investment budget of the four power plant /120/;
    ) n% M3 g( D3 T! h- F. KVariables
    ' v1 P. S4 S2 |       x(i) the installed capacity of the i power plant in cases
    + {. w) c5 k) ~( r+ _       y(i,j) the operating lever of the i power plant under the j operating mode0 e$ r3 e7 b; ~) l& o
           z the total cost of the four power plant;* K) G+ U7 W% G4 }. L
    Positive Variable x;
    4 J) b& d) g5 y+ y0 ], F. BEquations$ ^/ M. y! c0 W5 y! I' J: C/ i
           cost           define objective function. w9 H8 a: E0 `& k6 e) R
           capacity1(i)   observe total capacity linmit at plant i* E( S7 q8 M9 D( T6 M7 c5 w) G' x
           budget(i)      observe total investment budget limit at plant i7 v8 G$ }- f  u( U
           capacity2(i)   observe installed capacity for each power plant0 K' C) V+ n/ d. Q) N- g
           demand(i)      satisfy the electricity demand under each operating mode;9 G* d% j% T% E0 I7 Y" L
    cost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));& Y2 E% B/ i) Q8 @" l0 F7 E, A8 P
    capacity1(i)..    sum(i,x(i)) =g= m;  _9 E, G$ C# ^  N
    budget(i)..       sum(i,c(i)*x(i)) =l= b;7 ?( S* t# N- }  n5 K: b3 c9 p
    capacity2(j)..    sum(j,y(i,j)) =l= x(i);- p, f  L; P( `
    demand(i)..       sum(i,y(i,j)) =g= d(j);, ^% n3 e/ y8 w9 a% j& l
    Model investment /all/;- ^) I1 k' E7 q" q/ g' b8 o
    Solve investment using lp minimizing z;
    & s' D9 S1 y" z6 [7 O. {3 z. `Display y.l, y.m;! z* x# a: X7 y, h0 G
    : i  E4 R0 L6 L( R
    运行出错的,但是不知道怎么解决,请亲给处理一下哦!!!
    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-6-4 11:35 , Processed in 0.582710 second(s), 51 queries .

    回顶部