sets:
residents/1..5/:top,bottom;
ku/1..4/:kucun;
link(ku,residents):price,x;
endsets
data:
b0tt0m=30,70,10,10,10;top=80,140,30,50,30;
kucun=50,60,50,30;price=160,130,220,170,150,140,130,190,150,170,190,200,230,99999999,120,120,180,200,150,150;
enddata
min=@sum(link:price*x);
@f0r(ku(i):@sum(rsidents(j):x(i,j))=kucun(i));
@for(residents(j):@sum(ku(i):x(i,j))>b0ttom(j));
@for(residents(j):@sum(ku(i):x(i,j))<top(j));
end
lingo程序,这里哪里错了,提示是错误11.sets:这里的冒号有错
model sets:needs\/1..4\/:length,num;cuts\/1..3\/:x;patterns(needs,cuts):r;endsets data:length=4 5 6 8;num=50 10 20 15;capacity=19;enddata min=@sum(cuts(i):x(i));for(needs(i):@sum(cuts(j):x(j)*r(i,j)>num(i));for(cuts(j):@sum(needs(i):length(i)*r(i...
求助lingo大佬,循环语句这里一直出现错误代码11
for x(8 9,3)=x(12 11,3)=x(12 16,3)=x(12 18,3)=x(15 16,3)=x(18 16,3)=0 for i=1 2,1 3,1 4,1 5,1 6,1 8,1 13,1 17;x(i,j,k)=0 这几句语法完全不对 但我不清楚你要做什么 还是给原题我看看
LINGO中错误11
每句结束加分号
lingo老是出现错误代码11,怎么解决
sets:demand\/1..6\/:a,b,d;supply\/1..2\/:x,y,e;link(demand,supply):c;endsets data:a=1.25,8.75,0.5,5.75,3,7.25;b=1.25,0.75,4.75,5,6.5,7.25;d=3,5,4,7,6,11;e=20,20;enddata init:x,y=5,1,2,7;endinit [OBJ] min=@sum(link(i,j):c(i,j)*((...
lingo程序错误代码11
你那样写不报错你觉得可能吗 MODEL:sets:num_i\/1..7\/:t,w,n;num_j\/1..2\/:b;link(num_i,num_j):x;endsets data:t=48.7 52.0 61.3 72.0 48.7 52.0 64.0;w=2000 3000 1000 500 4000 2000 1000;n=8 7 9 6 6 4 8;enddata [OBJ]max=@sum(link(i,j):x(i,j)*t...
lingo错误代码11求看哪错了
略作更改就能运行。不过只能找到局部最优解,全局最优解好像很费时间,你自己可以再试试。MODEL:Title Location Problem;sets:demand\/1..6\/:a,b,d;supply\/1..2\/:x,y,e;link(demand,supply):c;endsets data:!locations for the demand(需求点的位置);a=1.25,8.75,0.5,5.75,3,7.25;...
lingo程序总是报错11怎么办
sets:hang\/1..3\/:x;lie\/1..3\/;links(hang,lie):c;endsets data:c=1 -2 3 -4 1 2 -2 0 1;enddata max=3*x(1)-x(2)-x(3);for(hang(i):x(i)*c(1,i)<=11);!@for(hang(i):x(i)*c(2,i)>=3);!@for(hang(i):x(i)*c(3,i)<=1);这样可以运行了,不过你...
请问lingo中的代码11是什么意思?
错误代码11揭示的是在LINGO编程中,模型中的指令存在语法不合规的情况。出现11号错误的原因,通常在于数据输入部分,比如在指定数据时,程序后跟了endsets而应为enddata。在你的代码中,发现两个问题。首先,用于表示数据的指令使用了endsets,实际上应为enddata。其次,在表示变量时,使用的ai,dj与实际...
Lingo程序错误代码11 求解
link(places,places): distance,x;!The distance matrix x; !x(i,j)=1 if we ues link i,j;endsets data:!Distance matrix,it need not be symmetric;distance=0 10.7 10 9 18 28 30.5 43.3 10.7 0 3 8 20 17 20 36 10 3 0 6.6 16 17 28 35 9 8 6.6 0 11.7 20 ...
LINGO错误代码11,求看程序错误
首先在lingo的数据是不能运算的,要直接输入122000000000 这个的data里面的one(1)应该要改成one1 括号要省略(后面的ni-1也一样)你的@max那一行应该有错,你检查一下