param n:=4;
set N:=1..n;
param c{i in N, j in N};
var x {i in N, j in N} binary;
minimize fc: sum{i in N, j in N : i>j}c[i,j]*x[i,j];
subject to INPUT {j in N}:sum{i in N}x[i,j]=2;
subject to OUTPUT {i in N}: sum{j in N}x[i,j]=2;
subject to Ogr3{i in N, j in N}: x[i,j]=x[i,j];
subject to Ogr4{i in N}: x[i,i]=0;
end;
data;
param c : 1 2 3 4 :=
1 0 100 250 650
2 100 0 410 420
3 250 410 0 300
4 650 420 300 0;
end;
Problem: lab3B
Rows: 29
Columns: 16 (16 integer, 16 binary)
Non-zeros: 42
Status: INTEGER OPTIMAL
Objective: fc = 1070 (MINimum) 1070 (LP)
No. Row name Activity Lower bound Upper bound
------ ------------ ------------- ------------- -------------
1 fc 1070
2 INPUT[1] 2 2 =
3 INPUT[2] 2 2 =
4 INPUT[3] 2 2 =
5 INPUT[4] 2 2 =
6 OUTPUT[1] 2 2 =
7 OUTPUT[2] 2 2 =
8 OUTPUT[3] 2 2 =
9 OUTPUT[4] 2 2 =
10 Ogr3[1,1] 0 0 =
11 Ogr3[1,2] 0 0 =
12 Ogr3[1,3] 0 0 =
13 Ogr3[1,4] 0 0 =
14 Ogr3[2,1] 0 0 =
15 Ogr3[2,2] 0 0 =
16 Ogr3[2,3] 0 0 =
17 Ogr3[2,4] 0 0 =
18 Ogr3[3,1] 0 0 =
19 Ogr3[3,2] 0 0 =
20 Ogr3[3,3] 0 0 =
21 Ogr3[3,4] 0 0 =
22 Ogr3[4,1] 0 0 =
23 Ogr3[4,2] 0 0 =
24 Ogr3[4,3] 0 0 =
25 Ogr3[4,4] 0 0 =
26 Ogr4[1] 0 0 =
27 Ogr4[2] 0 0 =
28 Ogr4[3] 0 0 =
29 Ogr4[4] 0 0 =
No. Column name Activity Lower bound Upper bound
------ ------------ ------------- ------------- -------------
1 x[2,1] * 1 0 1
2 x[3,1] * 1 0 1
3 x[3,2] * 0 0 1
4 x[4,1] * 0 0 1
5 x[4,2] * 1 0 1
6 x[4,3] * 1 0 1
7 x[1,1] * 0 0 1
8 x[1,2] * 1 0 1
9 x[2,2] * 0 0 1
10 x[1,3] * 0 0 1
11 x[2,3] * 1 0 1
12 x[3,3] * 0 0 1
13 x[1,4] * 1 0 1
14 x[2,4] * 0 0 1
15 x[3,4] * 1 0 1
16 x[4,4] * 0 0 1
Integer feasibility conditions:
INT.PE: max.abs.err. = 0.00e+000 on row 0
max.rel.err. = 0.00e+000 on row 0
High quality
INT.PB: max.abs.err. = 0.00e+000 on row 0
max.rel.err. = 0.00e+000 on row 0
High quality
End of output