lingo中错误代码11,Invalid input .A syntax error has occured.3] I/1..4/; ^ 初学者哈modelsets:I/1 2 3 4/;J/1..4/:d;link(I,J):c,x;endsetsdata:d=60 70 120 60;x=70 72 74 760 72 74 760 0 80 820 0 0 76;min = @sum(link(i,j):c(i,j)*x(i,j));@for(J(j):

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/28 12:44:51
lingo中错误代码11,Invalidinput.Asyntaxerrorhasoccured.3]I/1..4/;^初学者哈modelsets:I/1234/;J/1..4/:d;link(I,J

lingo中错误代码11,Invalid input .A syntax error has occured.3] I/1..4/; ^ 初学者哈modelsets:I/1 2 3 4/;J/1..4/:d;link(I,J):c,x;endsetsdata:d=60 70 120 60;x=70 72 74 760 72 74 760 0 80 820 0 0 76;min = @sum(link(i,j):c(i,j)*x(i,j));@for(J(j):
lingo中错误代码11,Invalid input .A syntax error has occured.3] I/1..4/; ^ 初学者哈
model
sets:
I/1 2 3 4/;
J/1..4/:d;
link(I,J):c,x;
endsets
data:
d=60 70 120 60;
x=70 72 74 76
0 72 74 76
0 0 80 82
0 0 0 76;
min = @sum(link(i,j):c(i,j)*x(i,j));
@for(J(j):
\x05 @sum(I(i)|i#LE#j:x(i,j))=d(j));
@for(I(i):
\x05 @sum(J(j)|j#GE#i:x(i,j))=0;
enddata
end
不好意思哈,中间有一个位置打错了,data中定义的矩阵是对c的定义不是x,但是这不是问题的根本哈

lingo中错误代码11,Invalid input .A syntax error has occured.3] I/1..4/; ^ 初学者哈modelsets:I/1 2 3 4/;J/1..4/:d;link(I,J):c,x;endsetsdata:d=60 70 120 60;x=70 72 74 760 72 74 760 0 80 820 0 0 76;min = @sum(link(i,j):c(i,j)*x(i,j));@for(J(j):
model:
sets:
m/1 2 3 4/;
n/1..4/:d;
link(m,n):c,x;
endsets
data:
d=60 70 120 60;
c=70 72 74 76
0 72 74 76
0 0 80 82
0 0 0 76;
enddata
min = @sum(link(i,j):c(i,j)*x(i,j));
@for(n(j):
\x05 @sum(m(i)|i#LE#j:x(i,j))=d(j));
@for(m(i):
\x05 @sum(n(j)|j#GE#i:x(i,j))=0;
end