QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2950|回复: 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$ J; ^& F+ R9 x# x; \
    我把程序贴在这,
    # F1 F: ?! p+ W9 Q7 F+ j5 o! `$Title A Investment Problem
    * s2 z+ w2 E$ ?$ontext6 Z* r! R# T# C9 s
    this problem finds a optimized investment that meets+ T  v" |1 I2 E( a( t2 r+ L# ]
    requirements in the city
    % C6 Y( J, \) Z/ \; |$offtext  k! X, b1 m, p8 o1 i) y" Z/ @* W2 k
    Sets
    2 m+ P8 X# W0 \. ~2 @( `; h    i  power plants  /plant-1, plant-2, plant-3, plant-4/! g' W' }% n; u2 M- K
        j  operating mode  /mode-1, mode-2, mode-3/;9 W( T5 [! `! A7 E8 t
    Parameters
    ) }' R& |4 D. l* c, U& Y: T    c(i)  the unit installed capacity of power plant i in cases
    7 b5 W& d" }" \- a9 P4 I       /plant-1  10
    5 Z( i' B* C4 Z( b' m        plant-2  7
    / v: x% F- m) f+ j        plant-3  16& w' B/ y+ u& H
            plant-4  6/
    * C8 k. h7 U( T7 I$ G1 H2 }    d(j)  the electricity demand for power plant i in cases
    6 b" O, D, G$ X. ^. y$ @       /mode-1  3  b8 T7 K# ^7 J, ?2 {5 Z; ]+ G" z: k% H" D
            mode-2  3) j5 u/ b) t7 Y+ `9 \
            mode-3  2/;
    + ?4 Q) r, q; d* R5 Q! o. x4 ZTable f(i,j) the unit operating cost of each power plant
    , A8 C) D$ I* @/ V                 mode-1   mode-2   mode-3
      O4 d% p8 s) I' K. A2 {        plant-1   0.4      0.24     0.04/ W$ w2 z- o) n9 H. T
            plant-2   0.45     0.27     0.0456 x. }( t0 `/ j8 E1 W
            plant-3   0.32     0.192    0.032
    . \9 q- E/ d. k" i. x/ ?9 H        plant-4   0.55     0.33     0.055;- F5 c# ^) ~: S+ z/ n" f
    Scalar m the minimum total installed capacity of the four power plant /12/
    - z5 q2 o& T/ w1 v  B4 T3 T2 U# D       b the minimum tatal investment budget of the four power plant /120/;
    , y8 S: i1 {% d- p1 F1 ?7 IVariables
    7 H4 ]) y4 B% `) C8 q7 G       x(i) the installed capacity of the i power plant in cases
    0 }$ q9 ^# E2 q7 I% x       y(i,j) the operating lever of the i power plant under the j operating mode. u& U; s2 {# X1 w* s5 U
           z the total cost of the four power plant;! i/ N: \6 W1 ^  _; J4 F
    Positive Variable x;
    8 u9 i0 b$ {( e, }5 `) QEquations
    / U+ L5 c8 Z* P% j! `       cost           define objective function
    ' _$ ~; u" _. y9 X7 Y4 l       capacity1(i)   observe total capacity linmit at plant i$ W# i$ r: S- ~1 k/ M+ k7 G8 K
           budget(i)      observe total investment budget limit at plant i
    8 O. m1 S; ~3 E: X- v6 }       capacity2(i)   observe installed capacity for each power plant
    % \1 k  X( |9 `) s       demand(i)      satisfy the electricity demand under each operating mode;
    " V* w# i" k4 k9 q" `cost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));
    ; X/ j) o( J6 mcapacity1(i)..    sum(i,x(i)) =g= m;  _# s( m# b: m9 Y* ?/ B6 S3 ]
    budget(i)..       sum(i,c(i)*x(i)) =l= b;$ x5 {1 X' @( H
    capacity2(j)..    sum(j,y(i,j)) =l= x(i);8 s& _& A( ^/ y% a
    demand(i)..       sum(i,y(i,j)) =g= d(j);
    ( q6 V; N3 F0 CModel investment /all/;' J; X3 ]8 a2 i1 I
    Solve investment using lp minimizing z;* ^( W3 n. C( v. V% c) G3 K7 C
    Display y.l, y.m;
    / \, C+ z9 n' N1 C  a
    " I) w7 H6 p) Q运行出错的,但是不知道怎么解决,请亲给处理一下哦!!!
    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-9 19:51 , Processed in 0.475416 second(s), 51 queries .

    回顶部