QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 3061|回复: 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
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!  f7 R5 i. E+ |# p, b
    我把程序贴在这,& \! k) k$ W% _, f
    $Title A Investment Problem
    % k2 g  @! B  k0 x- U+ r; x$ontext
    1 @1 h) R) W1 Wthis problem finds a optimized investment that meets* Q" [! J4 a- w, h
    requirements in the city) J3 s7 o" G  n4 j
    $offtext
    + b+ ?: k& q7 vSets/ K. _4 y: O. a4 X- i; P1 d2 i
        i  power plants  /plant-1, plant-2, plant-3, plant-4/& V# T4 ^: J* E; A/ u* \
        j  operating mode  /mode-1, mode-2, mode-3/;/ {. W- K1 k7 t
    Parameters
    & C9 z7 I& R* w, j" P8 n) W5 M    c(i)  the unit installed capacity of power plant i in cases
    ' Y0 y; E$ K3 K) S       /plant-1  107 D! t& {( A$ i& f) j5 l0 H
            plant-2  7* Y+ d) H) e5 h( L4 x
            plant-3  16
    ' R1 a4 c3 t; |2 {+ K" t) E        plant-4  6/6 n$ `6 H" \, v6 u$ O" A3 Z* T
        d(j)  the electricity demand for power plant i in cases
    . y' A3 ^- r" d5 y       /mode-1  38 K6 H# Q0 t3 s/ o& l% B
            mode-2  3
    3 z8 _/ k8 A" V7 G        mode-3  2/;
    # R- ]! h7 R! Y8 b; GTable f(i,j) the unit operating cost of each power plant9 P$ C0 j3 @9 P: H
                     mode-1   mode-2   mode-3
    * c% \! h) G% Q: A7 I1 S5 @5 w        plant-1   0.4      0.24     0.04
    / I* _& J$ s$ Q& v, o& [        plant-2   0.45     0.27     0.045; \; q3 i; \' B& n2 e+ C  v
            plant-3   0.32     0.192    0.032
    3 _. L2 v' s% b" F' j! q        plant-4   0.55     0.33     0.055;, ]6 z8 T6 y" e, m9 R: w, G4 s* N& @
    Scalar m the minimum total installed capacity of the four power plant /12/& O$ `" w1 Z% x6 I, i  U
           b the minimum tatal investment budget of the four power plant /120/;
    4 G7 x, d/ n- Z- |# E7 \( DVariables
    " o+ o4 G4 H: e8 H( c; I       x(i) the installed capacity of the i power plant in cases) x( Y- Z( C. T
           y(i,j) the operating lever of the i power plant under the j operating mode
    8 C8 f* m' D7 j% n       z the total cost of the four power plant;
    5 f% u) K7 y7 t: mPositive Variable x;
    $ U7 g8 K" }$ [9 X- n; c* B- qEquations
    $ E9 i+ l  n) W4 G) J' V       cost           define objective function
    / c  {- w5 I5 l/ `+ t       capacity1(i)   observe total capacity linmit at plant i
    + a9 m7 W& H- j0 L+ K- s       budget(i)      observe total investment budget limit at plant i" W# r4 q7 p5 R. Q4 }
           capacity2(i)   observe installed capacity for each power plant
    # W; w+ v1 Z! t# ?8 M       demand(i)      satisfy the electricity demand under each operating mode;
    . T9 U8 a+ M( ~0 Y! Q( M" K& K5 Hcost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));, C6 t. p$ x& C* f+ ~2 [" c
    capacity1(i)..    sum(i,x(i)) =g= m;
    # w: g, p" v1 o" w& n) T& Dbudget(i)..       sum(i,c(i)*x(i)) =l= b;
    / Q2 s& d. E% \; T; n* }capacity2(j)..    sum(j,y(i,j)) =l= x(i);
      m+ v) R$ b& @4 H+ S% ndemand(i)..       sum(i,y(i,j)) =g= d(j);
    - N2 l- x! ~$ tModel investment /all/;
    ' B+ y. {5 R+ [; w/ F# O- GSolve investment using lp minimizing z;: x2 t) s6 P% Z# x7 [- ~2 x
    Display y.l, y.m;- k! P* Q- z+ r2 C

    + ?9 `$ x  ~* n0 X* f运行出错的,但是不知道怎么解决,请亲给处理一下哦!!!
    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 00:39 , Processed in 0.774341 second(s), 56 queries .

    回顶部