QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2940|回复: 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
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!
      O/ \. h3 y. [; t我把程序贴在这,
    3 \% a: [& z3 z- J$Title A Investment Problem* j+ e0 s6 f6 r* }: u- W
    $ontext
    5 I8 K- @) z8 g0 _  m  N0 A5 _/ uthis problem finds a optimized investment that meets4 c; x: h7 t  x3 b( n8 L
    requirements in the city
    7 P+ d' c1 c$ P  X1 w2 m6 G$offtext
    . E/ g( `. C$ HSets
    8 x+ Z1 O0 Z/ [; b$ d. F+ i  m    i  power plants  /plant-1, plant-2, plant-3, plant-4/
    - E+ R2 v8 k3 b  K    j  operating mode  /mode-1, mode-2, mode-3/;: Z8 K. F3 V) f& }3 z- \
    Parameters1 _( C7 E  g: R7 l, F1 G8 M
        c(i)  the unit installed capacity of power plant i in cases; ~3 K# b  O1 z0 C, A& N  |
           /plant-1  105 T, T) |  f! L  A/ T
            plant-2  7
    / c, u3 c  }0 @4 i. H        plant-3  16
    / e' L) C, W4 f. `( R        plant-4  6/
    ( w" u. N5 A7 R! N% Q0 w& v3 N    d(j)  the electricity demand for power plant i in cases
    # m6 B) v7 v) K9 t6 {5 Y6 H0 D% V, ]       /mode-1  3
    # Z3 D, F8 ^% x- [0 _        mode-2  3! C( e. J9 I5 m5 H
            mode-3  2/;7 M& R" D3 O" m$ f6 c
    Table f(i,j) the unit operating cost of each power plant3 I4 `/ c' R% G& g& R
                     mode-1   mode-2   mode-3- o  w) Z, q* R$ \: p/ d
            plant-1   0.4      0.24     0.04$ X" o, _( R5 L# S8 w# N" U
            plant-2   0.45     0.27     0.045
    1 U# V; z" X- a! s/ J' [        plant-3   0.32     0.192    0.032
    8 Y  T- l# r9 |: T) A0 G  f! X        plant-4   0.55     0.33     0.055;) R- S- d1 B, M; y1 b
    Scalar m the minimum total installed capacity of the four power plant /12/
    4 L: k2 J: r2 @7 L) {: v       b the minimum tatal investment budget of the four power plant /120/;  m, A- e/ X- k/ w" Y9 k
    Variables
    0 z  |: ^; {0 o$ w: `. V9 a       x(i) the installed capacity of the i power plant in cases5 F5 _! B. @0 E8 {
           y(i,j) the operating lever of the i power plant under the j operating mode5 v5 ]; J! C  c, N9 u
           z the total cost of the four power plant;
    ! H1 m3 y* {- m, W8 o3 rPositive Variable x;
    0 X9 U  p6 `. ^: S6 ^- ^& E% sEquations
    9 c5 V0 F/ |7 ?, t7 b  ~- a       cost           define objective function
    . o$ V9 H  O# @; a5 i8 s+ o       capacity1(i)   observe total capacity linmit at plant i
    : f" k! M& d( _, \: l0 Z       budget(i)      observe total investment budget limit at plant i9 t/ X0 g7 Q9 l$ I% V1 `% J  u
           capacity2(i)   observe installed capacity for each power plant& r; g- M9 o8 F# e' z' `3 K
           demand(i)      satisfy the electricity demand under each operating mode;9 S9 A3 x$ }4 y) l# r* A
    cost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));
    5 J- \0 k& q- t* Q5 h( Q! vcapacity1(i)..    sum(i,x(i)) =g= m;: P$ l$ e4 M& o! F, W
    budget(i)..       sum(i,c(i)*x(i)) =l= b;1 u/ L4 Q1 S; b, Q& N* u
    capacity2(j)..    sum(j,y(i,j)) =l= x(i);
    2 [  M7 P) Y2 @  U2 Qdemand(i)..       sum(i,y(i,j)) =g= d(j);
      V7 o+ W: N4 w- ^. o3 ?2 T# TModel investment /all/;* _: ~6 X* F1 A2 k; ]+ t/ @* @
    Solve investment using lp minimizing z;
    2 v/ b7 v- S1 C, v0 dDisplay y.l, y.m;# p% _) Z7 w8 O+ i) G  M

    ( c6 S  A+ f9 F1 ?) F运行出错的,但是不知道怎么解决,请亲给处理一下哦!!!
    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-4 07:13 , Processed in 0.416315 second(s), 51 queries .

    回顶部