有没有LINGO高手呀,帮我看看这个程序哪里出错了,MODEL:SETS:WH/W1..W18/:AI,BI,X; ENDSETSDATA:AI=0,0,0.4,1.8,1.3,1.5,2.2,0,-1.2,0.9,1.2,0,0,0.8,1.8,-3,1.4,0;BI=0,3,1,2,2,1,1,0,2,1,1,0,0,2,2,1,3,0; ENDDATAMAX=@SUM(WH:X(I)*AI(I));@FOR(WH:X(I)

问题描述:

有没有LINGO高手呀,帮我看看这个程序哪里出错了,
MODEL:
SETS:
WH/W1..W18/:AI,BI,X;
ENDSETS
DATA:
AI=0,0,0.4,1.8,1.3,1.5,2.2,0,-1.2,0.9,1.2,0,0,
0.8,1.8,-3,1.4,0;
BI=0,3,1,2,2,1,1,0,2,1,1,0,0,2,2,1,3,0;
ENDDATA
MAX=@SUM(WH:X(I)*AI(I));
@FOR(WH:X(I)

请注意lingo默认变量非负,有需要x取负值,可以加一个约束@FOR(WH:@FREE(X));MODEL: SETS: WH/W1..W18/:AI,BI,X; ENDSETS DATA: AI=0,0,0.4,1.8,1.3,1.5,2.2,0,-1.2,0.9,1.2,0,0, ...