QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 3037|回复: 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
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!
    6 C$ S* q9 x' ~( D& i& e: g我把程序贴在这,* U, e: U, J3 A0 j
    $Title A Investment Problem
    - k' ]7 q/ b) f  X0 l) u* c$ontext
    $ _2 a/ f0 y& `) rthis problem finds a optimized investment that meets
    / f8 [. ~1 T- Z( jrequirements in the city
    . {: R; p8 K' e' j2 J4 I3 m$offtext0 _5 W% v; h; N
    Sets3 [) `7 g, ?# l" }% R' l  u
        i  power plants  /plant-1, plant-2, plant-3, plant-4/
    # h$ y5 h, R% T3 U( O    j  operating mode  /mode-1, mode-2, mode-3/;( O& Y; _+ Q" V1 r0 s4 H5 ?7 X
    Parameters
    ) E+ Q8 x2 W0 R" R    c(i)  the unit installed capacity of power plant i in cases
    : o, l; ~4 a2 D       /plant-1  10
    9 M( t% d' u" k8 G        plant-2  70 P% ~6 f0 y& I( ]3 q
            plant-3  16  U4 K" r7 ~( {% t2 b, n  f
            plant-4  6/
    6 l* _) K4 @2 t2 ~# Z    d(j)  the electricity demand for power plant i in cases
    8 S' c* q" i- o) n" ?       /mode-1  3
    * R# C$ I4 P$ W( J* ?        mode-2  3
    : B. O; t% x" J# E$ g# N$ Y        mode-3  2/;2 Y: g: M# r, Y4 K1 f. x3 @# {
    Table f(i,j) the unit operating cost of each power plant
    # K' F: r0 l0 k5 [, x8 v$ g                 mode-1   mode-2   mode-3- D( ~8 T* E- L% @% |4 S
            plant-1   0.4      0.24     0.04# G. d. P# s2 _
            plant-2   0.45     0.27     0.045
    7 o3 b+ ~. t+ }! g( [0 I6 W        plant-3   0.32     0.192    0.032$ _, Z7 ?% Z7 v7 U; ]
            plant-4   0.55     0.33     0.055;
    " ?7 g/ e: I6 C3 Q  f( w, `Scalar m the minimum total installed capacity of the four power plant /12/' Q+ R; V5 p2 L3 k; {$ f7 b: V3 Y
           b the minimum tatal investment budget of the four power plant /120/;
    : E6 i  O  v1 [- P9 w0 ?Variables
    2 u( W: M5 ^! \# h% i       x(i) the installed capacity of the i power plant in cases3 `3 \7 r5 m5 @; [
           y(i,j) the operating lever of the i power plant under the j operating mode
    7 z2 U* l! B& K6 L: Q       z the total cost of the four power plant;
    ; ~& F& W& k0 p' V/ m' \Positive Variable x;
    : }$ }6 }; H4 x5 aEquations4 ~% g# L" r6 b; U3 f
           cost           define objective function
    3 V3 a$ G$ [& x, Q( W) K% q6 F       capacity1(i)   observe total capacity linmit at plant i9 l  z) D8 w) t5 g: i! a! F
           budget(i)      observe total investment budget limit at plant i$ A: T% _3 G& t, _5 o, d! m1 \: W/ T
           capacity2(i)   observe installed capacity for each power plant
    % \! m( B7 m3 H       demand(i)      satisfy the electricity demand under each operating mode;
      b2 }. f1 V3 Mcost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));
    6 g! K0 i! `: ~. fcapacity1(i)..    sum(i,x(i)) =g= m;
    0 `. t" v2 }; Y! A7 r- r% H! Dbudget(i)..       sum(i,c(i)*x(i)) =l= b;5 f6 R% U" X' v0 B5 {% Z5 A
    capacity2(j)..    sum(j,y(i,j)) =l= x(i);
    - K- B$ |) |/ V* `  Pdemand(i)..       sum(i,y(i,j)) =g= d(j);
    1 g1 z2 n) U' }- n$ x: ^Model investment /all/;
    * f# g* ^3 y$ C/ d+ V. RSolve investment using lp minimizing z;. B' S) b/ d& [5 W* z
    Display y.l, y.m;$ l, g: M  a- t2 U8 u, M' T+ c% e' \
    , h* S' \4 K) U# `3 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-10-11 07:21 , Processed in 1.194823 second(s), 51 queries .

    回顶部