QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2987|回复: 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
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!
    ! O/ J) o; H$ |& b我把程序贴在这,
    ' S9 k; P9 D% {7 u3 x- _$Title A Investment Problem. T3 k& @7 d4 Y- `9 V4 }
    $ontext! U* r5 j  L# k" i. e# t
    this problem finds a optimized investment that meets: o" v7 q  q( I, ^
    requirements in the city
    $ L' a4 L% B/ s% M( Y& P! D8 Y$offtext
    ! P8 R9 [& @! ?, b/ @- l6 bSets0 s3 y+ s8 R9 r: P* o9 m% F& m
        i  power plants  /plant-1, plant-2, plant-3, plant-4/
    1 a# N: z3 m9 s! b) \# z* h    j  operating mode  /mode-1, mode-2, mode-3/;. `: `+ i! d$ ]* K/ x
    Parameters
    ; C& r5 [8 t, u8 Z    c(i)  the unit installed capacity of power plant i in cases. o: W) j2 Y) p( H+ P! M& d
           /plant-1  10, v$ j8 k/ d' l
            plant-2  7
    - d; C  z$ K0 j2 e" @        plant-3  16
    8 W# [0 E/ M4 |8 {. ~7 b4 I3 A        plant-4  6/
    % ?4 h% M! h# D1 w    d(j)  the electricity demand for power plant i in cases
    1 E7 |" H+ a0 D- s+ M( D       /mode-1  32 ~; c/ Q+ j; n- F9 Z. {% W( o6 V
            mode-2  33 T/ n6 v3 w) q
            mode-3  2/;
    0 [* U- n& i- M& |3 {( C$ dTable f(i,j) the unit operating cost of each power plant4 D5 _& j) X# K( T( i8 M
                     mode-1   mode-2   mode-3
    8 d8 g5 O7 J# `7 i        plant-1   0.4      0.24     0.04
    ( ]* V3 D( Y2 g/ ~        plant-2   0.45     0.27     0.0453 l. k9 ^4 _% ?( g+ C- }
            plant-3   0.32     0.192    0.032
    7 F# V! r3 K' b6 M/ e        plant-4   0.55     0.33     0.055;0 |1 w, X- T; D
    Scalar m the minimum total installed capacity of the four power plant /12/' F2 j: d! L4 l0 \
           b the minimum tatal investment budget of the four power plant /120/;
    ) h. s) R4 j+ pVariables! D+ o' B, _) F4 {, j3 K9 S
           x(i) the installed capacity of the i power plant in cases- w8 v& s$ }  j; J, E! d1 L
           y(i,j) the operating lever of the i power plant under the j operating mode
    2 |$ D% z/ R+ k. v       z the total cost of the four power plant;! @! @3 V* I5 E/ b" G
    Positive Variable x;
    5 S5 x( ^6 J3 DEquations
    ' q8 c" l' \5 E5 ?% Y       cost           define objective function+ C, n/ j0 L" X, F4 o
           capacity1(i)   observe total capacity linmit at plant i
    $ g1 ?1 E/ u% R/ i0 k, J* B$ g       budget(i)      observe total investment budget limit at plant i- g4 b4 W" H5 k; G, T9 T
           capacity2(i)   observe installed capacity for each power plant( Z' }: @6 D$ S7 F
           demand(i)      satisfy the electricity demand under each operating mode;
    : N' f8 L2 m: F) l+ N7 ncost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));. x; l0 L$ B: O7 A/ L8 n( V
    capacity1(i)..    sum(i,x(i)) =g= m;1 `# @/ [( X8 k! N
    budget(i)..       sum(i,c(i)*x(i)) =l= b;4 Y3 o* G* a* I- J1 S: ~+ y3 ^
    capacity2(j)..    sum(j,y(i,j)) =l= x(i);
    0 z/ Q7 U- W3 i* b' k' E+ _demand(i)..       sum(i,y(i,j)) =g= d(j);
      I3 D" w3 U# wModel investment /all/;0 a2 R" L" c7 n) E' k
    Solve investment using lp minimizing z;; w4 y2 t0 E, W, q& @7 k. ^
    Display y.l, y.m;
    ! N. v- X& |% b" B$ |( q: {3 C7 `+ U2 s
    运行出错的,但是不知道怎么解决,请亲给处理一下哦!!!
    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-9-5 05:02 , Processed in 0.353051 second(s), 51 queries .

    回顶部