n个城市选m个供应点,要考虑到每个城市建立供应点的费用和城时之间的距离,并求出供给点所供给的城市怎么用lingo怎么求,model: sets: city/1..49/:cost,need; station/1..8/:; road(city,city):u,dis; bj(station,

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/28 12:20:21
n个城市选m个供应点,要考虑到每个城市建立供应点的费用和城时之间的距离,并求出供给点所供给的城市怎么用lingo怎么求,model:  sets:  city/1..49/:cost,need;  station/1..8/:; road(city,city):u,dis;  bj(station,
xSn@teFXD6Nlǎ22iQ>jZP[)*v |&MHl왹{9fىu/ :# ^2:!Gw'giLav9ekxf[ ݾ~E /N>$9YCrҮ/ֻk4{qAXl(yvD';_r-Q-)߿-14/!x.~H_i.yt Ek8x3j цfubP*h1T5:R*ҙx+>Eirs[yH RTK,p<,Uf{>__E?LS^m

n个城市选m个供应点,要考虑到每个城市建立供应点的费用和城时之间的距离,并求出供给点所供给的城市怎么用lingo怎么求,model: sets: city/1..49/:cost,need; station/1..8/:; road(city,city):u,dis; bj(station,
n个城市选m个供应点,要考虑到每个城市建立供应点的费用和城时之间的距离,并求出供给点所供给的城市怎么
用lingo怎么求,model:
sets:
city/1..49/:cost,need;
station/1..8/:;
road(city,city):u,dis;
bj(station,city):x;
endsets
n=@size(city);
data:
cost=@ole('d:\book1.xls','y');!从excel中读入每个城市建立供应点所花费的费用
need=@ole('d:\book2.xls','x');!
每个城市所需货物数量
dis=@ole('d:\lingodata.xls','dist');!两个城市之间的距离
enddata
@for(city(i):@sum(station(k):x(k,i))=1);!每个城市只能被供给一次
min=(a+b);
@for(station(k):
@sum(bj(k,i):(x(k,i)*cost(i)))

n个城市选m个供应点,要考虑到每个城市建立供应点的费用和城时之间的距离,并求出供给点所供给的城市怎么用lingo怎么求,model: sets: city/1..49/:cost,need; station/1..8/:; road(city,city):u,dis; bj(station,
sets:
city/1..49/:cost,need;
station/1..8/:;
road(city,city):u,dis;
bj(station,city):x;
endsets
n=@size(city);
data:
cost=@ole('d:\book1.xls','y');!从excel中读入每个城市建立供应点所花费的费用;
need=@ole('d:\book2.xls','x');!每个城市所需货物数量;
dis=@ole('d:\lingodata.xls','dist');!两个城市之间的距离;
enddata
@for(city(i):@sum(station(k):x(k,i))=1);!每个城市只能被供给一次;
min=(a+b);
@for(station(k):
@sum(bj(k,i):(x(k,i)*cost(i)))