QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2906|回复: 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
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!  w* J! D6 _7 j
    我把程序贴在这,
      o! F( {: t, {3 x$Title A Investment Problem9 C9 F3 }( l; E
    $ontext
    & c3 G( ]; w) b  @1 X/ [6 Mthis problem finds a optimized investment that meets  B3 g! E; ~: t+ F* v: b  M
    requirements in the city
    : M% R8 [& v9 D; P7 l4 N$offtext: c, Y1 v: S7 g" }
    Sets
      M4 j5 y& @( M) p    i  power plants  /plant-1, plant-2, plant-3, plant-4/& j9 ?& x- N& p) e/ k' M  ]
        j  operating mode  /mode-1, mode-2, mode-3/;
    1 y+ _  z, w  y8 A: r4 e! W9 X4 IParameters* v. `" {0 ]# ~: L, m9 v
        c(i)  the unit installed capacity of power plant i in cases
    2 p8 P3 k! F* t2 P/ q       /plant-1  108 a* q% k5 L9 S/ N
            plant-2  7
    ' s# Q$ K  l. @0 H        plant-3  16' D+ K$ G5 S9 ]9 t  I+ Y- ^/ }
            plant-4  6/
    - d) j1 f, H3 K: x5 ?; `    d(j)  the electricity demand for power plant i in cases
    ; b" K4 s. P& N       /mode-1  3! i$ v. M. B) g6 {: p4 w7 R) o
            mode-2  34 D$ a+ ^6 q' R( X
            mode-3  2/;
    & G! b4 R3 x  @/ ATable f(i,j) the unit operating cost of each power plant
    6 V$ I# e0 ]: O) V4 T+ }                 mode-1   mode-2   mode-3
    : d6 s. c' L/ W        plant-1   0.4      0.24     0.04
    ; N, s# X) L* A- g* `" {+ i        plant-2   0.45     0.27     0.0450 G! O! |& E# Z, ?8 Q' L" M: ?
            plant-3   0.32     0.192    0.0324 S5 m- p5 p) w# b6 {- r
            plant-4   0.55     0.33     0.055;5 Z! }  n4 @, U3 z
    Scalar m the minimum total installed capacity of the four power plant /12/
    / N2 }. c* P5 v       b the minimum tatal investment budget of the four power plant /120/;
    , L; _: C2 M0 h8 `0 [  YVariables6 b: T& x! v8 j9 O! O9 [
           x(i) the installed capacity of the i power plant in cases
    # Z3 z8 _: t  X, B       y(i,j) the operating lever of the i power plant under the j operating mode) m; e3 ^% G- E( v* [: a. F
           z the total cost of the four power plant;) c+ y/ q) ]. n6 p9 v& B1 W+ d
    Positive Variable x;* i0 \6 I" z0 A1 ]  B  n. k
    Equations# P) ]0 f+ L# e9 Y2 a; W: }& N
           cost           define objective function
    9 Y  @  Q7 `/ e9 `; b( z5 a9 v# W       capacity1(i)   observe total capacity linmit at plant i
    ) M1 I( Y1 W7 v4 r! g  g+ G       budget(i)      observe total investment budget limit at plant i) h. `- J- B- G' b
           capacity2(i)   observe installed capacity for each power plant9 F, k- K: w( z' [+ k
           demand(i)      satisfy the electricity demand under each operating mode;
    ( ?) j5 f1 n- f- Z3 ?$ J$ f" {cost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));
      n+ J" L( v& S# Vcapacity1(i)..    sum(i,x(i)) =g= m;! }- x! ^2 v. l0 |# {+ v, F. j! I
    budget(i)..       sum(i,c(i)*x(i)) =l= b;4 ~8 e: F0 g' p
    capacity2(j)..    sum(j,y(i,j)) =l= x(i);
    7 R( M  G" u, b( d7 N- K# Bdemand(i)..       sum(i,y(i,j)) =g= d(j);. \! s% h6 d. X
    Model investment /all/;; O7 ?+ w, l- j& W6 o
    Solve investment using lp minimizing z;6 p! y5 `3 J, M) F4 p7 c
    Display y.l, y.m;/ G1 I( o) Q1 R+ ]% j/ P

    2 ^4 D: x& z) b" z1 x运行出错的,但是不知道怎么解决,请亲给处理一下哦!!!
    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-15 09:13 , Processed in 0.673548 second(s), 51 queries .

    回顶部