QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2961|回复: 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
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!% @7 W) a) U1 I* h4 z
    我把程序贴在这,
    " ~6 g1 h9 O9 D; f) ~9 [( W4 d$Title A Investment Problem+ M% H7 y) f, O$ r% v
    $ontext# d# Y6 x* X, {4 k- X/ i% z% P7 }
    this problem finds a optimized investment that meets+ `/ p4 Y" y1 H; ]" v$ }& o9 A
    requirements in the city( Q; }6 `: F& p9 l' f
    $offtext
    ; }. [8 a1 H  l9 y% V6 @) D& u7 W2 [Sets. s/ [6 {$ W9 Y
        i  power plants  /plant-1, plant-2, plant-3, plant-4/
    5 q5 F) V2 N1 F9 \    j  operating mode  /mode-1, mode-2, mode-3/;
    2 T" b" b. g* J2 l8 g  R0 Z+ E- W$ CParameters) w/ [3 z- ~. U* g" y
        c(i)  the unit installed capacity of power plant i in cases3 k0 z- b7 Q# F+ B6 I
           /plant-1  10$ A' w- W7 [2 R, i- e6 Y
            plant-2  7
    9 \" l# V3 x% M5 q1 x9 X1 o' B        plant-3  16
    : _) h/ B) D8 d8 K! g, R/ B4 F        plant-4  6/) ?+ y- n2 o7 ^$ Q6 F
        d(j)  the electricity demand for power plant i in cases
    ; `/ S: T0 ~- V$ Q, ?1 D       /mode-1  38 q7 c4 r9 n" U. Q8 g2 U: z% e* a: z9 @
            mode-2  3
    : }2 f) h# t, O/ d8 X# I0 N5 v        mode-3  2/;) x6 M8 `& s, r2 c/ e
    Table f(i,j) the unit operating cost of each power plant7 V1 x+ w" R( d1 L0 u
                     mode-1   mode-2   mode-3* S& K8 f  D5 D: R0 w
            plant-1   0.4      0.24     0.04
    / H% P) R/ O' |- F3 R& G! c        plant-2   0.45     0.27     0.045
    ' _! z7 G1 ^1 t! s" Z        plant-3   0.32     0.192    0.032$ ]& w0 ]. A# N& Z$ l
            plant-4   0.55     0.33     0.055;- ^' m4 y% ]- g' {0 g1 j
    Scalar m the minimum total installed capacity of the four power plant /12/
    & V5 X( C- c6 H       b the minimum tatal investment budget of the four power plant /120/;
    & D! p1 Z6 u" P9 ]( Y9 B( X* RVariables- ~: m7 X7 A4 B& F( n2 q. i
           x(i) the installed capacity of the i power plant in cases6 P( P7 ?" M( Y6 h2 |
           y(i,j) the operating lever of the i power plant under the j operating mode( P5 J  A: C: f
           z the total cost of the four power plant;
    ; P1 l7 ^/ N! w. [$ C1 K+ ^Positive Variable x;
    9 H# @; n" a0 \4 b) E$ \Equations$ r) a2 K, F$ q4 G
           cost           define objective function
    * X7 M0 ~- U' L; _% S       capacity1(i)   observe total capacity linmit at plant i. W3 K' p- K! x/ m7 W1 t! a
           budget(i)      observe total investment budget limit at plant i
    3 }; c2 F! ~+ ]3 O' H       capacity2(i)   observe installed capacity for each power plant# A! ^) s) }) T, i/ }
           demand(i)      satisfy the electricity demand under each operating mode;4 a0 [& O1 J: D: C
    cost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));7 F: B. z1 U- h8 R. [' r2 T
    capacity1(i)..    sum(i,x(i)) =g= m;
    7 l: i6 a  ]! K$ tbudget(i)..       sum(i,c(i)*x(i)) =l= b;9 ^, `5 v* ^* S4 y3 a; D
    capacity2(j)..    sum(j,y(i,j)) =l= x(i);
    2 J! b, l" G0 e8 j" b! y7 hdemand(i)..       sum(i,y(i,j)) =g= d(j);
    2 Q, K7 P9 T/ k5 ~% s. _Model investment /all/;
    8 t1 f7 B4 M, ^. MSolve investment using lp minimizing z;! A9 }( @% V) a% Z4 U; m% E
    Display y.l, y.m;
    ) [$ ^# Z* T6 c0 Y2 k! R8 |# N& @0 O. S' 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-7-21 20:55 , Processed in 0.458612 second(s), 50 queries .

    回顶部