lingo线性规划编程问题.求每一行的解释,尤其那个for循环.model:6 发点 8 收点运输问题; sets:warehouses/wh1..wh6/:capacity; vendors/v1..v8/:demand; links(warehouses,vendors):cost,volume; endsets 目标函数; min=@sum(links:cos
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/25 23:31:09
lingo线性规划编程问题.求每一行的解释,尤其那个for循环.model:6 发点 8 收点运输问题; sets:warehouses/wh1..wh6/:capacity; vendors/v1..v8/:demand; links(warehouses,vendors):cost,volume; endsets 目标函数; min=@sum(links:cos
lingo线性规划编程问题.求每一行的解释,尤其那个for循环.
model:
6 发点 8 收点运输问题;
sets:
warehouses/wh1..wh6/:capacity;
vendors/v1..v8/: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))
lingo线性规划编程问题.求每一行的解释,尤其那个for循环.model:6 发点 8 收点运输问题; sets:warehouses/wh1..wh6/:capacity; vendors/v1..v8/:demand; links(warehouses,vendors):cost,volume; endsets 目标函数; min=@sum(links:cos
集定义段和数据段就不说了 不会的话自己去看教程 这个说起来就麻烦了
!目标函数; 目标函数是求所有cost和volume对应相乘的和的最小值;
min=@sum(links: cost*volume);
!需求约束; 对于所有J有条件 volume(I,J)对I求和等于demand(J);
@for(vendors(J):
@sum(warehouses(I): volume(I,J))=demand(J));
!产量约束; 对所有的I有条件 volume(I,J)对J求和小于等于capacity(I);
@for(warehouses(I):
@sum(vendors(J): volume(I,J))