Lingo解决运输问题时,产地2必须向需求点2供应商品,即volume(2,2)>0,这个在程序里用怎么写啊?求教高手
怎么定义这个约束条件啊?model:!10发点5收点运输问题;sets:warehouses/wh1..wh10/:capacity;vendors/v1..v5/:de...
怎么定义这个约束条件啊?
model:
!10发点5收点运输问题;
sets:
warehouses/wh1..wh10/: capacity;
vendors/v1..v5/: 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))<=capacity(I));
! volume(2,1)+volume(8,1)+volume(9,1)>0;
!volume(4,2)>0;
!volume(5,3)>0;
!volume(5,5)>0;
!volume(1,4)+volume(2,4)+volume(10,1)>0);
高手帮忙啊,就是以上注释的这五个约束条件 怎么写才正确啊? 展开
model:
!10发点5收点运输问题;
sets:
warehouses/wh1..wh10/: capacity;
vendors/v1..v5/: 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))<=capacity(I));
! volume(2,1)+volume(8,1)+volume(9,1)>0;
!volume(4,2)>0;
!volume(5,3)>0;
!volume(5,5)>0;
!volume(1,4)+volume(2,4)+volume(10,1)>0);
高手帮忙啊,就是以上注释的这五个约束条件 怎么写才正确啊? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询