model:title Location problem; sets:demand/1..6/:a,b,d; suppl
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/10/06 01:41:45
model:title Location problem; sets:demand/1..6/:a,b,d; supply/1,2/:x,y,e; link(demand,supply):c; e
照书上写的,还是出错了.大惑不解.
错误代码:50
for函数使用不当
所用版本为lingo11
model:
title Location problem;
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.75;
enddata
init:
x,y=5,1,2,7;
endinit
[obj]min=@SUM( link(i,j):c(i,j)*((x(j)-a(i))^2+(y(j)-b(i)^2)^(1/2));
@for(demand(i):@sum(supply(j):c(i,j);)=d(i));
@for(supply(i):@sum(demand(j):c(j,i);)
照书上写的,还是出错了.大惑不解.
错误代码:50
for函数使用不当
所用版本为lingo11
model:
title Location problem;
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.75;
enddata
init:
x,y=5,1,2,7;
endinit
[obj]min=@SUM( link(i,j):c(i,j)*((x(j)-a(i))^2+(y(j)-b(i)^2)^(1/2));
@for(demand(i):@sum(supply(j):c(i,j);)=d(i));
@for(supply(i):@sum(demand(j):c(j,i);)
少右括号 model:
title Location problem;
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.75;
enddata
init:
x,y=5,1,2,7;
endinit
[obj]min=@SUM( link(i,j): c(i,j)*((x(j)-a(i))^2+(y(j)-b(i)^2)^(1/2)));
@for(demand(i): @sum(supply(j):c(i,j);)=d(i));
@for(supply(i): @sum(demand(j):c(j,i);)
title Location problem;
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.75;
enddata
init:
x,y=5,1,2,7;
endinit
[obj]min=@SUM( link(i,j): c(i,j)*((x(j)-a(i))^2+(y(j)-b(i)^2)^(1/2)));
@for(demand(i): @sum(supply(j):c(i,j);)=d(i));
@for(supply(i): @sum(demand(j):c(j,i);)
lingo语句求解析sets: demand/1..6/:a,b,d; supply/1..2/:x,y,e; link
lingo 整数规划model:sets:P/1,2/;Q/1..6/:a,b,d;R(P,Q):c,z;endsets
lingo程序:model:sets:product/1..3/:a,b; row/1..5/:c,d,y; num/1
lingo题求助!model:sets:plants / a,b,c,d /:;closed(plants) / b /
model:sets:year/1..5/:demand,new,nature,gouxie;gou/1..8/:pay
lingo model:6发点8收点的运输问题sets:vendors/v1..v8/demand;warehouses
MODEL:SETS:WH/W1..W13/:X,Q,C,D,N,K;LINKS(WH,WH):A,B,G,S,W,H;
lingo哪错了?MODEL:sets:Quarters/1..4/:a,k,d,c,t,p;endsetsdata:k
lingo model:sets:number1..3:x;modes1..4:a,b;mode(number,mode
lingo运行出错model:sets:points/1..24/:d;endsetsmax=@sum(points(i
lingo运行问题model:sets:points/1..24/:d;endsetsmax=@sum(points(i
lingo MODEL:sets:banci/1..12/:a1,a2,a3,a4,a5,b;endsetsmin=z;