请高手帮忙看下这个lingo程序哪里出错了?modelsets:myset/1..8/:T,S;myset1/1..3/:L;link(myset1,myset):x;endsetsdata:T=25 36 32 15 31 28 22 12S=5 7 5 4 6 5 5 3enddatamin=0.66*Q^0.51*20+@sum(myset(j):myset1(i):(@sum(x(i,j))));@sum(myset1(i)
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/15 01:30:34
请高手帮忙看下这个lingo程序哪里出错了?modelsets:myset/1..8/:T,S;myset1/1..3/:L;link(myset1,myset):x;endsetsdata:T=25 36 32 15 31 28 22 12S=5 7 5 4 6 5 5 3enddatamin=0.66*Q^0.51*20+@sum(myset(j):myset1(i):(@sum(x(i,j))));@sum(myset1(i)
请高手帮忙看下这个lingo程序哪里出错了?
model
sets:
myset/1..8/:T,S;
myset1/1..3/:L;
link(myset1,myset):x;
endsets
data:
T=25 36 32 15 31 28 22 12
S=5 7 5 4 6 5 5 3
enddata
min=0.66*Q^0.51*20+@sum(myset(j):myset1(i):(@sum(x(i,j))));
@sum(myset1(i):L(i))=20;
@sum(myset(j):x(1,j)*S(j))>150-34.19483;
@sum(myset(j):0.9*x(1,j)*S(j))+@sum(myset(j):x(2,j)*S(j))>160-26.67916;
@sum(myset(j):0.81*x(1,j)*S(j))+@sum(myset(j):0.9*x(2,j)*S(j))
请高手帮忙看下这个lingo程序哪里出错了?modelsets:myset/1..8/:T,S;myset1/1..3/:L;link(myset1,myset):x;endsetsdata:T=25 36 32 15 31 28 22 12S=5 7 5 4 6 5 5 3enddatamin=0.66*Q^0.51*20+@sum(myset(j):myset1(i):(@sum(x(i,j))));@sum(myset1(i)
model:!少了分号;
sets:
myset/1..8/: T,S;
myset1/1..3/: L;
link(myset1,myset): x;
endsets
data:
T=25 36 32 15 31 28 22 12;!这里缺少一个分号;
S=5 7 5 4 6 5 5 3; !这里缺少一个分号;
enddata
min=0.66*Q^0.51*20+@sum(myset(j):myset1(i):(@sum(x(i,j))));!这里语法错,但是不是很清楚楼主的意思所以无法修改;
!因为这里无法修改,所以以下的程序也无法运行查错,建议楼主在问题补充里将以上错误改正再试试;
@sum(myset1(i):L(i))=20;
@sum(myset(j):x(1,j)*S(j))>150-34.19483;
@sum(myset(j):0.9*x(1,j)*S(j))+@sum(myset(j):x(2,j)*S(j))>160-26.67916;
@sum(myset(j):0.81*x(1,j)*S(j))+@sum(myset(j):0.9*x(2,j)*S(j))