高人求教LINGO!错误代码11,哪里出错了啊?
高人求教LINGO!错误代码11,哪里出错了啊?
MODEL:
SETS:
AH/A1..A21/:W,A,E;
BH/B1..B29/:X,B,F;
CH/C1..C15/:Y,C,G;
DH/D1..D36/:Z,D,H;
ENDSETS
DATA:
A=11 11 10 9 9 9 8 8 7 6 3 3 3 3 2 2 1 1 1 1 0;
B=12 12 11 10 10 10 9 8 7 7 7 6 6 6 6 6 6 6 5 5 4 3 1 1 1 0 0 0 0;
C=12 11 11 10 7 7 7 7 6 5 2 2 1 0 0;
D=12 12 12 11 11 11 10 10 10 10 10 9 8 8 8 8 8 7 7 7 7 7 6 5 4 4 3 3 3 2 1 0 0 0 0 0 ;
E=10 10 9 8 8 8 7 7 6 5 9 9 9 9 8 8 7 7 7 7 6;
F=7 7 13 12 12 12 11 10 9 9 9 8 8 8 8 8 8 8 7 7 13 12 10 10 10 9 9 9 9;
G=11 12 12 11 11 11 11 11 12 11 11 11 11 11 11;
H=13 13 13 14 14 14 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 14 13 14 14 13 13 13 13 13 13 13 13 13 13;
ENDSETS
MIN=102+@SUM(AH(I):W(I)*(E(I)-A(I)))+@SUM(BH(J):X(J)*(F(J)-B(J)))+@SUM(CH(K):Y(K)*(G(K)-C(K)))+@SUM(DH(L):Z(L)*(H(L)-D(L)));;
@FOR(@SUM(AH(I):W(I))+@SUM(BH(I):X(I))+@SUM(CH(I):Y(I))+@SUM(DH(I):Z(I))=3);
@FOR(AH(I):@BIN(W(I)));
@FOR(BH(I):@BIN(X(I)));
@FOR(CH(I):@BIN(Y(I)));
@FOR(DH(I):@BIN(Z(I)));
@FOR(AH(I):16-A(I)*W(I)>=0);
@FOR(BH(I):14-B(I)*X(I)>=0);
@FOR(CH(I):15-C(I)*Y(I)>=0);
@FOR(DH(I):15-D(I)*Z(I)>=0);
注:我是10.0版本的LINGO.
MODEL:
SETS:
AH/A1..A21/:W,A,E;
BH/B1..B29/:X,B,F;
CH/C1..C15/:Y,C,G;
DH/D1..D36/:Z,D,H;
ENDSETS
DATA:
A=11 11 10 9 9 9 8 8 7 6 3 3 3 3 2 2 1 1 1 1 0;
B=12 12 11 10 10 10 9 8 7 7 7 6 6 6 6 6 6 6 5 5 4 3 1 1 1 0 0 0 0;
C=12 11 11 10 7 7 7 7 6 5 2 2 1 0 0;
D=12 12 12 11 11 11 10 10 10 10 10 9 8 8 8 8 8 7 7 7 7 7 6 5 4 4 3 3 3 2 1 0 0 0 0 0 ;
E=10 10 9 8 8 8 7 7 6 5 9 9 9 9 8 8 7 7 7 7 6;
F=7 7 13 12 12 12 11 10 9 9 9 8 8 8 8 8 8 8 7 7 13 12 10 10 10 9 9 9 9;
G=11 12 12 11 11 11 11 11 12 11 11 11 11 11 11;
H=13 13 13 14 14 14 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 14 13 14 14 13 13 13 13 13 13 13 13 13 13;
enddata
MIN=102+@SUM(AH(I):W(I)*(E(I)-A(I)))+@SUM(BH(J):X(J)*(F(J)-B(J)))+@SUM(CH(K):Y(K)*(G(K)-C(K)))+@SUM(DH(L):Z(L)*(H(L)-D(L)));
@SUM(AH(I):W(I))+@SUM(BH(I):X(I))+@SUM(CH(I):Y(I))+@SUM(DH(I):Z(I))=3;
@FOR(AH(I):@BIN(W(I)));
@FOR(BH(I):@BIN(X(I)));
@FOR(CH(I):@BIN(Y(I)));
@FOR(DH(I):@BIN(Z(I)));
@FOR(AH(I):16-A(I)*W(I)>=0);
@FOR(BH(I):14-B(I)*X(I)>=0);
@FOR(CH(I):15-C(I)*Y(I)>=0);
@FOR(DH(I):15-D(I)*Z(I)>=0);
end