lingo中0—1变量model:sets:cities/1..9/;roads(cities,cities):w,x,v,o,p,q;endsetsdata:T=3.838384;a=0.0625;b=1.875;w=@ole('d:\data.xls',w);enddatacalc:c=100-100*0.3^0.3;d=200*1-200*0.1^0.3;@for(roads(i,j):w(i,j)=w(i,j)+w(j,i));@for(roads(i,j):w(i,j)
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/19 11:25:18
lingo中0—1变量model:sets:cities/1..9/;roads(cities,cities):w,x,v,o,p,q;endsetsdata:T=3.838384;a=0.0625;b=1.875;w=@ole('d:\data.xls',w);enddatacalc:c=100-100*0.3^0.3;d=200*1-200*0.1^0.3;@for(roads(i,j):w(i,j)=w(i,j)+w(j,i));@for(roads(i,j):w(i,j)
lingo中0—1变量
model:
sets:
cities/1..9/;
roads(cities,cities):w,x,v,o,p,q;
endsets
data:
T=3.838384;
a=0.0625;
b=1.875;
w=@ole('d:\data.xls',w);
enddata
calc:
c=100-100*0.3^0.3;
d=200*1-200*0.1^0.3;
@for(roads(i,j):w(i,j)=w(i,j)+w(j,i));
@for(roads(i,j):w(i,j)=@if(w(i,j) #eq# 0,10000,w(i,j)));
@for(roads(i,j):v=w*(o+1.1*p+1.5*q)*a+b);
0,p,q均为0—1变量,如何实现v(I,j)=w(i,j)*(o+1.1*p+1.5*q)
lingo中0—1变量model:sets:cities/1..9/;roads(cities,cities):w,x,v,o,p,q;endsetsdata:T=3.838384;a=0.0625;b=1.875;w=@ole('d:\data.xls',w);enddatacalc:c=100-100*0.3^0.3;d=200*1-200*0.1^0.3;@for(roads(i,j):w(i,j)=w(i,j)+w(j,i));@for(roads(i,j):w(i,j)
你要知道lingo里面都是约束 既然你要写这个约束直接写了就行了 你最后一句基本上都写出来了啊