QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2981|回复: 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
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!
    6 ?0 m& `; d8 o! k我把程序贴在这,) C) B  K. G! a* r) c/ C/ O& G' d3 c
    $Title A Investment Problem
    4 L( k1 q2 }  w& U+ k0 U$ontext+ b* Z- D/ F# Z' }" ]
    this problem finds a optimized investment that meets, v/ k6 T# i6 v- t' G' \  E# ~' x
    requirements in the city
    8 ^6 A7 n+ u  O; d* ]# I, O' ^$offtext
    " w* g- `+ k7 `% nSets1 t3 ~& G1 ~; ~
        i  power plants  /plant-1, plant-2, plant-3, plant-4/- U- D7 ^4 ^9 R$ ?0 a& I$ s
        j  operating mode  /mode-1, mode-2, mode-3/;
    0 Z! @+ E5 m# U3 S; n8 IParameters
    6 \: \. B4 }2 T" q    c(i)  the unit installed capacity of power plant i in cases
    ' M' c8 b2 v1 n$ T6 i       /plant-1  10
    4 a2 T$ U/ A" U  Z9 R0 n        plant-2  7
    7 j, a: n5 Y( d- i        plant-3  16
    $ |4 F$ i* B9 v) I. g6 }3 X        plant-4  6/
    3 D/ I8 M7 y  ]: y) f    d(j)  the electricity demand for power plant i in cases- ]% p  Y# ~: Y* F. {/ X
           /mode-1  38 ^# n$ |# k3 D6 j" g
            mode-2  31 l& K: r5 G" J) K3 d) c4 W
            mode-3  2/;- ^  R* U+ C- a" R+ g; P6 J! i
    Table f(i,j) the unit operating cost of each power plant
    2 \3 I0 q$ n3 Y3 a0 l1 o+ d7 ]: a                 mode-1   mode-2   mode-3( ^! H" Q5 X% D/ j( o3 d
            plant-1   0.4      0.24     0.04
    " H* Q  h$ u0 i# g9 _        plant-2   0.45     0.27     0.045
    + T: t  ~1 M7 X5 d4 q: R        plant-3   0.32     0.192    0.032
    4 [- d5 w% d  d: o; W7 |        plant-4   0.55     0.33     0.055;- f' U3 L7 I8 I5 s. u4 M& H6 J. m
    Scalar m the minimum total installed capacity of the four power plant /12/6 ]3 H5 ?; Q$ x. W' u9 K
           b the minimum tatal investment budget of the four power plant /120/;
      f/ }0 a  u  d1 I7 SVariables
    & r( J! L" g& G       x(i) the installed capacity of the i power plant in cases
    4 p# k6 M0 `7 o4 e/ P) m1 L  g& L       y(i,j) the operating lever of the i power plant under the j operating mode
    9 v/ o- h5 O* I       z the total cost of the four power plant;
    2 [7 L( {+ Y) Z6 [( e. ePositive Variable x;
    ) P4 Y+ B1 _- ]- u! y' ^Equations7 u' `$ r  P' v0 s: I7 G% F" p7 x
           cost           define objective function. @- C  v: Q- W; [% G
           capacity1(i)   observe total capacity linmit at plant i
    . y, q6 u+ a2 u+ q  ]9 s( d; F$ U       budget(i)      observe total investment budget limit at plant i( {% i2 g5 }& c
           capacity2(i)   observe installed capacity for each power plant7 ^0 _/ m  @  g& d
           demand(i)      satisfy the electricity demand under each operating mode;3 a- `: y. \4 i. h3 u5 q
    cost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));
    " N4 L8 o" @7 _2 r' V& ^- xcapacity1(i)..    sum(i,x(i)) =g= m;. m( R8 B8 O- o5 Q- e7 @6 s
    budget(i)..       sum(i,c(i)*x(i)) =l= b;
    # u& w% W/ m9 H0 e% d* M/ h1 acapacity2(j)..    sum(j,y(i,j)) =l= x(i);2 F$ T/ r0 V. r7 E  R
    demand(i)..       sum(i,y(i,j)) =g= d(j);
    & l6 E6 G9 f, uModel investment /all/;
    ; E6 E' R5 h% n$ y3 uSolve investment using lp minimizing z;
    : [+ [6 b/ k/ C/ hDisplay y.l, y.m;: _; F' i8 z! T) Z3 m% Z1 t
    9 T. i$ _4 h4 ?( L+ j: \) k/ I
    运行出错的,但是不知道怎么解决,请亲给处理一下哦!!!
    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-8-29 17:26 , Processed in 2.050824 second(s), 50 queries .

    回顶部