建立如下问题的数学模型,并给出LINGO的求解程序(要求使用集合段的形式编程) 和解的结果;
展开全部
运输问题。
model:
sets:
factory/1,2,3/:product;
warehouse/1,2,3,4,5/:demand;
transport(factory,warehouse):cost,amount;
endsets
data:
product=600,400,500;
demand=200,250,300,550,200;
cost=4,2,6,2,4
8,4,2,6,2
4,2,2,6,8;
enddata
@for(factory(i):@sum(warehouse(j):amount(i,j))<product(i));
@for(warehouse(j):@sum(factory(i):amount(i,j))=demand(j));
@for(transport(i,j):@gin(amount(i,j)));
min=@sum(transport(i,j):amount(i,j)*cost(i,j));
end
model:
sets:
factory/1,2,3/:product;
warehouse/1,2,3,4,5/:demand;
transport(factory,warehouse):cost,amount;
endsets
data:
product=600,400,500;
demand=200,250,300,550,200;
cost=4,2,6,2,4
8,4,2,6,2
4,2,2,6,8;
enddata
@for(factory(i):@sum(warehouse(j):amount(i,j))<product(i));
@for(warehouse(j):@sum(factory(i):amount(i,j))=demand(j));
@for(transport(i,j):@gin(amount(i,j)));
min=@sum(transport(i,j):amount(i,j)*cost(i,j));
end
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询