QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2907|回复: 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
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!
    4 S" _  A6 x! [& D  h+ U5 c我把程序贴在这,4 u- [0 ~* k- G: E3 i' M1 L
    $Title A Investment Problem
    ( I1 E; A7 [$ e1 ~- ^$ontext
    - v1 }3 }% q( s% A& m/ pthis problem finds a optimized investment that meets, f6 [& H1 M% {/ x  ~
    requirements in the city; y0 W* X4 O  M, ~& ^7 F) A
    $offtext
    5 l4 ~: d! a+ X& C" i6 N$ SSets# C! }- |3 k# @; M. `6 n/ e$ A& Y
        i  power plants  /plant-1, plant-2, plant-3, plant-4/! f$ b9 [0 K# @
        j  operating mode  /mode-1, mode-2, mode-3/;3 v, K6 h6 i) u& n/ A; V
    Parameters
    6 [' ~# S7 r! l3 ^: G    c(i)  the unit installed capacity of power plant i in cases3 z# X" _# I2 R
           /plant-1  10
    " w; o  S3 O/ r' j) Z; I        plant-2  7
    . T0 `9 h( `2 J; Y  |; V' `        plant-3  16
    3 S, u; a& J( i/ l7 ~+ X, B* F3 A. X9 q/ B        plant-4  6/
    / J- Y- q; A* o    d(j)  the electricity demand for power plant i in cases. S: v/ x+ z3 e
           /mode-1  3
    + k$ I: ^# d7 M. F        mode-2  3
    3 s4 V) e- h7 R        mode-3  2/;
      |; U- B* s$ b. H& _$ _  C4 @/ UTable f(i,j) the unit operating cost of each power plant* `  @0 m1 n0 W+ b& [) H  X
                     mode-1   mode-2   mode-3$ @0 n, b' U4 F; F
            plant-1   0.4      0.24     0.046 M0 [5 Y* P( W( j9 T
            plant-2   0.45     0.27     0.045; ?( i2 F* U2 @6 c! e. X7 |4 S& b
            plant-3   0.32     0.192    0.032
    " F- }, @! V+ ]6 g/ v        plant-4   0.55     0.33     0.055;+ q3 Y# B6 F% k( E' j' N6 O
    Scalar m the minimum total installed capacity of the four power plant /12/
    3 E4 ~+ Y7 ]+ z/ h( R       b the minimum tatal investment budget of the four power plant /120/;
    & g/ ~( P- U; T2 yVariables
    5 h9 Q' J& C1 c: F4 y; U  B* J       x(i) the installed capacity of the i power plant in cases* P" u8 ^8 N0 {, _! K8 o' l
           y(i,j) the operating lever of the i power plant under the j operating mode* U% U1 d! s5 w. L" S8 [9 r# F9 M
           z the total cost of the four power plant;5 Z$ y" D4 i% s9 O2 n2 s5 K: G
    Positive Variable x;) S9 V: u: D" [; U9 T: R
    Equations
    7 ]* l( z7 V1 n+ [$ G       cost           define objective function
    8 m: k! T5 k# X! e       capacity1(i)   observe total capacity linmit at plant i) F& }6 |; ~* o3 D& q
           budget(i)      observe total investment budget limit at plant i8 c4 W( b' l' k- q' a
           capacity2(i)   observe installed capacity for each power plant: [9 J. L' o# i5 }0 {
           demand(i)      satisfy the electricity demand under each operating mode;0 h0 L+ l" Q4 H: f$ l: ~3 F
    cost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));; ^/ [, G& y( ?
    capacity1(i)..    sum(i,x(i)) =g= m;
    9 m! a) V' L& wbudget(i)..       sum(i,c(i)*x(i)) =l= b;
    / X$ N$ ?, u& W7 v( lcapacity2(j)..    sum(j,y(i,j)) =l= x(i);
    ; g, G) y- s, ]6 u$ _demand(i)..       sum(i,y(i,j)) =g= d(j);
    4 Y5 l2 k- @0 q7 G- z- |! R2 |3 hModel investment /all/;
    7 V1 O3 H. f( K( J" {5 PSolve investment using lp minimizing z;* s$ n8 q# \8 Q* j  C% X
    Display y.l, y.m;8 B" C) E5 F2 J) p$ E1 b/ b
    $ V9 w( y0 b1 T$ E3 v
    运行出错的,但是不知道怎么解决,请亲给处理一下哦!!!
    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-15 10:58 , Processed in 0.287007 second(s), 51 queries .

    回顶部