1.4.1 Example
Model
LP file
Maximize
20 x1*x3 + 26 x1*x4 + 23 x2*x3 +
8 x2*x5 + 32 x3*x4 + 13 x4*x5
Subject to
x1 + x2 + x3 + x4 + x5 = 3
12 x1*x3 + 24 x1*x4 + 14 x2*x3 +
16 x2*x5 + 28 x3*x4 + 12 x4*x5 <= 30
Binary
x1 x2 x3 x4 x5
End
BC file (generated by lp2bc.py)
# List of binary variables:
# 1: x1
# 2: x2
# 3: x3
# 4: x4
# 5: x5
1 = max problem
2 = number of constraints
2 = number of blocks
6, -1
3.0 30.0
0 1 1 3 10.0
0 1 1 4 13.0
0 1 2 3 11.5
0 1 2 5 4.0
0 1 3 4 16.0
0 1 4 5 6.5
1 1 1 6 0.5
1 1 2 6 0.5
1 1 3 6 0.5
1 1 4 6 0.5
1 1 5 6 0.5
2 1 1 3 6.0
2 1 1 4 12.0
2 1 2 3 7.0
2 1 2 5 8.0
2 1 3 4 14.0
2 1 4 5 6.0
2 2 1 1 1.0