- 在线时间
- 5 小时
- 最后登录
- 2014-7-26
- 注册时间
- 2014-7-22
- 听众数
- 11
- 收听数
- 0
- 能力
- 0 分
- 体力
- 92 点
- 威望
- 0 点
- 阅读权限
- 20
- 积分
- 37
- 相册
- 0
- 日志
- 0
- 记录
- 0
- 帖子
- 12
- 主题
- 2
- 精华
- 0
- 分享
- 0
- 好友
- 2
升级 33.68% TA的每日心情 | 奋斗 2014-7-26 22:12 |
---|
签到天数: 3 天 [LV.2]偶尔看看I - 自我介绍
- 从事环境科学研究
|
楼主,你给的样例能运行,但我自己写的不行,为什么? |
- hubq_pro
: LINGO/WIN32 12.0.2.21 (20 Oct 10)
LINDO API 6.1.1.515 (Oct 20 2010 20:14:13)
Copyright (C) 2005-2009 LINDO Systems Inc. Licensed material,
all rights reserved. Copying except as authorized in license
agreement is prohibited.
License location: F:\\TDDownload\\LINDO Document\\lingo12破解\\lndlng12.lic
License location: F:\\TDDownload\\LINDO Document\\lingo12破解\\lndlng12.lic
Eval Use Only
License expires: 23 Nov 2029
Licensed for commercial use.
Branch-and-bound solver enabled.
Nonlinear solver enabled.
Barrier solver enabled.
Global solver enabled.
Integer solver enabled.
Stochastic solver enabled.
Parameter Old Value New Value
ECHOIN 0 1
: take EnergyPlan.lng
: model:
? Title EnergyPlanModel By HuBingQing in 20140720;
? sets:
? District/@FILE(\'cDistrict.LDT\')/: GDP0, GRateMin, GRateMax, EPG0, EPGRateMin, EP
? endsets
? data:
? T = 8;
? TGDP = 98500;
? TEPG = 0.75;
? ! GDP0;
? GDP0 = @pointer(1);
? ! Min Increase Rate of GDP;
? GRateMin = @pointer(2);
? ! Max Increase Rate of GDP;
? GRateMax = @pointer(3);
? ! EPG0=Energy Consumption Percent GDP in Base
? EPG0 = @pointer(4);
? ! Min Decrease Rate of EPG;
? EPGRateMin = @pointer(5);
? ! Max Decrease Rate of EPG;
? EPGRateMax = @pointer(6);
? ! Forcast Years
? T = @pointer(7);
? ! Total GDP Lower Demand
? TGDP = @pointer(8);
? ! Total GDP Lower Demand
? TEPG = @pointer(9);
? !Output File
? @Text(\'InputData.txt\')=GDP0,GRateMin,GRateMax,EPG0,EPGRateMin,EPGRateMax,T,TGDP,
? enddata
? !Real EPGt;
? !@for (District(i) : EPGt(i) = EPG0(i) * ( 1-EPGRate(i) ) );
? !Real GDPt;
? !@for (District(i) : GDPt(i) = GDP0(i) * (1 + GRate(i))^T);
? !Real Energy Consumption Now
? !@for (District(i) : E0(i) = GDP0(i)*EPG0(i));
? !Real Energy Consumption
? !@for (District(i) : Et(i) = GDPt(i)*EPGt(i));
? !Minimize Total Energy Consumption;
? [rObj] min = @sum(District(i) : (GDP0(i) * (1 + GRate(i))^T)*(EPG0(i) * (1-EPGRa
? !TE = @sum (District(i) : Et(i));
? ![rObj] min = TE;
? !GDP Increase limit for Minimun or Maximun Rate of GDP;
? !@for (District(i) : GRate(i) >= GRateMin(i) , GRate(i) <= GRateMax(i));
? @for(District(i) : @bnd(GRateMin(i),GRate(i),GRateMax(i)));
? !EPG Decrease limit for Minimun or Maximun Rate of EPG;
? !@for (District(i) : EPGRate(i) >= EPGRateMin(i) , EPGRate(i) <= EPGRateMax(i));
? @for(District(i) : @bnd(EPGRateMin(i),EPGRate(i),EPGRateMax(i)));
? !Real GDPt;
? @for(District(i) : GDPt(i) = GDP0(i) * (1 + GRate(i))^T);
? !Real EPGt;
? @for(District(i) : EPGt(i) = EPG0(i) * (1-EPGRate(i)));
? !Real Energy Consumption
? @for(District(i) : Et(i) = GDPt(i)*EPGt(i));
? !Region Total GDP Lower Demand;
? CurTGDP = @sum (District(i) : GDPt(i));
? CurTGDP >= TGDP;
? !Region Total EPG Higher Demand
? TE = @sum (District(i) : Et(i));
? CurTEPG = TE/CurTGDP ;
? !CurTEPG >= TEPG;
? data:
? @pointer(10) = GDPt;
? @pointer(11) = EPGt;
? @pointer(12) = Et;
? @pointer(13) = GRate;
? @pointer(14) = EPGRate;
? @pointer(15) = rObj;
? @pointer(16) = @status();
? @pointer(17) = CurTGDP;
? @pointer(18) = CurTEPG;
? enddata
? end
: go
Compiling model ...
Structural analysis, pass 1 ...
Reading API parameters from: LINDO.PAR
Scalarizing model ...
Generating nonzero matrix ...
Solving ...
[Error Code: 191]
The LINDO API returned the following error code: 2026
LINDO API routine: LSsolve
License is too small for the given problem.
[Error Code: 193]
A solution is not available for this model.
Running output operations ...
: quit
- hubq_pro
:请高手分析一下原因!谢谢!
- hubq_pro
:楼主能否提供一下源码,供学习?
- 建不了的模。
:你可以在求助版块上发,版主看到了会给你解答的!
-
|