早教吧作业答案频道 -->其他-->
这个程序为什么运行不了,请帮帮忙,急用,谢谢model:sets:workers/w1..w5/;jobs/j1..j5/;links(workers,jobs):cost,volume;endsetsmin=@sum(links:cost*volume);@for(workers(I):@sum(jobs(J):volume(I,J))=1;);@for(jobs(J):@sum(w
题目详情
这个程序为什么运行不了,请帮帮忙,急用,谢谢
model:
sets:
workers/w1..w5/;
jobs/j1..j5/;
links(workers,jobs): cost,volume;
endsets
min=@sum(links: cost*volume);
@for(workers(I):@sum(jobs(J): volume(I,J))=1; );
@for(jobs(J):@sum(workers(I): volume(I,J))=1;);
data:
cost= 8 6 10 9 12
9 12 7 11 9
7 4 3 5 8
9 5 8 11 8
4 6 7 5 11;
enddata
end
model:
sets:
workers/w1..w5/;
jobs/j1..j5/;
links(workers,jobs): cost,volume;
endsets
min=@sum(links: cost*volume);
@for(workers(I):@sum(jobs(J): volume(I,J))=1; );
@for(jobs(J):@sum(workers(I): volume(I,J))=1;);
data:
cost= 8 6 10 9 12
9 12 7 11 9
7 4 3 5 8
9 5 8 11 8
4 6 7 5 11;
enddata
end
▼优质解答
答案和解析
你的第15行代码的“;”打错了,你的是中文的分号“;”,在LINGO里面只能识别英文的标点符号,所以应该是";"才行.运行结果如下:Global optimal solution found. Objective value: 30.00...
看了这个程序为什么运行不了,请帮帮...的网友还看了以下:
∫(t*cost)dt怎么求…… 2020-05-13 …
在问CCNA题库问题,问题大概意思是 在STP中让端口变为根端口的最好条件是什么?答案是选 PAT 2020-05-16 …
My new sweater cost me _________the yellow one I 2020-05-16 …
This pair of shoes cost为什么不加s? 2020-05-16 …
how much does this house cost 为什么cost放在最后 2020-05-16 …
He ( )the first three years of his life in hospit 2020-05-16 …
cost有什么近义词没?怎么用的? 2020-06-08 …
lingo目标规划:想要加多个条件使得I不等于J时,volume(I,J)=-volume(J,I 2020-06-12 …
令arccosx=t则x=cost;为什么当x→-1+时,t→π-关键是从哪边趋近怎么看?望不吝赐 2020-06-28 …
在数学书上看到一个等式X=COST请问这个COST是什么数学量? 2020-12-05 …