帮忙修改lingo程序使能正常运行MODEL:SETS:dvd/1..10/;n;supply/1..10/;link(dvd,supply):x,c;ENDSETSDATA: c= 2 4 0 0 0 0 3 1 0 0 2 0 4 0 3 1 0 0 5 0 0 2 0 3 0 0 0 0 4 1 4 0 0 0 0 0 1 3 2 0 0 1 0 4

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/28 17:17:36
帮忙修改lingo程序使能正常运行MODEL:SETS:dvd/1..10/;n;supply/1..10/;link(dvd,supply):x,c;ENDSETSDATA:c=2400003100

帮忙修改lingo程序使能正常运行MODEL:SETS:dvd/1..10/;n;supply/1..10/;link(dvd,supply):x,c;ENDSETSDATA: c= 2 4 0 0 0 0 3 1 0 0 2 0 4 0 3 1 0 0 5 0 0 2 0 3 0 0 0 0 4 1 4 0 0 0 0 0 1 3 2 0 0 1 0 4
帮忙修改lingo程序使能正常运行
MODEL:
SETS:
dvd/1..10/;
n;
supply/1..10/;
link(dvd,supply):x,c;
ENDSETS
DATA:
c=
2 4 0 0 0 0 3 1 0 0
2 0 4 0 3 1 0 0 5 0
0 2 0 3 0 0 0 0 4 1
4 0 0 0 0 0 1 3 2 0
0 1 0 4 2 3 0 0 0 0
0 2 1 0 0 0 4 0 0 3
1 0 4 0 0 0 3 2 0 0
2 0 0 1 0 4 0 0 3 0
0 4 0 0 1 0 0 3 0 2
3 0 2 0 0 0 0 0 1 4;
n= 1 4 1 2 2 1 3 3 3 2;
ENDDATA
x(i,j)=@IF(c(i,j)#EQ#0,0,x(i,j));
MIN=@SUM(link(i,j):c(i,j)*x(i,j));
@FOR(link(i,j):@BIN(x(i,j)));
@FOR(dvd(i):@SUM(supply(j):x(i,j))=3;);
@FOR(supply(i):@SUM(dvd(j):c(i,j)*x(i,j))

帮忙修改lingo程序使能正常运行MODEL:SETS:dvd/1..10/;n;supply/1..10/;link(dvd,supply):x,c;ENDSETSDATA: c= 2 4 0 0 0 0 3 1 0 0 2 0 4 0 3 1 0 0 5 0 0 2 0 3 0 0 0 0 4 1 4 0 0 0 0 0 1 3 2 0 0 1 0 4
MODEL:
SETS:
dvd/1..10/:n;
supply/1..10/;
link(dvd,supply):x,c;
ENDSETS
DATA:
c=
2 4 0 0 0 0 3 1 0 0
2 0 4 0 3 1 0 0 5 0
0 2 0 3 0 0 0 0 4 1
4 0 0 0 0 0 1 3 2 0
0 1 0 4 2 3 0 0 0 0
0 2 1 0 0 0 4 0 0 3
1 0 4 0 0 0 3 2 0 0
2 0 0 1 0 4 0 0 3 0
0 4 0 0 1 0 0 3 0 2
3 0 2 0 0 0 0 0 1 4;
n= 1 4 1 2 2 1 3 3 3 2;
ENDDATA
@FOR(link(i,j):x(i,j)=@IF(c(i,j)#EQ#0,0,x(i,j)));
MIN=@SUM(link(i,j):c(i,j)*x(i,j));
@FOR(link(i,j):@BIN(x(i,j)));
@FOR(dvd(i):@SUM(supply(j):x(i,j))=3;);
@FOR(supply(i):@SUM(dvd(j):c(i,j)*x(i,j))