QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2964|回复: 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
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!
    ( f1 h# [+ f5 ^  m7 f我把程序贴在这,
    0 ]: F+ V; `( b! @% \; b$Title A Investment Problem
    6 `0 p, g0 d. W% s$ P8 ?$ontext
    ; q. b# p* y2 T7 z& U6 Y3 |' x/ Rthis problem finds a optimized investment that meets( P/ ]; u) z  h* ?$ G! m3 O; S. A
    requirements in the city
    1 [" j- W+ p8 ]; |$offtext
    , p0 o$ R: Y# |) M. W% l) aSets
    + l# X: z+ b0 q    i  power plants  /plant-1, plant-2, plant-3, plant-4/4 n0 y1 z$ E! T) x5 S8 W
        j  operating mode  /mode-1, mode-2, mode-3/;
    6 n* H, h5 `8 B# ]* D& d* YParameters; P) {/ k7 c( f  r# W# z
        c(i)  the unit installed capacity of power plant i in cases
    1 s6 X' P0 a2 h: Z       /plant-1  10$ t4 h; ^  b3 l# n
            plant-2  7
    # P/ o; p7 y+ D4 p; A1 ~$ q% a        plant-3  16  x5 G8 u- h* f- p
            plant-4  6/
    2 X2 N5 N5 G2 K- P    d(j)  the electricity demand for power plant i in cases( g3 F, T0 w/ |8 s/ e5 [
           /mode-1  3
    " z' ?0 N$ o4 L& p8 Q        mode-2  3
    & s8 d# V. D4 z) p4 N        mode-3  2/;+ t. h, J( L; d/ r4 R# k- T
    Table f(i,j) the unit operating cost of each power plant5 f  D5 A: e5 \- l0 y, @
                     mode-1   mode-2   mode-3
    ; z: J; _4 a* L) P9 Z: F5 u        plant-1   0.4      0.24     0.04" C% w, `5 R$ t
            plant-2   0.45     0.27     0.045; ?; F- t0 R: C+ U# x* P* |
            plant-3   0.32     0.192    0.032
    ! Z, d  H/ p) N2 V  ^        plant-4   0.55     0.33     0.055;0 C1 z6 A/ x& c' c2 i
    Scalar m the minimum total installed capacity of the four power plant /12/
    4 ?, Q$ d3 i, A8 H/ w, E. ]+ g       b the minimum tatal investment budget of the four power plant /120/;
    4 r: r0 q3 l% Q- BVariables
    # j! h1 M  ^! n& X( a2 [1 m, T       x(i) the installed capacity of the i power plant in cases: i) r7 X' E4 S
           y(i,j) the operating lever of the i power plant under the j operating mode
    8 X3 r4 d( k  x% B2 Z' H5 Q; g1 t$ l$ k       z the total cost of the four power plant;
    % D# Y8 [' f! Y1 k4 ?Positive Variable x;
    5 ^$ D8 A% w2 L. a3 A5 c3 wEquations& T0 d" t$ m. \) V3 O; i
           cost           define objective function
    6 B% _% C, \* H% ]       capacity1(i)   observe total capacity linmit at plant i
    - P$ x2 @6 x. @' W, m       budget(i)      observe total investment budget limit at plant i
    . b+ \& h9 O9 `: L. N       capacity2(i)   observe installed capacity for each power plant/ y4 n! u- h: y: K3 G+ b- l& u
           demand(i)      satisfy the electricity demand under each operating mode;3 f+ s) K5 _& t  C- R
    cost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));7 [" M+ H7 z9 e3 l, U: |
    capacity1(i)..    sum(i,x(i)) =g= m;
    8 e; |. P& b+ f& p  Jbudget(i)..       sum(i,c(i)*x(i)) =l= b;; z6 L- r3 L- y$ }
    capacity2(j)..    sum(j,y(i,j)) =l= x(i);
    3 B- V- U; m0 @4 L+ c# g8 Pdemand(i)..       sum(i,y(i,j)) =g= d(j);
    ' W( T2 K! M7 w8 FModel investment /all/;" S. l/ D5 @4 W! Z% N, ~$ P/ B- b
    Solve investment using lp minimizing z;* @- a; ]6 n; D0 @) Z, r
    Display y.l, y.m;. X2 [9 R3 `8 ?  X% V. G% i1 X' j" c

    8 f0 i) Z, p0 z: @3 i* v$ Y' w运行出错的,但是不知道怎么解决,请亲给处理一下哦!!!
    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 00:16 , Processed in 0.419589 second(s), 51 queries .

    回顶部