QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2941|回复: 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
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!/ }1 e) F/ O% M( X
    我把程序贴在这,4 n5 ~' C. l7 b  _6 Q
    $Title A Investment Problem5 m5 ?1 y, J2 Z/ C  d  q/ s
    $ontext
    . ^, m9 Q. n5 W( W; \! Othis problem finds a optimized investment that meets
    6 z+ w' B- S) f2 L# X" arequirements in the city
    - _% I5 g# `$ E# h2 O$ g$offtext
    , g& J( f1 E7 @+ v8 G$ b: ZSets
    6 t+ E9 j" E* i9 \& V    i  power plants  /plant-1, plant-2, plant-3, plant-4/7 o% U9 {/ d. x% J: u1 E/ Z; K
        j  operating mode  /mode-1, mode-2, mode-3/;% t! n1 U& x+ I1 ^  F& K2 ?
    Parameters
    ' W% h4 {' q: M5 ~& @& H    c(i)  the unit installed capacity of power plant i in cases0 `7 L4 D% e5 Z2 A) b
           /plant-1  10
    " N1 E4 ~# N" f/ C+ E        plant-2  7
    : C! U, J0 O  f* X; T; v) O, F        plant-3  16
    6 C& p( @4 P! k) R        plant-4  6/
    # H1 ~: K: Z4 C    d(j)  the electricity demand for power plant i in cases& ^6 P1 i% ]) n1 K3 S: F
           /mode-1  36 V* g+ i/ M0 t2 s6 Y
            mode-2  38 R5 [" S3 @* q
            mode-3  2/;  `6 R% R9 d, W: U
    Table f(i,j) the unit operating cost of each power plant
    - M6 t! u& g9 P9 _; ^  m                 mode-1   mode-2   mode-3
    0 U  Y( v7 [, W4 ~        plant-1   0.4      0.24     0.04* a$ f- X+ ]+ y0 F( R) d; C7 q
            plant-2   0.45     0.27     0.0450 q' |. K. X- S- y5 A, ^! s8 U
            plant-3   0.32     0.192    0.032; d+ M4 `2 F3 M
            plant-4   0.55     0.33     0.055;
    : N( R4 ]) R5 Z6 [7 wScalar m the minimum total installed capacity of the four power plant /12/
    ( C" o5 W6 F9 x       b the minimum tatal investment budget of the four power plant /120/;
    6 l7 {& \& O2 b" ~Variables7 U, d. y5 a. Y
           x(i) the installed capacity of the i power plant in cases, v  Y9 _* w+ d- }
           y(i,j) the operating lever of the i power plant under the j operating mode/ V$ c3 K; Y/ R' g0 j
           z the total cost of the four power plant;
    / l! u' O2 N+ V: G6 m+ X4 BPositive Variable x;7 ?6 s/ o, m: C) V- h  b8 C6 G
    Equations
    7 r% h) J% ^( i: r, I  ~       cost           define objective function4 I) `7 |% t0 x1 t
           capacity1(i)   observe total capacity linmit at plant i
    % N$ A, x2 G6 F$ t5 z0 J       budget(i)      observe total investment budget limit at plant i
    3 b3 |/ J6 C: d8 S       capacity2(i)   observe installed capacity for each power plant4 i6 ]6 {. m& m9 V' T( n8 l6 K
           demand(i)      satisfy the electricity demand under each operating mode;
    4 x$ p% O& B" z. [( Z  Tcost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));
    ( r! `* z/ a. Tcapacity1(i)..    sum(i,x(i)) =g= m;5 k; y6 ~* E0 k( F  G3 _5 p  Q
    budget(i)..       sum(i,c(i)*x(i)) =l= b;
    / H! l/ w) s" Jcapacity2(j)..    sum(j,y(i,j)) =l= x(i);
    % i. X- ]( }' E; I- C" vdemand(i)..       sum(i,y(i,j)) =g= d(j);
    * {" }* Y. @' u6 PModel investment /all/;
    + e7 t3 ~6 f4 u  u: T; b% CSolve investment using lp minimizing z;! F& p- ?0 n# _+ [: s+ i
    Display y.l, y.m;: K) x: }8 q. @& ?3 y0 d

    - F/ V% u# H1 E运行出错的,但是不知道怎么解决,请亲给处理一下哦!!!
    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 08:37 , Processed in 0.945116 second(s), 50 queries .

    回顶部