QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2913|回复: 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
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!. P0 x5 h* ~( v
    我把程序贴在这,9 d+ Q- W, K0 T1 n* q
    $Title A Investment Problem3 a1 r5 z* g7 ^  q' P! Y1 ^$ _
    $ontext# R! w" X, |; ]* E
    this problem finds a optimized investment that meets
    : n7 |$ I$ v1 M. R$ E0 q1 r) [7 u6 ]requirements in the city
    , r, c, L- h( U, l1 p) C+ P/ t$offtext
      y% [$ U+ u/ d! z% ?Sets9 o! x: h, a* E6 }; B( d
        i  power plants  /plant-1, plant-2, plant-3, plant-4/- e* w  K5 Y, E) _, `( y
        j  operating mode  /mode-1, mode-2, mode-3/;& g/ k$ {5 K' g4 R
    Parameters7 M+ T% X* I8 w$ n
        c(i)  the unit installed capacity of power plant i in cases
    7 O% ^0 |4 ~8 r3 O6 v       /plant-1  10. y3 ~0 i$ T- u" j& T" F5 }
            plant-2  71 U4 ~6 c+ V/ n- i
            plant-3  16! m  A' ~6 z& [% s5 q( Y
            plant-4  6/; I" h1 z$ y; t* o
        d(j)  the electricity demand for power plant i in cases
    " E3 h) n# G1 [/ F       /mode-1  3/ y& t/ q6 W: `$ ^
            mode-2  39 K, r3 b; f6 j, R# L" @
            mode-3  2/;
    " r: r  M! @7 ?6 BTable f(i,j) the unit operating cost of each power plant6 E2 H% n& ^) ~- M7 _, l, }! {
                     mode-1   mode-2   mode-3
    0 g. a' f. Y1 l* @& ]        plant-1   0.4      0.24     0.045 o) }1 t' j* x( K
            plant-2   0.45     0.27     0.045
    9 Q' K$ b# i8 k) W3 `/ i        plant-3   0.32     0.192    0.0321 t: I0 R# B! P; ~3 d/ K6 {0 |
            plant-4   0.55     0.33     0.055;% N; [/ N3 K$ N4 g8 _
    Scalar m the minimum total installed capacity of the four power plant /12/
    & `/ u. z1 Y0 z$ x, l' z, D       b the minimum tatal investment budget of the four power plant /120/;
      F6 x) D4 }6 [/ ?$ @! z# rVariables9 J* A# V5 s, U
           x(i) the installed capacity of the i power plant in cases- i# e/ C+ q  ~" l" R$ ~* z) L
           y(i,j) the operating lever of the i power plant under the j operating mode4 A) J6 V; B/ j- h  i% B
           z the total cost of the four power plant;0 }% G# v9 g) ]/ q/ k- Y- }* h
    Positive Variable x;8 A5 Z+ W( x1 Y, N$ X& D) ^
    Equations) z0 h7 T$ }5 f# ?4 O: t' S, x
           cost           define objective function2 j; r& [1 m- G/ K( k9 {
           capacity1(i)   observe total capacity linmit at plant i4 }/ i8 f1 t7 P2 D% o1 ?2 n# Z
           budget(i)      observe total investment budget limit at plant i! O0 S) C: w" j8 Q
           capacity2(i)   observe installed capacity for each power plant7 Q- w0 P- R9 e* D
           demand(i)      satisfy the electricity demand under each operating mode;, M( o. Z* R- x7 ?- ]5 V/ P8 ~
    cost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));
    2 R4 m+ q, ~: |1 o* \# ycapacity1(i)..    sum(i,x(i)) =g= m;
    3 X9 j9 t: |  f9 }. S' ]! p, Q8 dbudget(i)..       sum(i,c(i)*x(i)) =l= b;
      a8 d0 o3 u+ r# Bcapacity2(j)..    sum(j,y(i,j)) =l= x(i);
    ) g1 W; S0 x7 ?; c4 ]# ?demand(i)..       sum(i,y(i,j)) =g= d(j);
    / t2 W7 N0 l6 P# ~# bModel investment /all/;. `9 q. ^. Q5 q2 E
    Solve investment using lp minimizing z;
    5 A6 O: b' d* t3 m. H! ^Display y.l, y.m;
    ( h3 Z' M% _1 k* x& e, H1 }. O3 @/ q3 o: S3 `) O' ?
    运行出错的,但是不知道怎么解决,请亲给处理一下哦!!!
    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-4-20 06:57 , Processed in 0.423677 second(s), 51 queries .

    回顶部