QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2962|回复: 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 _' |- _& w# L2 s; S; G
    我把程序贴在这,
    * F6 W: h; z1 q$Title A Investment Problem, Z1 `' X6 h8 A5 a
    $ontext$ {3 C1 z. ]4 i3 A9 H4 k6 \) y( n
    this problem finds a optimized investment that meets) ^4 Y9 U( b: E7 ^. @6 ^% L! [
    requirements in the city! F. m# K( d+ y2 U
    $offtext1 s! F6 _6 Z7 e
    Sets# Z0 p% u/ H. Q
        i  power plants  /plant-1, plant-2, plant-3, plant-4/( I, K' K2 Y$ ^1 ?. W
        j  operating mode  /mode-1, mode-2, mode-3/;
    5 R! s+ q2 k9 b$ D0 JParameters
    # w/ _4 X0 ~* k; m    c(i)  the unit installed capacity of power plant i in cases
    " x  n8 D$ x: _       /plant-1  10
    # z+ g, |  d9 \# {- C' H. G- g        plant-2  7
    9 [% }) \4 w& M        plant-3  16# x: E1 A7 e/ @+ M
            plant-4  6/
    ; y: f! d0 C& w1 `3 r    d(j)  the electricity demand for power plant i in cases
    " ~* c9 x' Q* ]       /mode-1  3
    & O: m+ I7 F8 U/ c2 O        mode-2  3( U" O1 ~3 L/ _& p: a1 `7 L3 a
            mode-3  2/;
    ( H: j  I* H" E6 NTable f(i,j) the unit operating cost of each power plant
    / X8 O, y$ d7 B6 {( C                 mode-1   mode-2   mode-3+ g6 N$ W/ j. M5 Y3 W
            plant-1   0.4      0.24     0.046 P# B3 X  e. d5 V! o1 c  ?, k: A# y
            plant-2   0.45     0.27     0.045* A& {/ o; t  F
            plant-3   0.32     0.192    0.0322 o% E8 e+ U# c+ I$ p* S
            plant-4   0.55     0.33     0.055;+ m, o& o" s" X6 e" v7 t& x
    Scalar m the minimum total installed capacity of the four power plant /12/4 k5 y, ]# C( L* A
           b the minimum tatal investment budget of the four power plant /120/;. _" o$ L) j' `: p1 t
    Variables
    9 v) P, k! c$ q( b+ ?       x(i) the installed capacity of the i power plant in cases
    1 r2 A4 \, Y9 H( y( [; O* G# v       y(i,j) the operating lever of the i power plant under the j operating mode
    ' S7 Q) K  r0 W1 ]" ^6 H) v" P# j       z the total cost of the four power plant;
    1 O$ ^/ \1 C* T5 }0 @9 ~# X& y0 NPositive Variable x;: O' v* i% `: c& [# ?
    Equations
    * y1 b; _" I: ~+ D       cost           define objective function
    9 b; N% L( d  B( J; g, G: J% p0 E       capacity1(i)   observe total capacity linmit at plant i9 C5 w6 [4 x4 A9 i$ l# l
           budget(i)      observe total investment budget limit at plant i
    / J3 @/ V" `/ u& Y       capacity2(i)   observe installed capacity for each power plant. G" y1 s$ Q+ i1 Y2 q$ h( m, d
           demand(i)      satisfy the electricity demand under each operating mode;
    ( W, n2 E8 v/ |6 _! O5 g/ J$ R6 Gcost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));$ X7 V9 ~: ^1 r" M+ V" V2 i$ c
    capacity1(i)..    sum(i,x(i)) =g= m;$ d, a6 `6 n2 v
    budget(i)..       sum(i,c(i)*x(i)) =l= b;9 l. |$ L. p/ E! `8 f' U
    capacity2(j)..    sum(j,y(i,j)) =l= x(i);
    2 G  Q! Z4 \. u4 {9 |demand(i)..       sum(i,y(i,j)) =g= d(j);
    0 \& a. Y& _8 I( G. o6 D& N; TModel investment /all/;
    & u5 v$ A$ R5 ?3 M0 |Solve investment using lp minimizing z;
    ' \% X4 R1 A+ \& J9 LDisplay y.l, y.m;2 b3 b/ R9 p) V1 w

    9 d  H, G6 q; U( {: b/ J运行出错的,但是不知道怎么解决,请亲给处理一下哦!!!
    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-7-22 01:02 , Processed in 0.480244 second(s), 51 queries .

    回顶部