QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2909|回复: 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
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!$ s- Z+ d7 e5 X" `0 ?
    我把程序贴在这,
    # Y' A( k5 a- Z/ l( D$Title A Investment Problem
    3 p9 i3 h2 W- Q$ c) z$ontext
    7 H/ g$ Y' m* ^% d8 W2 Ithis problem finds a optimized investment that meets  H) D2 z3 s- {& _) o
    requirements in the city
    2 |! d( r, q7 G, B- ?$offtext7 a: w, X: M+ u! ~" i* w1 U) C
    Sets
      _/ P" F' @6 \! u5 w  G) U    i  power plants  /plant-1, plant-2, plant-3, plant-4/
    ' |1 @2 m) e6 L    j  operating mode  /mode-1, mode-2, mode-3/;: C# h5 p" W2 M; G! a% g7 i
    Parameters
    : X- h  s7 l8 l  F) a: x    c(i)  the unit installed capacity of power plant i in cases- K* p' l6 p& U3 U8 v1 P) w
           /plant-1  103 [9 w9 X, }% h/ I  p% m
            plant-2  7; T: E' ]5 _  B8 w: h% }, Y
            plant-3  16; }0 @: [* r9 D5 j
            plant-4  6/7 _) s$ {$ Z/ ]) r+ Y
        d(j)  the electricity demand for power plant i in cases: u# J: V  g  q/ s) ^" y+ u/ `. m0 \
           /mode-1  3! m' a6 I. W' X, t" G" Q9 c: b
            mode-2  3& O$ {, }4 z( }& P
            mode-3  2/;6 s- ^' G' N. C8 ^: J: d  X1 |: |
    Table f(i,j) the unit operating cost of each power plant
    # r' y1 E' R' t4 _                 mode-1   mode-2   mode-3
    , a. X  e" r/ [$ ?; ]4 M        plant-1   0.4      0.24     0.04
    8 A4 w, P% w6 b: p+ m. c        plant-2   0.45     0.27     0.045
    " C: R/ k5 z* y+ J        plant-3   0.32     0.192    0.032, j' `1 |8 s& _
            plant-4   0.55     0.33     0.055;( V9 X* Y) ]) s! Y4 C7 f7 h# Q
    Scalar m the minimum total installed capacity of the four power plant /12/
    ; O, O. [; c- o$ J( w; J* D       b the minimum tatal investment budget of the four power plant /120/;' S! e$ T8 U- E# I7 }1 x5 G
    Variables
    # ?/ k  A5 n. E1 l3 U" E! \+ e       x(i) the installed capacity of the i power plant in cases
    & q) @: b5 ?5 `2 X7 q: W       y(i,j) the operating lever of the i power plant under the j operating mode
    3 |- v9 f! F& Y5 i1 `5 ^) z       z the total cost of the four power plant;
    + H+ `1 M2 X# @% x" ~5 xPositive Variable x;" S( x1 d5 ^5 C
    Equations! \' G, z9 W" M& v$ N
           cost           define objective function
    * S$ [& h" j; G% w       capacity1(i)   observe total capacity linmit at plant i" h+ Y" m* J# V/ M& N
           budget(i)      observe total investment budget limit at plant i0 b& O: c; A% R7 k: _* v! `" m' x
           capacity2(i)   observe installed capacity for each power plant
    ! ?1 z, Y9 L! u6 l+ K( A: M; D       demand(i)      satisfy the electricity demand under each operating mode;
    / m4 N* j9 L- m1 q) zcost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));& n, p. v- z% a$ D% J+ w/ T" J3 d
    capacity1(i)..    sum(i,x(i)) =g= m;
    & u! N1 d# ?* ~0 c5 Abudget(i)..       sum(i,c(i)*x(i)) =l= b;
    2 N3 I' ?( a8 T" W+ H; Qcapacity2(j)..    sum(j,y(i,j)) =l= x(i);" n$ M" c4 u4 s( T& q6 w9 i* w
    demand(i)..       sum(i,y(i,j)) =g= d(j);7 B/ N) m. o  w3 @
    Model investment /all/;
    & u+ O& Z3 u) l3 c: K1 |1 L) HSolve investment using lp minimizing z;
    ; s# O2 j; D) u; [Display y.l, y.m;
    & u% |& T% |9 ]: q( R3 j+ D$ ^  u' V  n0 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-4-15 18:28 , Processed in 0.607751 second(s), 50 queries .

    回顶部