QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2963|回复: 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
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!% H) C% Y8 Z2 F* W8 E
    我把程序贴在这,5 P6 e: Z, \0 L" L1 D& l$ r
    $Title A Investment Problem+ g7 M: J6 U" ~7 n* _! }
    $ontext% H2 r2 X+ ~$ v4 a' C
    this problem finds a optimized investment that meets. r3 P3 V* Q% ^  T
    requirements in the city
    & w/ f- D5 |  G$offtext4 ~, y3 [" z: I6 L& S2 J
    Sets
    9 j. O7 ~; f/ z    i  power plants  /plant-1, plant-2, plant-3, plant-4/$ y6 N" K* u6 K
        j  operating mode  /mode-1, mode-2, mode-3/;  T+ D, E) F. H# ?4 \. @
    Parameters& A% x% h0 v# }! I" c* P7 D, `
        c(i)  the unit installed capacity of power plant i in cases
    . ?! F: |5 {. [+ x: }0 p       /plant-1  10
    $ m+ L3 m6 n- c! {/ y        plant-2  7
    ( Y' P) J( u  ]0 b        plant-3  160 [3 M1 U' ^, t  d3 t( P/ ]
            plant-4  6/
    $ o  z. F7 x5 Q* F+ C5 f    d(j)  the electricity demand for power plant i in cases
    ' L& @- H2 V7 @- O, D& w+ S3 F6 D       /mode-1  3) ~: q8 b) O+ {: ^: t0 f3 L7 K
            mode-2  30 ]5 g. q+ e  r' O6 y
            mode-3  2/;6 `* Y: W4 _; j* U& g: A# t
    Table f(i,j) the unit operating cost of each power plant) ^! Z/ V1 G9 |
                     mode-1   mode-2   mode-3
      [9 p8 d% f- P( N        plant-1   0.4      0.24     0.049 C8 v& w$ m2 V% J4 w+ q- t
            plant-2   0.45     0.27     0.045
      U2 E4 X# f- j6 t; b        plant-3   0.32     0.192    0.032
    1 V* J' s$ c/ Y3 l+ u2 D        plant-4   0.55     0.33     0.055;
    2 a3 r& u$ {( X% m/ gScalar m the minimum total installed capacity of the four power plant /12/& U& k( x0 k1 Y9 A  X
           b the minimum tatal investment budget of the four power plant /120/;: f2 i4 T3 X; p  C6 k
    Variables
    ' G5 O8 g4 ]& A3 s7 |6 c       x(i) the installed capacity of the i power plant in cases: C* ^7 m0 N( R7 l- L- V: z
           y(i,j) the operating lever of the i power plant under the j operating mode1 ~$ T* o" }4 B! }+ @5 _4 B
           z the total cost of the four power plant;
    # k, {* s, A5 d+ z6 F. Q4 UPositive Variable x;
    % A! _/ `8 [/ T, Y: h8 gEquations
    4 p" w( E* T5 {% l$ K       cost           define objective function
    " H; Y' e5 @+ f" `       capacity1(i)   observe total capacity linmit at plant i* f  D& n" C. m6 Z: y8 n4 ^# V
           budget(i)      observe total investment budget limit at plant i
    ! ?3 L. c; P0 k$ S       capacity2(i)   observe installed capacity for each power plant
    : b, |. J4 ]9 J! {& a       demand(i)      satisfy the electricity demand under each operating mode;
    / b0 F1 K+ G/ V* W% `1 ccost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));7 K) ]( f+ s4 y! q
    capacity1(i)..    sum(i,x(i)) =g= m;
    ; F* T$ P7 G. ?0 Z. v4 vbudget(i)..       sum(i,c(i)*x(i)) =l= b;/ a' j0 ~* ^: C) C0 [) ~" V# O' C  m/ V9 f
    capacity2(j)..    sum(j,y(i,j)) =l= x(i);
    % g( N" G4 l/ e) }8 |% Bdemand(i)..       sum(i,y(i,j)) =g= d(j);- m. H7 w9 [) F, A, y( c
    Model investment /all/;
    - A: I3 H/ K* ISolve investment using lp minimizing z;
    # R8 n5 ~& V% X: ^# ?& L% BDisplay y.l, y.m;% o: Z) \& v1 G8 T+ Y! b
      S, o: c( d2 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, 2026-7-22 18:59 , Processed in 0.429606 second(s), 51 queries .

    回顶部