帮忙修改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/05/14 12:22:00
![帮忙修改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](/uploads/image/z/7202610-18-0.jpg?t=%E5%B8%AE%E5%BF%99%E4%BF%AE%E6%94%B9lingo%E7%A8%8B%E5%BA%8F%E4%BD%BF%E8%83%BD%E6%AD%A3%E5%B8%B8%E8%BF%90%E8%A1%8CMODEL%3ASETS%3Advd%2F1..10%2F%3Bn%3Bsupply%2F1..10%2F%3Blink%28dvd%2Csupply%29%3Ax%2Cc%3BENDSETSDATA%3A+c%3D++++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;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))