【问题标题】:GAMS - Economic Dispatch - QCP and NLPGAMS - 经济调度 - QCP 和 NLP
【发布时间】:2017-10-11 10:49:33
【问题描述】:

我有这个代码:

如果我使用 NLP,我会得到结果,但使用 QCP,因为它问我,我无法得到结果

谁能帮我找出原因?

代码:

sets  g               generators             / P1*P5 /
  properties      generator properties   / a,b,c,max,min /
  cc(properties)  cost categories        / a,b,c /

table data(g,properties) generator cost characteristics and limits

             a        b         c       max      min
P1          0.19     58.3      1800       155       35
P2          0.13     39.3      3250       195       60
P3          0.08     11.5      4600       165       95
P4          0.07     42.6      5100       305      170
P5          0.14      8.9      3850       280      130

parameter exp(cc) exponent for cost function / a 2, b 1, c 0 /;

scalar  demand    total power demand in MW / 730 / ;

variables
   p(g)     power generation level in MW
   cost     total generation cost - the objective function ;

positive variables p;

p.up(g) = data(g,"max") ;
p.lo(g) = data(g,"min") ;


equations
   Q_Eq1      total cost calculation
   Q_Eq2      constraint - total generation must equal demand ;


 Q_Eq1 .. cost =e= sum((g,cc), data(g,cc)*power(p(g),exp(cc)));
Q_Eq2 .. sum(g,p(g)) =g= demand ;

model problem /all/ ;

使用 QCP 最小化成本解决问题;

【问题讨论】:

    标签: gams-math simpowersystems


    【解决方案1】:

    似乎函数“power”通常被视为非线性函数,而不分析“exp”的值,因此对于 QCP 是不允许的。您可以像这样重新制定 Q_Eq1 以使其工作:

    Q_Eq1 .. cost =e= sum((g,cc), data(g,cc)*(1        $(exp(cc)=0) +
                                              p(g)     $(exp(cc)=1) +
                                              sqr(p(g))$(exp(cc)=2)));
    

    最好, 卢茨

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-09
      • 2012-02-27
      • 1970-01-01
      • 1970-01-01
      • 2010-09-28
      • 2021-08-30
      相关资源
      最近更新 更多