QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2917|回复: 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/ t& w1 E8 l& x6 P1 R
    我把程序贴在这,+ L% P+ B' Q( i5 j, t) {
    $Title A Investment Problem
    ; a+ j1 c( V2 J/ Q: Y/ F$ontext1 R8 J. c5 u1 C3 y' t! `
    this problem finds a optimized investment that meets- G# d; D8 Q  N& H" j. k
    requirements in the city6 T" k- q$ T9 a& U8 _1 E; }
    $offtext) S+ f0 N. j) g) p0 ]( y8 N( H. ^% X
    Sets3 M! M: U. w6 I' V; v$ @
        i  power plants  /plant-1, plant-2, plant-3, plant-4/
    3 I6 d! }3 {: `" A* E    j  operating mode  /mode-1, mode-2, mode-3/;
    6 r% Z  S6 e" f0 V6 BParameters
    * b' |$ m* E: d9 O3 T' s    c(i)  the unit installed capacity of power plant i in cases+ {4 z+ J* q2 h/ {) D8 i
           /plant-1  10
    , \" r( K2 u- g% z! z$ ?2 |( p        plant-2  7* G8 _* R3 V7 f. Y, D& V* k6 Z6 r
            plant-3  16/ w- ~# ?0 r9 J
            plant-4  6/8 E" l$ l) _: Z3 R( {: n
        d(j)  the electricity demand for power plant i in cases, }- f6 E7 y- l* _
           /mode-1  3
    ! n1 T# \3 x! q        mode-2  35 e) S$ l$ `7 e. u, f: S
            mode-3  2/;
    " \( r' j5 X4 q* u' V: b/ @$ WTable f(i,j) the unit operating cost of each power plant, j( |7 N$ y" l9 Q
                     mode-1   mode-2   mode-3
    2 D2 t7 g1 N: W& i1 V4 B' T7 g        plant-1   0.4      0.24     0.04
    0 \& p4 j2 g. b& x+ t* V        plant-2   0.45     0.27     0.045
    1 [$ H  n! k& Q, X/ ^" ~9 s' u+ C        plant-3   0.32     0.192    0.032* i- a0 ]# _& Q
            plant-4   0.55     0.33     0.055;
    " z) w( @& m% U! B6 vScalar m the minimum total installed capacity of the four power plant /12/+ F( @; ^! C/ S5 E; n* n9 I  ^% B
           b the minimum tatal investment budget of the four power plant /120/;% o7 ?# u" Q  P9 X- {
    Variables
    " |7 c* f* p( i) T6 N; N       x(i) the installed capacity of the i power plant in cases
    % a; f% ~: S# _) ^4 F2 {7 i% d       y(i,j) the operating lever of the i power plant under the j operating mode& P; I' t. k9 `( {3 Z$ u5 Q* _  f
           z the total cost of the four power plant;% V+ i  y2 u& J9 V" U5 L% A
    Positive Variable x;) `8 C% ~2 I5 W# O% ^
    Equations
    + s( \) g+ A) J9 A1 _- Z- I       cost           define objective function- w/ ^3 `8 G* M) v4 A) B1 ^9 _) P
           capacity1(i)   observe total capacity linmit at plant i
    * h8 J; W5 P! ]5 q       budget(i)      observe total investment budget limit at plant i
    , f" a; H  F0 j       capacity2(i)   observe installed capacity for each power plant  R& H5 Q: W6 i
           demand(i)      satisfy the electricity demand under each operating mode;
    $ u; n2 U  ~& b0 t# `; T9 Scost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));1 a6 i( N1 }% y- B7 b
    capacity1(i)..    sum(i,x(i)) =g= m;3 F, W% d/ F3 q% {, ]# t( M
    budget(i)..       sum(i,c(i)*x(i)) =l= b;' X+ |' Q2 @8 [2 q' g5 X! G* K
    capacity2(j)..    sum(j,y(i,j)) =l= x(i);8 I. B% }& b7 t$ C! P9 O/ J8 [, T" J
    demand(i)..       sum(i,y(i,j)) =g= d(j);, X( a- x$ |: [. q9 a
    Model investment /all/;
    ( G5 H' h2 }, ]1 r( f9 Y* M( eSolve investment using lp minimizing z;$ V' T1 `9 Y  O- {7 u- k5 E  `
    Display y.l, y.m;
    1 Z# R# B) ]; l# F
    ; J8 `5 q2 ^* K; e- H6 {4 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-4-21 16:32 , Processed in 0.385383 second(s), 50 queries .

    回顶部