QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2966|回复: 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
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!
    & W* I8 q7 B8 s* ]1 n我把程序贴在这,
    ) O2 `6 Q+ y) B" R& d; \3 D$Title A Investment Problem3 I" C4 a" r9 q; G6 [; X7 Z+ k
    $ontext
    * w# V- K+ S( X. [$ L# lthis problem finds a optimized investment that meets
      `' @' Q' W: }; w9 U& rrequirements in the city
    : ?1 e+ s0 o7 ^0 [$offtext
    : r. X% h! j* f+ ]: [Sets) W/ g* J. E8 z" B/ z
        i  power plants  /plant-1, plant-2, plant-3, plant-4/4 e1 O' \7 S, H* k+ f* d
        j  operating mode  /mode-1, mode-2, mode-3/;
    ' k* z# T9 R% |6 n! w, F! `9 F* yParameters0 O( e+ {% _: h# k# V7 ^5 L  g- k
        c(i)  the unit installed capacity of power plant i in cases
    6 W4 ~1 x' h0 f" ]% e       /plant-1  10
    ; m4 X; {+ Z% `- w8 g9 Z        plant-2  7  l0 I" _0 F: I, @/ d$ ~
            plant-3  16- }5 h6 c& m4 C& ^8 n- l
            plant-4  6/
    0 ?# x' p: p  }6 G/ b8 O! X    d(j)  the electricity demand for power plant i in cases
      N& q) s+ z- A. m       /mode-1  3
    , z2 B' S& z' n        mode-2  3
    1 K. J5 o  H( S5 ]        mode-3  2/;
    4 ~! Z/ K* x' S: ]1 B5 l! OTable f(i,j) the unit operating cost of each power plant
    # t' T! b8 B: w9 f9 ?7 e4 z                 mode-1   mode-2   mode-30 n/ X! M# O( ]7 l9 Q; I
            plant-1   0.4      0.24     0.04
    : @8 O7 w" h" ~+ R, {        plant-2   0.45     0.27     0.045
    $ J# s! |5 e6 s5 O9 [6 D        plant-3   0.32     0.192    0.032' l5 @, g7 H  l! F. T
            plant-4   0.55     0.33     0.055;2 g6 T) U; M+ ]' V) w% J; g
    Scalar m the minimum total installed capacity of the four power plant /12/
    9 L* i/ }+ J0 {; m. g) f4 N+ _$ g       b the minimum tatal investment budget of the four power plant /120/;
    9 S; g" A9 P4 m& N6 K! vVariables) s7 u, S( I7 i
           x(i) the installed capacity of the i power plant in cases
    $ S1 g& D& S! V' a6 E       y(i,j) the operating lever of the i power plant under the j operating mode; Z0 h, d1 K7 \( M! w) J+ Z% y
           z the total cost of the four power plant;" M; C- X+ O: n  Z9 ]
    Positive Variable x;
    7 t$ j. A' |7 ~% q) T* R4 REquations" Q1 ]; e5 C; R7 j# i" s* j
           cost           define objective function' \/ F2 K2 j/ l8 @7 x$ q0 a% D6 A, V" b
           capacity1(i)   observe total capacity linmit at plant i
    ' [/ ?+ h1 O' X# t0 ^       budget(i)      observe total investment budget limit at plant i( \) P" K; B6 B( y( q8 z# H
           capacity2(i)   observe installed capacity for each power plant
    4 I9 I- A# i* n) h4 D- d# w: f5 L$ M       demand(i)      satisfy the electricity demand under each operating mode;
    * l: n! e+ r) L) icost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));2 ?8 P7 v  E9 n
    capacity1(i)..    sum(i,x(i)) =g= m;9 P( l$ a/ U) v: J- m" j% F) U
    budget(i)..       sum(i,c(i)*x(i)) =l= b;
      e3 K% G0 J! x6 N* |# ~capacity2(j)..    sum(j,y(i,j)) =l= x(i);
    + w) d+ D  f; t* j6 y$ ^  }$ Zdemand(i)..       sum(i,y(i,j)) =g= d(j);
    8 ~- B+ U' G7 I! C: zModel investment /all/;7 _2 X: T$ G2 Z2 N
    Solve investment using lp minimizing z;! M; C8 K" b% x
    Display y.l, y.m;2 {. k5 U8 t% V) K# d! L' I

    6 K4 M% K5 p6 h5 b运行出错的,但是不知道怎么解决,请亲给处理一下哦!!!
    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-23 09:06 , Processed in 0.291413 second(s), 51 queries .

    回顶部