QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2914|回复: 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
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!! X+ G% B5 `( w' |3 ]
    我把程序贴在这,* K% ~. n" a9 ^* T, t, d: V
    $Title A Investment Problem
    / Y* O# l/ l+ t1 J1 C9 N$ontext. V8 m# r! }% |# J% `
    this problem finds a optimized investment that meets
    % H' X% A! S! q3 x2 `* Q5 S1 [6 L6 arequirements in the city, z( L" P7 {( C5 m
    $offtext
    % i& h1 X2 b, X  c$ mSets
    * `9 {: w0 m# {  A; h, i! k3 T. X    i  power plants  /plant-1, plant-2, plant-3, plant-4/: J- t( u$ s7 k
        j  operating mode  /mode-1, mode-2, mode-3/;& u9 M; S! P, S" X1 u* Z
    Parameters; l- `6 B& M6 A. M
        c(i)  the unit installed capacity of power plant i in cases* y/ t* i" L  L3 }' d% {
           /plant-1  10
    ( a3 P5 b  u3 J7 F$ u" R' a$ I% u        plant-2  7$ M( \: F& s5 V+ k! S( W5 A9 v  J
            plant-3  164 D' b5 S) [# n/ e% |( p+ L! y- m8 ^
            plant-4  6/5 A4 Q" O% y8 W
        d(j)  the electricity demand for power plant i in cases  [9 {. }! ], C$ S# V8 G. j
           /mode-1  39 G4 N% r% n: D) D2 K3 y8 L
            mode-2  3( B1 `5 p9 H5 T* i  |
            mode-3  2/;
    ( ~* E5 H- w& U4 @/ X8 ~Table f(i,j) the unit operating cost of each power plant7 C# n4 J5 N* w  B( `
                     mode-1   mode-2   mode-3* d! ?" a7 ^8 \) c
            plant-1   0.4      0.24     0.04
    5 [0 N& I, p' I7 u9 G% o2 a4 [        plant-2   0.45     0.27     0.045! r0 g3 ?3 h' x. J5 P1 e
            plant-3   0.32     0.192    0.032
    + r1 E# ~* }8 v- a& z; f        plant-4   0.55     0.33     0.055;
    5 X! e% Y* L" i+ A# F( }' i' S* fScalar m the minimum total installed capacity of the four power plant /12/
    ; `+ O- C" O& j" o       b the minimum tatal investment budget of the four power plant /120/;, {! C5 r! b! L' U4 w) }
    Variables( ~' {* D; |7 x9 O
           x(i) the installed capacity of the i power plant in cases7 }$ |4 M+ \  ~2 G) I
           y(i,j) the operating lever of the i power plant under the j operating mode6 i% F9 U# q" o3 e( T
           z the total cost of the four power plant;
    - `  F$ S% e& p4 W- }# Q" ?9 v6 uPositive Variable x;
    - A& n9 r7 K# f2 B, [) QEquations2 E; J4 Q" g2 J3 P( X
           cost           define objective function
    0 c' h& J# t( X       capacity1(i)   observe total capacity linmit at plant i
    + d" i+ b+ l8 w# |       budget(i)      observe total investment budget limit at plant i
    ) {8 z9 T5 }2 i- ?+ K5 J% e       capacity2(i)   observe installed capacity for each power plant
    ( j6 b) E' l1 `+ V       demand(i)      satisfy the electricity demand under each operating mode;
    * P: c5 w( J- e. Ucost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));2 r* `; N( k( U4 S, W: Y0 G0 Z
    capacity1(i)..    sum(i,x(i)) =g= m;/ @8 |. r3 g# r1 @
    budget(i)..       sum(i,c(i)*x(i)) =l= b;, c- Z5 B, z3 W- G( w
    capacity2(j)..    sum(j,y(i,j)) =l= x(i);
    ) N& T8 n. l$ m4 }( edemand(i)..       sum(i,y(i,j)) =g= d(j);0 T; [, _. b  X, |- u
    Model investment /all/;
      X) P. w: @) A0 f' nSolve investment using lp minimizing z;
    - K2 q! K: i: _  kDisplay y.l, y.m;' ^9 e: j- q% O; }7 O

    . \  k0 m/ K9 p! w运行出错的,但是不知道怎么解决,请亲给处理一下哦!!!
    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-21 01:41 , Processed in 0.402792 second(s), 51 queries .

    回顶部