QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 3064|回复: 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
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!5 b$ H/ B+ V. L9 ~3 _3 L2 `! J
    我把程序贴在这,
    ( z- e2 |( k4 b$ J' M: _9 \$Title A Investment Problem& G& I, g+ O/ C0 N  d8 M/ @: `' J
    $ontext7 u$ [2 F! B9 L+ _4 a
    this problem finds a optimized investment that meets9 G( x: ]! n  C. b
    requirements in the city
    3 s5 F" Z  a) z1 f" f) p7 g& s$offtext. T% u0 i  z, E. ^( X
    Sets
    ' O; P3 a8 t+ y4 M7 U    i  power plants  /plant-1, plant-2, plant-3, plant-4/2 b; k. g, k0 E' b3 R) H
        j  operating mode  /mode-1, mode-2, mode-3/;
    , s9 b, j7 m0 MParameters5 X+ v: Y5 `. g; K9 J% i7 z( [
        c(i)  the unit installed capacity of power plant i in cases
    , g, m* ]2 Z% O" w, W) l7 T: R       /plant-1  10
    1 q% q1 n# S+ W" o' D) t! i4 `        plant-2  7: s8 U9 r* e; V; @
            plant-3  16( f6 F1 m6 i7 a" m- u
            plant-4  6/
    1 j7 t' `# n0 P! J    d(j)  the electricity demand for power plant i in cases, ~1 G( ]# s; @5 R+ h+ {5 D' l4 }
           /mode-1  31 f/ ?- f2 \$ _6 b. ?
            mode-2  3
    8 I  n8 A# S/ Y  F3 L4 ~' ~        mode-3  2/;
    ) x0 |6 R. Q0 tTable f(i,j) the unit operating cost of each power plant2 b( W' {: |# r" [0 i/ X" I  D7 D
                     mode-1   mode-2   mode-3) B8 b9 p- f0 b1 y' a
            plant-1   0.4      0.24     0.04
    + x4 V) I8 Q' {' H- o7 H        plant-2   0.45     0.27     0.0454 q+ q0 x" d  u$ J
            plant-3   0.32     0.192    0.032
    5 @  e4 m9 l3 Z' J, V: @8 |7 m        plant-4   0.55     0.33     0.055;
    3 s/ D! h8 s& v( \* L$ Z( U* ~Scalar m the minimum total installed capacity of the four power plant /12/0 ~0 K1 K$ q" f" Z/ F+ C
           b the minimum tatal investment budget of the four power plant /120/;
    ) Y* n' S+ T' JVariables) a+ D+ R- X: Z. }
           x(i) the installed capacity of the i power plant in cases$ ?2 c5 M  V) f# c6 Y* s0 Q
           y(i,j) the operating lever of the i power plant under the j operating mode! y' P9 [" ]2 W
           z the total cost of the four power plant;
    4 B% V$ T. V3 Q$ _3 t: IPositive Variable x;
    $ e# g+ l+ c) e9 }7 oEquations$ s6 T# R$ m- F4 U
           cost           define objective function
    ; M2 o6 Q" i5 m& c2 d. C( s1 ?4 E       capacity1(i)   observe total capacity linmit at plant i
    # K1 ]: M) ]5 V  S( q: \  k# B       budget(i)      observe total investment budget limit at plant i0 ?5 l$ W7 ^: w) q) l
           capacity2(i)   observe installed capacity for each power plant
    7 b. T- U/ V) j- p3 G  Q       demand(i)      satisfy the electricity demand under each operating mode;, b! M- r* d# e7 ^  n. E4 H
    cost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));: k: ~& e( ]4 w  v
    capacity1(i)..    sum(i,x(i)) =g= m;. t2 h4 o# C$ R  u3 P0 r. c
    budget(i)..       sum(i,c(i)*x(i)) =l= b;
    ) w2 U+ d9 S) ]" [: Pcapacity2(j)..    sum(j,y(i,j)) =l= x(i);- A/ I( P) w7 i' v
    demand(i)..       sum(i,y(i,j)) =g= d(j);; S5 V9 F' e4 N/ ^$ t' `+ f* m
    Model investment /all/;9 i4 C2 ~9 t$ \% V* Z/ A7 |
    Solve investment using lp minimizing z;
      ?( Q  C9 k2 L& z9 T1 vDisplay y.l, y.m;; L$ Y& Q* p' F

    - p- y4 Z; ?) ?5 B2 i0 |' Q% T( o! M运行出错的,但是不知道怎么解决,请亲给处理一下哦!!!
    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-10-26 08:34 , Processed in 0.369405 second(s), 51 queries .

    回顶部