早教吧作业答案频道 -->英语-->
lingo目标规划:想要加多个条件使得I不等于J时,volume(I,J)=-volume(J,I)成立model:sets:from/f1..f3/:capacity;to/t1..t3/:demand;links(from,to):cost,volume;endsetsmin=@sum(links:cost*@abs(volume));@for(to(J):@sum(from(I):volume(I,J))
题目详情
lingo目标规划:想要加多个条件使得I不等于J时,volume(I,J)=-volume(J,I)成立
model:
sets:
from/f1..f3/:capacity;
to/t1..t3/:demand;
links(from,to):cost,volume;
endsets
min=@sum(links:cost*@abs(volume));
@for(to(J):
@sum(from(I):volume(I,J))>=demand(J));
@for(from(I):
@sum(to(J):volume(I,J))=0);
data:
capacity=1200,500,800;
demand=600,600,400;
cost=0,4,5
4,0,3
5,3,0;
enddata
end
model:
sets:
from/f1..f3/:capacity;
to/t1..t3/:demand;
links(from,to):cost,volume;
endsets
min=@sum(links:cost*@abs(volume));
@for(to(J):
@sum(from(I):volume(I,J))>=demand(J));
@for(from(I):
@sum(to(J):volume(I,J))=0);
data:
capacity=1200,500,800;
demand=600,600,400;
cost=0,4,5
4,0,3
5,3,0;
enddata
end
▼优质解答
答案和解析
@for(links(i,j)|i#ne#j: volume(i,j)=-volume(j,i));
看了 lingo目标规划:想要加多...的网友还看了以下: