rething/1..t/:ct,ccg,csg;
recollector/1..m/;
link1(recollector,rething):e;
redpot/1..n/:sb,mins,maxs,s;
link2(recollector,redepot):d;
link3(recollector,redpot,rething):n;
endsets
data:
ct=0.5,1.0,0.8,0.6;
ccg=0.05,0.1,0.08,0.06;
csg=1,1.5,1.2,1.1;
mins=1000,1000,1000,1000,1000,1000,1000,1000,1000,1000;
maxs=10000,10000,10000,10000,10000,10000,10000,10000,10000,10000;
n=497,803,999,609
487,818,998,602
502,817,1013,610
513,802,996,608,512,703,1008,597;
d=11, 27, 28, 12, 14
14, 29, 22, 19, 14
23, 23, 10, 19, 23
11, 26, 21, 27, 12
12, 13, 19, 12, 17
26, 12, 16, 13, 21
13, 26, 28, 17, 10
16, 26, 17, 26, 23
11, 23, 16, 11, 16
20, 13, 10, 29, 27;
sb=50000,50000,50000,50000,50000,50000,50000,50000,50000,50000;
time=28;
h1=5;
enddata
min=@sum(link3(i,j,t):d(i,j)*n(i,j,t)*ct(t))+@sum(link3(i,j,t):ccg(t)*n(i,j,t)+csg(t)*n(i,j,t)*time)+@sum(redpot(j):sb*s(j));
@for(link1(i,t):@sum(redpot(j):n(i,j,t))=e(i,t););
@sum(link3(i,j,t):n(i,j,t))=@sum(link1(i,t):e(i,t));
@for(redpot(j):@sum(link1(i,t):n(i,j,t))>=mins(j)*s(j));
@for(redpot(j):@sum(link1(i,t):n(i,j,t))<=maxs(j)*s(j));
@for(redpot(j):@bin(s(j)));
@sum(redpot(j):s(j))<=h1;
end |