那位lingo高手可以告诉我是哪输入错了?MODEL:SETS:WH/W1..W6/:AI; VD/V1..V8/:DJ;LINKS(WH,VD):C,D;ENDSETSDATA:AI=60,55,51,43,41,52;DJ=35,37,22,32,41,32,43,38;C=6,2,6,7,4,2,5,94,9,5,3,8,5,8,25,2,1,9,7,4,3,37,6,7,3,9,2,7,12,3,9,5,7,2,6,55,5,2
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 05:51:17
那位lingo高手可以告诉我是哪输入错了?MODEL:SETS:WH/W1..W6/:AI; VD/V1..V8/:DJ;LINKS(WH,VD):C,D;ENDSETSDATA:AI=60,55,51,43,41,52;DJ=35,37,22,32,41,32,43,38;C=6,2,6,7,4,2,5,94,9,5,3,8,5,8,25,2,1,9,7,4,3,37,6,7,3,9,2,7,12,3,9,5,7,2,6,55,5,2
那位lingo高手可以告诉我是哪输入错了?
MODEL:
SETS:
WH/W1..W6/:AI; VD/V1..V8/:DJ;
LINKS(WH,VD):C,D;
ENDSETS
DATA:
AI=60,55,51,43,41,52;
DJ=35,37,22,32,41,32,43,38;
C=6,2,6,7,4,2,5,9
4,9,5,3,8,5,8,2
5,2,1,9,7,4,3,3
7,6,7,3,9,2,7,1
2,3,9,5,7,2,6,5
5,5,2,2,8,1,4,3;
ENDDATA
MIN=@SUM(LINKS(I,J):C(I,J)*X(I,J)); 目标函数;
@FOR(WH(I):@SUM(VD(J):X(I,J))
那位lingo高手可以告诉我是哪输入错了?MODEL:SETS:WH/W1..W6/:AI; VD/V1..V8/:DJ;LINKS(WH,VD):C,D;ENDSETSDATA:AI=60,55,51,43,41,52;DJ=35,37,22,32,41,32,43,38;C=6,2,6,7,4,2,5,94,9,5,3,8,5,8,25,2,1,9,7,4,3,37,6,7,3,9,2,7,12,3,9,5,7,2,6,55,5,2
改成这样
MODEL:
SETS:
WH/W1..W6/:AI; VD/V1..V8/:DJ;
LINKS(WH,VD):C,D,X;
ENDSETS
DATA:
AI=60,55,51,43,41,52;
DJ=35,37,22,32,41,32,43,38;
C=6,2,6,7,4,2,5,9
4,9,5,3,8,5,8,2
5,2,1,9,7,4,3,3
7,6,7,3,9,2,7,1
2,3,9,5,7,2,6,5
5,5,2,2,8,1,4,3;
ENDDATA
MIN=@SUM(LINKS(I,J):C(I,J)*X(I,J)); !目标函数;
@FOR(WH(I):@SUM(VD(J):X(I,J))