QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2967|回复: 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
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!* q  z4 y1 r. U  D: ~! C4 X
    我把程序贴在这,5 k$ K) E* g5 c
    $Title A Investment Problem
    & H/ R4 t" b1 q$ m$ontext( p6 \' h0 {: l+ R) G
    this problem finds a optimized investment that meets% q6 @. b( ?& r7 [$ f
    requirements in the city
    4 P7 B7 i% X  z7 Y$offtext
    9 P1 ]3 X9 T6 O0 gSets, B+ h  ]. S. u( y0 }* F# l* h# a# p
        i  power plants  /plant-1, plant-2, plant-3, plant-4/( z4 p( H1 F( Y( J& Y( d
        j  operating mode  /mode-1, mode-2, mode-3/;7 k. ?4 z5 M* q2 ^
    Parameters
    4 V' w- [% m- g$ M# Z* D* |    c(i)  the unit installed capacity of power plant i in cases/ ^. f; K3 Z; ~. i+ O/ u7 _) x
           /plant-1  10
    . C" E6 s# w& u! r/ W        plant-2  7
    6 H) J, N# I& R3 z; P        plant-3  160 K8 C% o$ T! _; u4 K
            plant-4  6/
    . {* {/ S- ?1 P8 N) R4 {    d(j)  the electricity demand for power plant i in cases
    " j9 G' g, T: h4 w7 N       /mode-1  30 q# o1 E4 O' ?4 B( a; i# F
            mode-2  3
    ! a) h& ~# F8 N" C" O& }        mode-3  2/;7 r& a  L; i- v
    Table f(i,j) the unit operating cost of each power plant7 F8 [* B' c" v+ _. q3 a, _
                     mode-1   mode-2   mode-3; ?$ {8 @! m9 k& A
            plant-1   0.4      0.24     0.04% m4 x) r8 X1 ~7 Y8 i# M
            plant-2   0.45     0.27     0.045
    8 W/ _1 c0 _- u, l- i3 B$ D        plant-3   0.32     0.192    0.032' D5 n' f6 B* H. y7 o! a
            plant-4   0.55     0.33     0.055;
    2 v5 `; A: m0 f& L% z3 Q' xScalar m the minimum total installed capacity of the four power plant /12/: Z4 M; S0 o/ u3 G  G
           b the minimum tatal investment budget of the four power plant /120/;* z1 A& W5 s7 i) b
    Variables8 s7 y* P. m2 |% f7 P# j* P  R1 z3 D4 m
           x(i) the installed capacity of the i power plant in cases
    ! X) n5 A8 }" l* |/ l, e       y(i,j) the operating lever of the i power plant under the j operating mode; z6 ^2 c# ]2 Q3 Y
           z the total cost of the four power plant;8 s* c; h% E* E% V
    Positive Variable x;
    " Z3 g  j: B+ P& mEquations( a6 {" _- X3 w, b. y
           cost           define objective function
    ' \( I3 S7 s) `5 t7 g       capacity1(i)   observe total capacity linmit at plant i! Y; ^4 [5 l& \3 b6 \
           budget(i)      observe total investment budget limit at plant i
    / X: `& o0 f: J3 T0 J       capacity2(i)   observe installed capacity for each power plant- V) \+ |) H/ V; N
           demand(i)      satisfy the electricity demand under each operating mode;
    1 @1 l$ ~8 ?4 jcost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));3 g0 a# d6 M" s
    capacity1(i)..    sum(i,x(i)) =g= m;
    : o" ]# f: }1 k- e' y$ ~budget(i)..       sum(i,c(i)*x(i)) =l= b;
    3 d/ e/ n1 D7 J' c, qcapacity2(j)..    sum(j,y(i,j)) =l= x(i);; J/ @  o3 a! Y7 [; K/ f
    demand(i)..       sum(i,y(i,j)) =g= d(j);
    " j& y6 Z! `6 f' Y3 TModel investment /all/;. Y4 l* d# H9 S1 g
    Solve investment using lp minimizing z;
    4 l: E- k0 P4 P' u# l$ U+ X& I: KDisplay y.l, y.m;
    / `6 z% d7 O$ A6 y3 ?2 p9 D( d" K3 Q# V5 I. L
    运行出错的,但是不知道怎么解决,请亲给处理一下哦!!!
    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-27 05:34 , Processed in 0.349650 second(s), 51 queries .

    回顶部