model:
sets:
city/1..5/:x,demand;
link(city,city):c,time;
endsets
data:
price=20;
time=
1 2 3 3 2
2 1 2 3 3
3 2 1 2 3
3 3 2 1 2
1 3 3 2 1;
demand=20 30 10 15 25;
enddata
min=@sum(city(j):demand(j)*@sum(city(i):c(i,j)*time(i,j)));
@sum(city:x)=2;
@for(city(i):@for(city(j):c(i,j)