QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2908|回复: 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
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!
    2 H. s+ K7 u( v4 F我把程序贴在这,
    ! ~% ?  f& e4 a1 v: T$Title A Investment Problem
    ! {- k* e3 }8 b- V, _. ]( B2 \1 V, I$ontext
    3 n5 h; O  H; V0 h& {; ythis problem finds a optimized investment that meets
    1 @* C% N* x; \: g* m( X3 E3 prequirements in the city
    * A6 E* p, N' K) a6 s$offtext7 G6 g3 W7 M# [
    Sets4 Q5 o6 g4 ]  Q1 l- ~
        i  power plants  /plant-1, plant-2, plant-3, plant-4/  g2 D; h9 n8 C  N( S' x' E& P
        j  operating mode  /mode-1, mode-2, mode-3/;' a+ }) P# J. \' U% _& F
    Parameters
    - l2 l; S% d: L) I    c(i)  the unit installed capacity of power plant i in cases
    : A" Z4 m! |9 z. K) `2 x* C       /plant-1  10
    + ^1 j) c9 d3 P5 U; K2 j9 C        plant-2  7
      [0 w0 L$ H( V1 v: B        plant-3  166 u4 f8 e1 @6 m! P# y
            plant-4  6/
    " y# B9 [) q% X0 `5 g8 V& g/ J    d(j)  the electricity demand for power plant i in cases' e0 u. P3 m2 o7 F
           /mode-1  3: i) q. a! p- h$ E3 `
            mode-2  3
    ) \3 h" W! G# U+ v        mode-3  2/;# D9 Z6 {- H( p( Z! M+ M$ D+ S; _
    Table f(i,j) the unit operating cost of each power plant% U  h* d' t+ |: _# G5 Q
                     mode-1   mode-2   mode-35 p% A$ H& r8 X  c6 R. C
            plant-1   0.4      0.24     0.04- J5 u6 T7 m- V; O; H3 u
            plant-2   0.45     0.27     0.0451 \: s; q; |/ U0 T* {: y
            plant-3   0.32     0.192    0.032
    ; M& f4 j4 {# M7 `9 x, z! R        plant-4   0.55     0.33     0.055;
    ( ~/ k! |+ M2 F! CScalar m the minimum total installed capacity of the four power plant /12/) {0 M7 L# t5 c5 n4 Y) @; [
           b the minimum tatal investment budget of the four power plant /120/;
    ) Z7 q, @- R/ qVariables, J6 q8 u( G4 j  W' S/ F2 z
           x(i) the installed capacity of the i power plant in cases" e" K: _0 E" n7 A
           y(i,j) the operating lever of the i power plant under the j operating mode
    & {" d& L+ V6 G7 Q; X       z the total cost of the four power plant;1 t6 h- w2 W! S+ d% H6 d0 _9 t
    Positive Variable x;
    % n8 U; o2 }* l! t0 rEquations3 Q+ [5 j( _9 j8 b+ X
           cost           define objective function
    4 W2 S  v+ D) v       capacity1(i)   observe total capacity linmit at plant i0 L* K* K0 V1 w* k3 y1 r  L/ n
           budget(i)      observe total investment budget limit at plant i
    ' H) v' V% _1 [, A( ]- Q/ |* g       capacity2(i)   observe installed capacity for each power plant
      q' v6 H2 b' c0 e; h       demand(i)      satisfy the electricity demand under each operating mode;
    ' h* l1 W: L7 t. F1 l$ {cost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));8 B0 {, K) |& B9 d: U
    capacity1(i)..    sum(i,x(i)) =g= m;
    1 p5 w5 k" {0 Zbudget(i)..       sum(i,c(i)*x(i)) =l= b;  b7 }) c- b+ a8 y
    capacity2(j)..    sum(j,y(i,j)) =l= x(i);
    ! x" I9 v) m  P# A0 _# n5 s& q3 Bdemand(i)..       sum(i,y(i,j)) =g= d(j);: R, l. ]( W) F
    Model investment /all/;1 _; Y/ G9 M1 U) U1 A
    Solve investment using lp minimizing z;) N* ^) c  J' h) ?# \
    Display y.l, y.m;
    - L  t2 n# O& Q9 y/ t% D% V/ D
    0 Q2 v. H. e/ q. y" E( [% J; ~. a运行出错的,但是不知道怎么解决,请亲给处理一下哦!!!
    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 14:37 , Processed in 0.422437 second(s), 51 queries .

    回顶部