lingo程序显示结果错误sets: warehouses/wh1..wh3/: capacity; vendors/v1..v4/: demand; links(warehouses,vendors): cost, volume;endsetsdata: capacity=50 65 70; demand=35 37 22 32; cost=6 2 6 7 4 9 5 3 5 2 1 9 enddata min=@s
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 06:33:01
lingo程序显示结果错误sets: warehouses/wh1..wh3/: capacity; vendors/v1..v4/: demand; links(warehouses,vendors): cost, volume;endsetsdata: capacity=50 65 70; demand=35 37 22 32; cost=6 2 6 7 4 9 5 3 5 2 1 9 enddata min=@s
lingo程序显示结果错误
sets:
warehouses/wh1..wh3/: capacity;
vendors/v1..v4/: demand;
links(warehouses,vendors): cost, volume;
endsets
data:
capacity=50 65 70;
demand=35 37 22 32;
cost=6 2 6 7
4 9 5 3
5 2 1 9
enddata
min=@sum(links: cost*volume);
@for(vendors(J):
@sum(warehouses(I): volume(I,J))=demand(J));
@for(warehouses(I):
@sum(vendors(J): volume(I,J))
lingo程序显示结果错误sets: warehouses/wh1..wh3/: capacity; vendors/v1..v4/: demand; links(warehouses,vendors): cost, volume;endsetsdata: capacity=50 65 70; demand=35 37 22 32; cost=6 2 6 7 4 9 5 3 5 2 1 9 enddata min=@s
漏掉一个分号
sets:
warehouses/wh1..wh3/: capacity;
vendors/v1..v4/: demand;
links(warehouses,vendors): cost, volume;
endsets
data:
capacity=50 65 70;
demand=35 37 22 32;
cost=6 2 6 7
4 9 5 3
5 2 1 9; !这里漏掉一个分号;
enddata
min=@sum(links: cost*volume);
@for(vendors(J):
@sum(warehouses(I): volume(I,J))=demand(J));
@for(warehouses(I):
@sum(vendors(J): volume(I,J))