Hi
with .dat:
n=5;
Arcs={<1,1>,<1,2>,<1,3>,<1,4>,<1,5>,
<2,1>,<2,2>,<2,3>,<2,4>,<2,5>,
<3,1>,<3,2>,<3,3>,<3,4>,<3,5>,
<4,1>,<4,2>,<4,3>,<4,4>,<4,5>,
<5,1>,<5,2>,<5,3>,<5,4>,<5,5>};
Cost=[0, 40, 60, 70, 50,
40, 0, 10, 80, 90,
60, 10, 0, 130, 75,
70, 80, 130, 0, 60,
80, 90,75, 60, 0];
demand= [ 0, 2, 0, 4, 6,
6, 0, 10, 5, 7,
4, 5, 0, 1, 8,
10, 2, 11, 0, 3,
1, 5, 8, 7, 0];
PenaltyCost= [ 0, 60, 80, 90, 70,
60, 0, 30, 100, 110,
80, 20, 0, 150, 95,
90,100, 150, 0, 80,
70, 110, 95, 80, 0];
it will work better
There was a typo in Arcs in the .dat
in the .mod I changed
setof(arc) Arcs = {<i,j> | ordered i,j in Locations};
into
setof(arc) Arcs = ...; //{<i,j> | ordered i,j in Locations};
regards
#DecisionOptimization#OPLusingCPLEXOptimizer