QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2955|回复: 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
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!) u; Z) x4 e, @# d. S) d! l
    我把程序贴在这,
    $ b( }5 j" z9 {- V, I5 W5 S1 J" q7 I" L  f$Title A Investment Problem1 f* n) N" G) O% a8 G; F) a" G
    $ontext
    ; D& L0 o/ G# n- j" Cthis problem finds a optimized investment that meets- }( ?% I0 q. n% d, J
    requirements in the city: C& X, J* H( S6 A
    $offtext
    . J* E' ]6 M6 ~$ U& k* A5 C" gSets/ w- ?( j, [$ G. F7 ]: s' @
        i  power plants  /plant-1, plant-2, plant-3, plant-4/( o% x' Z- n+ Y  v  x+ Q- A+ G
        j  operating mode  /mode-1, mode-2, mode-3/;
    7 o* l- |; j, s" G& F8 Z7 JParameters% p' i  d, q& g+ X& I  k2 M( @
        c(i)  the unit installed capacity of power plant i in cases3 e; l( z, h$ U& ]$ P
           /plant-1  108 L" J. e0 e& {* H9 I( {
            plant-2  7
    9 B! s* J5 @* k4 k        plant-3  16  c1 k- i2 C7 k: |9 J' r1 g
            plant-4  6/) }" h' }5 [" M. i; q- {
        d(j)  the electricity demand for power plant i in cases
    9 {) b; O5 [3 [% c       /mode-1  3
    ( q" j- t8 W2 a8 W' X( ?4 O) V& g        mode-2  3- `8 {4 S( C3 F( d1 D4 m( I7 K4 S
            mode-3  2/;# f" S7 Q5 M7 \8 b
    Table f(i,j) the unit operating cost of each power plant, e; ]1 @/ K' B8 ]  i7 N
                     mode-1   mode-2   mode-3
    * l1 X+ i1 {( n; w( U$ g" ]        plant-1   0.4      0.24     0.04
    5 T, b3 l" M+ W8 V: Z4 V0 b4 `        plant-2   0.45     0.27     0.045) Z  W6 b, A1 ~, D
            plant-3   0.32     0.192    0.032# R$ N9 K; A. r9 W6 l- B
            plant-4   0.55     0.33     0.055;" o. G5 P' l) V( m. T8 J" {
    Scalar m the minimum total installed capacity of the four power plant /12/
    0 C- _% R' D: ?' j# I. |4 c9 U       b the minimum tatal investment budget of the four power plant /120/;2 \' f8 P8 I* e7 F
    Variables
    ! ^- @% I6 h" G9 p$ ]% E       x(i) the installed capacity of the i power plant in cases# x0 B- w- `$ U: _. }
           y(i,j) the operating lever of the i power plant under the j operating mode
    , g" O6 _6 B/ K: c( ]! \       z the total cost of the four power plant;9 ^" S2 E+ z& N& X. F& M" y8 n
    Positive Variable x;
    4 W  x" \2 v7 ?) N3 UEquations
    * `5 _# v$ {* h# ?- V       cost           define objective function; @5 z6 O' r: V8 Z  k
           capacity1(i)   observe total capacity linmit at plant i% ^5 J! \( o5 y# S; X
           budget(i)      observe total investment budget limit at plant i
    # z/ d7 E3 Q; L3 V       capacity2(i)   observe installed capacity for each power plant& u7 X" g* L4 P* }
           demand(i)      satisfy the electricity demand under each operating mode;6 I6 I" F( Q& m) u0 ~" J2 {
    cost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));; P  N7 g2 I3 {8 w. i4 x
    capacity1(i)..    sum(i,x(i)) =g= m;
    & T* b8 ]  J+ x$ Y: `( Nbudget(i)..       sum(i,c(i)*x(i)) =l= b;% Z# j( Z" d! {% g0 t7 J
    capacity2(j)..    sum(j,y(i,j)) =l= x(i);
    . d& q% ~" V" @" Wdemand(i)..       sum(i,y(i,j)) =g= d(j);
    , @! h$ a  s( O! T: XModel investment /all/;% U  T( W3 T3 m6 }; [, N& B" K
    Solve investment using lp minimizing z;! M' N+ B  A! b
    Display y.l, y.m;% _5 _5 N6 [* o

    9 M4 L4 B) M  r/ Z运行出错的,但是不知道怎么解决,请亲给处理一下哦!!!
    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-28 20:21 , Processed in 0.383602 second(s), 50 queries .

    回顶部