【lingo】unexpected Jacobian overflow 哪里错了.model:sets:compt/1..8/:d,a,b,c;cars/1..30/:f,right;cost(cars,compt):A1,B1,C1,DS;endsetsdata:d=8 1524 29 37 45 49 55;a=4 1 23 1 0 2 5;b=1 5 01 2 4 2 3;c=5 2 42 4 3 5 1;e=6;g=20;enddata[obj]min=e*g

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/24 09:04:37
【lingo】unexpectedJacobianoverflow哪里错了.model:sets:compt/1..8/:d,a,b,c;cars/1..30/:f,right;cost(cars,c

【lingo】unexpected Jacobian overflow 哪里错了.model:sets:compt/1..8/:d,a,b,c;cars/1..30/:f,right;cost(cars,compt):A1,B1,C1,DS;endsetsdata:d=8 1524 29 37 45 49 55;a=4 1 23 1 0 2 5;b=1 5 01 2 4 2 3;c=5 2 42 4 3 5 1;e=6;g=20;enddata[obj]min=e*g
【lingo】unexpected Jacobian overflow 哪里错了.
model:
sets:
compt/1..8/:d,a,b,c;
cars/1..30/:f,right;
cost(cars,compt):A1,B1,C1,DS;
endsets
data:
d=8 1524 29 37 45 49 55;
a=4 1 23 1 0 2 5;
b=1 5 01 2 4 2 3;
c=5 2 42 4 3 5 1;
e=6;g=20;
enddata
[obj]min=e*g+@sum(cars(i):f(i)*10)+@sum(cost(i,j):(4*A1(i,j)+3*B1(i,j)+C1(i,j))*DS(i,j)*1.8);
每趟车的装载量不得超过车的最大载重量;
@for(cars(i):@sum(compt(j):4*A1(i,j)+3*B1(i,j)+C1(i,j))=a(j));@for(compt(j):@sum(cars(i):B1(i,j))>=b(j));
@for(compt(j):@sum(cars(i):C1(i,j))>=c(j));
每一趟车到第j个公司的实际距离:
@for(cars(i):@for(compt(j):distance(i,j)=@if(right(i),60-d(j),d(j)));
装载A、B、C材料时不得拆装
@for(cost(i,j):@gin(A1(i,j)));
@for(cost(i,j):@gin(B1(i,j)));
@for(cost(i,j):@gin(C1(i,j)));
@for(cars(i):@bin(right(i)));
end

【lingo】unexpected Jacobian overflow 哪里错了.model:sets:compt/1..8/:d,a,b,c;cars/1..30/:f,right;cost(cars,compt):A1,B1,C1,DS;endsetsdata:d=8 1524 29 37 45 49 55;a=4 1 23 1 0 2 5;b=1 5 01 2 4 2 3;c=5 2 42 4 3 5 1;e=6;g=20;enddata[obj]min=e*g
cost(cars,compt):A1,B1,C1,DS;
这句最后的分号改成英文的分号才行