QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2965|回复: 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
    非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!  `; ~7 y3 X2 |, y7 U
    我把程序贴在这,
    4 ?; }- \6 d) c6 {/ `$Title A Investment Problem
    + Q) G1 t2 N/ \+ j. X$ontext
    9 M5 ]- o3 d+ q+ c9 R$ `this problem finds a optimized investment that meets9 T5 M# w( U$ E# x' s' U
    requirements in the city
    + a/ K3 E9 D4 x3 Z$offtext
      Z; r* r0 i* D; U% e0 GSets
    % K" c  V6 g, R! }    i  power plants  /plant-1, plant-2, plant-3, plant-4/
    0 h( E6 B( I5 B3 {: W+ L    j  operating mode  /mode-1, mode-2, mode-3/;
    - g$ {) O/ S% A& K( l% r7 g: ^Parameters' y" K! c5 X4 I4 K. q
        c(i)  the unit installed capacity of power plant i in cases( X" @$ |2 A8 V( ~7 ^
           /plant-1  10
    3 ?( Q6 I1 k& n5 [$ `9 I. ~        plant-2  7+ B' b. H; A; |: G( H6 N
            plant-3  167 t- H2 T, Q. \- v. z; O' S. I: s
            plant-4  6/
    : `6 B  s0 S* b0 b# t9 U    d(j)  the electricity demand for power plant i in cases
    & ?. Y( d2 g! C" O- b; S. R% r8 ^9 T  p       /mode-1  3& x% w9 ^- O/ @  p: O
            mode-2  38 p) X3 ?) q0 E3 [$ i
            mode-3  2/;; E3 U- B8 ~7 }: z
    Table f(i,j) the unit operating cost of each power plant6 B1 {. B" f) e4 f! {
                     mode-1   mode-2   mode-3$ x5 S- D% `- y5 H1 E
            plant-1   0.4      0.24     0.04' |+ t" q$ V( {6 W% o. [! H6 ]
            plant-2   0.45     0.27     0.045# Q) ]8 s3 o/ D  E+ B
            plant-3   0.32     0.192    0.032
    7 F# E/ g& I- b. D. C        plant-4   0.55     0.33     0.055;, n+ Z. D2 s* U% t: m& W* {$ K
    Scalar m the minimum total installed capacity of the four power plant /12/7 H' P- m3 z! f+ C- }! O# J; X) j1 b
           b the minimum tatal investment budget of the four power plant /120/;6 W- ~/ s# {5 a/ b$ i! o
    Variables* a' P! A$ w3 A/ ^8 b
           x(i) the installed capacity of the i power plant in cases
    7 a; @) c3 o# J% r. c9 g       y(i,j) the operating lever of the i power plant under the j operating mode
    ' ^2 k5 h8 s/ s; F9 z) K9 U       z the total cost of the four power plant;& e" v: v/ R6 r) I1 R
    Positive Variable x;
    5 p* X5 }. G3 S. t( F9 v$ M4 _Equations
    3 R$ M7 B' b/ n" k& L/ d       cost           define objective function9 f- W% ?+ N: R" p+ _
           capacity1(i)   observe total capacity linmit at plant i6 B( v, s9 d& E2 _5 {
           budget(i)      observe total investment budget limit at plant i" {( x7 ?9 J) X9 H# e+ H, p
           capacity2(i)   observe installed capacity for each power plant0 `& m5 Q( \3 J( J
           demand(i)      satisfy the electricity demand under each operating mode;
    ! {# [% A( w8 W; `) b2 y: h- ~cost..            z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));
    9 t+ w3 |: I5 L# e3 ocapacity1(i)..    sum(i,x(i)) =g= m;
    . ]; ~' y) T# n" |, c, j7 D# Wbudget(i)..       sum(i,c(i)*x(i)) =l= b;
    , J! c) c3 r( B  B# W* X6 dcapacity2(j)..    sum(j,y(i,j)) =l= x(i);) ?* J* k: [& S4 Z. D& m3 s) V8 A
    demand(i)..       sum(i,y(i,j)) =g= d(j);
    : Q9 k5 f$ s  O9 K8 ]Model investment /all/;
    , T4 S% v2 @3 @1 u  o! X, jSolve investment using lp minimizing z;
    / g9 S# b6 g. S. F( k, lDisplay y.l, y.m;
    ) e8 L" r( j) x. f, h
    ! M& }: }2 S$ t+ a8 H# T5 @运行出错的,但是不知道怎么解决,请亲给处理一下哦!!!
    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-7-23 02:55 , Processed in 0.395956 second(s), 51 queries .

    回顶部