小弟初次用Lingo,出现如下情况,求高手帮助!
我用的是Lingo11破解版的,各种变量没有限制的。
model:
sets:
warehouses/wh1..wh53/: ni;
vendors/1..50/;
l/1..53/:ll;
rows/1..53/;
cols/1..50/;
table(rows,cols): volume;
table1(rows,cols): cost;
xxa/1..50/:xx;
endsets
!目标函数;
min=@sum(vendors(J): xx(J)*(3005-@sum(warehouses(I): volume(I,J)*(cost(I,J)+5))));
!最小值约束;
@for(vendors(J):xx(J)>=0);
!数量约束;
@for(warehouses(I):@sum(vendors(J): volume(I,J)*xx(J))=ni(I));
!时间约束;
@sum(vendors(J): xx(J)*@if(volume(5,J) #gt# 0,1,0))<=400;
@sum(vendors(J): xx(J)*@if(volume(7,J) #gt# 0,1,0))<=400;
@sum(vendors(J): xx(J)*@if(volume(9,J) #gt# 0,1,0))<=400;
data:
ll=;
ni=;
cost=;
enddata
end
求高手!LINGO error code 191——2026
答案:2 悬赏:70 手机版
解决时间 2021-03-08 14:29
- 提问者网友:杀生予夺
- 2021-03-07 20:22
最佳答案
- 五星知识达人网友:何以畏孤独
- 2021-03-07 21:54
给具体的程序看看
全部回答
- 1楼网友:白昼之月
- 2021-03-07 23:09
sets:
plan/1..5/:x,t1,t2,invest,fee,sfee,eff1,eff2,waste,wl;
endsets
data:
invest=0 20 0 10 50;
fee=5 7 8 8 12;
sfee=3 5 8 10 14;
eff1=1000 1500 1200 1600 1600;
eff2=800 1400 1000 1300 1200;
waste=2 2 3 3 3;
wl=30 30 50 50 50;
enddata
@for(plan:@bin(x));
min=@sum(plan(i):x(i)*(invest(i)+t1(i)*fee(i)+sfee(i)+t1(i)*eff1(i)*waste(i)*wl(i)+t2(i)*eff2(i)*waste(i)*wl(i)+0.05*invest(i)));
x(3)+x(4)<=1;
0.98*x(1)*t1(1)*eff1(1)+0.98*x(2)*t1(2)*eff1(2)=3000;
0.98*x(1)*t2(1)*eff2(1)+0.98*x(2)*t2(2)*eff2(2)=2000;
0.97*x(3)*t1(3)*eff1(3)+0.97*x(4)*t1(4)*eff1(4)+0.97*x(5)*t1(5)*eff1(5)=10000;
0.97*x(3)*t2(3)*eff2(3)+0.97*x(4)*t2(4)*eff2(4)+0.97*x(5)*t2(5)*eff2(5)=8000;
@for(plan(i):t1(i)+t2(i)<=8000);
问题不少 细微错误很多
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯