早教吧 育儿知识 作业答案 考试题库 百科 知识分享

lingo程序,这里哪里错了,提示是错误11.data那里有错吗.model:3发点4收点运输问题;集合部分;sets:warehouses/wh1..wh3/:capacity;vendors/v1..v4/:demand;links(warehouses,vendors):cost,volume;endsets目标函数;min=@sum(links:cost

题目详情
lingo程序,这里哪里错了,提示是错误11.data那里有错吗.
model:
3发点4收点运输问题;
集合部分;
sets:
warehouses/wh1..wh3/:capacity;
vendors/v1..v4/:demand;
links(warehouses,vendors):cost,volume;
endsets
目标函数;
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))
▼优质解答
答案和解析
最后一个约束后面没写括号
model:
!3发点4收点运输问题;
!集合部分;
sets:
warehouses/wh1..wh3/: capacity;
vendors/v1..v4/: demand;
links(warehouses,vendors): cost, volume;
endsets
!目标函数;
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))