QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2954|回复: 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
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!
    ! p5 E& F' f% `1 ~1 \/ x$ c# }我把程序贴在这,& I7 {: }" a& E
    $Title A Investment Problem
    2 O- P# n7 |* u# T: ?$ontext; e8 U/ e: i8 Y, e5 y
    this problem finds a optimized investment that meets
    . W& z- x  o% h  @5 k# C! Vrequirements in the city% f% n4 ]4 x' R2 t2 Z. E
    $offtext
    $ b0 `4 j0 |. c) a7 H: jSets, z5 S. K' v& n) q2 }' p
        i  power plants  /plant-1, plant-2, plant-3, plant-4/
    + s, Y0 `8 f2 f" X# C1 v' ]    j  operating mode  /mode-1, mode-2, mode-3/;
    8 e4 T$ M5 }2 n0 ~. z) yParameters
    8 r" t* s+ |' @) y& D    c(i)  the unit installed capacity of power plant i in cases
    / a6 a0 Q6 Z) y! d, C) m       /plant-1  10
    0 x9 P6 o6 I. k, z0 n9 e( s$ i        plant-2  7- @* J9 k/ z! L$ e1 T: e
            plant-3  16
    # C' K# ~& Q# d- }& p- G7 S5 ~2 }        plant-4  6/- M# v/ t' a* [  L; U. `3 {( C( ^
        d(j)  the electricity demand for power plant i in cases$ s8 K& Q' b! F' r
           /mode-1  3: f0 |/ X) Z) O+ E, o; N
            mode-2  3
    $ V$ n: }2 ?# ^  B; U        mode-3  2/;
    7 t0 o7 b+ B9 h% z8 ATable f(i,j) the unit operating cost of each power plant/ ]- ~' G5 q; N( T
                     mode-1   mode-2   mode-3$ {$ K. Y9 Y  v/ _
            plant-1   0.4      0.24     0.048 u" v$ E2 i5 x7 o# {2 _
            plant-2   0.45     0.27     0.045
    5 n4 w6 s- m3 K6 S        plant-3   0.32     0.192    0.032
    : n9 R" a* x5 Y        plant-4   0.55     0.33     0.055;
    5 N/ H4 g$ s2 i* C" U0 IScalar m the minimum total installed capacity of the four power plant /12/
    # }( \: Q. b  U3 T' ?       b the minimum tatal investment budget of the four power plant /120/;, E0 V2 h% O- K+ G" \
    Variables2 U2 l( Y) B! s! s/ F
           x(i) the installed capacity of the i power plant in cases8 e) m( E+ q* k. a) Z% ~
           y(i,j) the operating lever of the i power plant under the j operating mode, o6 |/ y; h$ H% R: h
           z the total cost of the four power plant;8 ]* d$ H; h' u! c: L
    Positive Variable x;
    3 E$ I+ \/ Z3 F7 D  C2 IEquations
    , s8 c) O2 a, ]- L5 _( }1 O       cost           define objective function( l- }0 ?- B9 }" C% @1 {' h2 T( l% w
           capacity1(i)   observe total capacity linmit at plant i
    8 P+ R4 \0 w7 N" b* Q' g       budget(i)      observe total investment budget limit at plant i$ M4 z$ J9 O0 G, T$ ]
           capacity2(i)   observe installed capacity for each power plant
    : X7 L. _2 E* H! M$ }/ e       demand(i)      satisfy the electricity demand under each operating mode;
    $ _( A2 y- `1 s$ Z- Ecost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));
    : F( [5 B  b4 S4 O% c! o6 C( Pcapacity1(i)..    sum(i,x(i)) =g= m;
    & H3 t9 A7 u) o& e2 fbudget(i)..       sum(i,c(i)*x(i)) =l= b;
    * ^( B0 E) a7 W: I- T) scapacity2(j)..    sum(j,y(i,j)) =l= x(i);. k) W7 ]& ]' [" Y3 _4 \3 ^
    demand(i)..       sum(i,y(i,j)) =g= d(j);
    3 k6 D1 L. h6 ~; OModel investment /all/;
    + `! N9 C$ Y" n8 Z+ @0 ]Solve investment using lp minimizing z;
    " V& Z  |. f. I, k8 N  ]Display y.l, y.m;
    + N2 o, t# x' X0 m  W
    & @- G# o) y  a运行出错的,但是不知道怎么解决,请亲给处理一下哦!!!
    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:16 , Processed in 0.431675 second(s), 51 queries .

    回顶部