lingo程序改错 看一眼来@@model:sets:cities/v4,v1,v2,v3,v5,v6,v7,v9,v10,v11,v8/;roads(cities,cities):p,w,x;endsetsdata:p=函数;w=函数;enddatan=@size(cities);min=@sum(roads:w*x);@for(cities(i)|i#ne#l#and#i#ne#n:@sum(cities(j):p(i,j)*x(i,j
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/17 03:02:23
lingo程序改错 看一眼来@@model:sets:cities/v4,v1,v2,v3,v5,v6,v7,v9,v10,v11,v8/;roads(cities,cities):p,w,x;endsetsdata:p=函数;w=函数;enddatan=@size(cities);min=@sum(roads:w*x);@for(cities(i)|i#ne#l#and#i#ne#n:@sum(cities(j):p(i,j)*x(i,j
lingo程序改错 看一眼来@@
model:
sets:
cities/v4,v1,v2,v3,v5,v6,v7,v9,v10,v11,v8/;
roads(cities,cities):p,w,x;
endsets
data:
p=函数;
w=函数;
enddata
n=@size(cities);
min=@sum(roads:w*x);
@for(cities(i)|i#ne#l#and#i#ne#n:@sum(cities(j):p(i,j)*x(i,j))=@sum(cities(j):p(j,i)*x(j,i)));
@sum(cities(j):p(l,j)*x(l,j))=1;
End
lingo程序改错 看一眼来@@model:sets:cities/v4,v1,v2,v3,v5,v6,v7,v9,v10,v11,v8/;roads(cities,cities):p,w,x;endsetsdata:p=函数;w=函数;enddatan=@size(cities);min=@sum(roads:w*x);@for(cities(i)|i#ne#l#and#i#ne#n:@sum(cities(j):p(i,j)*x(i,j
你data里面的p=函数是个什么?data里面是要枚举数据的 不知道你写个函数是什么意思
另外你后面的l是多少?应该是1吧