QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2644|回复: 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
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!( [. U* [) H& v8 ~4 N2 |7 Q9 L7 b
    我把程序贴在这,/ {0 r2 D! n, h* E6 U  S  s
    $Title A Investment Problem6 X$ U+ p$ c: E) u0 N7 o
    $ontext1 O1 j+ w- F/ E# C& }$ H$ H( r
    this problem finds a optimized investment that meets; M! H4 i" Q, i
    requirements in the city3 a& g6 e4 @! |) c+ w$ u
    $offtext3 k' k+ S6 ~' i5 X! g9 Z7 N6 P
    Sets; M$ y/ r4 f8 T# g! b
        i  power plants  /plant-1, plant-2, plant-3, plant-4/
    0 J/ q: i4 S& j  c4 n    j  operating mode  /mode-1, mode-2, mode-3/;
    ' h0 t: L6 q. W2 ?3 XParameters
    - p$ W5 A4 V) ^  {' \5 B    c(i)  the unit installed capacity of power plant i in cases
    ! }6 _# A% }- `2 u       /plant-1  10
    2 I/ P2 k- ^6 q- J1 l& P        plant-2  7
    , _, Q. v7 W! f6 O7 }: d        plant-3  16
    8 |4 q5 N1 h4 L  }6 c/ h/ k: e        plant-4  6/9 _* B% b3 c+ }# ]7 s$ G+ @
        d(j)  the electricity demand for power plant i in cases
    ( ^% A0 @0 z3 I* x' t, w       /mode-1  3# B4 D6 I6 n3 b& ?9 k
            mode-2  3
    5 f  Z% p3 V  I2 X& c        mode-3  2/;5 l$ g  [$ m/ N9 o: {
    Table f(i,j) the unit operating cost of each power plant
    8 ^& N" ^) c1 i, W! l( d& d8 l                 mode-1   mode-2   mode-3
    # j+ W" u  [) i% o  n# n7 l4 ^        plant-1   0.4      0.24     0.04% s; K5 a/ B, M" j3 r5 I3 N
            plant-2   0.45     0.27     0.045
    ' d5 W( |3 P& K        plant-3   0.32     0.192    0.032
    - k( G2 ?6 T. ~- h4 j5 S' T8 ^: `        plant-4   0.55     0.33     0.055;
    2 v. N- B- |- r" tScalar m the minimum total installed capacity of the four power plant /12/
    + N* u: a2 H: ~4 k       b the minimum tatal investment budget of the four power plant /120/;
    ( j) ?2 u" q9 x6 ~7 dVariables
    $ W) b2 i" f1 h" |" C7 M       x(i) the installed capacity of the i power plant in cases
    , Y4 I* i0 l/ |' m' W$ U9 Y3 K! W       y(i,j) the operating lever of the i power plant under the j operating mode: Q6 ^- ?' H4 @! {
           z the total cost of the four power plant;! w1 r0 h1 O2 }) [, y
    Positive Variable x;
    . v3 C' l" E. W# {* [( M7 f& D+ kEquations& c. f9 a" A3 c( m4 N
           cost           define objective function
    4 S* D+ {) [. b1 @. I+ |       capacity1(i)   observe total capacity linmit at plant i
    & k  J5 t9 e9 ^( E) k       budget(i)      observe total investment budget limit at plant i
    ; m. A0 C  r& C% n: K9 v       capacity2(i)   observe installed capacity for each power plant- u$ Z! M/ V9 t- H8 z( C  U
           demand(i)      satisfy the electricity demand under each operating mode;
    4 J4 J9 b3 n* C* Y: z0 L% Tcost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));
    5 R  j8 r: h$ d/ _) ~capacity1(i)..    sum(i,x(i)) =g= m;! Q! j0 ^2 Q: G" A
    budget(i)..       sum(i,c(i)*x(i)) =l= b;3 N/ Q; ~% a( o( j( S
    capacity2(j)..    sum(j,y(i,j)) =l= x(i);
    ; K8 J: i: k+ x3 zdemand(i)..       sum(i,y(i,j)) =g= d(j);
    % c3 L$ g7 J0 ]' d; RModel investment /all/;" ^  v+ d+ t' R$ u, n
    Solve investment using lp minimizing z;1 @* e/ j2 B* F
    Display y.l, y.m;: k0 j9 @; Q$ c" h1 A

    ( [; ^* F& c# `2 |! b1 G运行出错的,但是不知道怎么解决,请亲给处理一下哦!!!
    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, 2025-8-4 01:30 , Processed in 0.356596 second(s), 50 queries .

    回顶部