How to use your favorite MIP Solver: modeling, solving, cannibalizing Andrea Lodi

How to use your favorite MIP Solver:
modeling, solving, cannibalizing
Andrea Lodi
University of Bologna, Italy
[email protected]
January-February, 2012 @ Universit¨at Wien
A. Lodi, How to use your favorite MIP Solver
Setting
• We consider a general Mixed Integer Program in the form:
T
max{c x : Ax ≤ b, x ≥ 0, xj ∈ Z, ∀j ∈ I}
(1)
where matrix A does not have a special structure.
• Thus, the problem is solved through branch-and-bound and the bounds are computed by
iteratively solving the LP relaxations through a general-purpose LP solver.
• The course basically covers the MIP but we will try to discuss when possible how crucial is the
LP component (the engine), and how much the whole framework is built on top the capability
of effectively solving LPs.
• Roughly speaking, using the LP computation as a tool, MIP solvers integrate the
branch-and-bound and the cutting plane algorithms through variations of the general
branch-and-cut scheme [Padberg & Rinaldi 1987] developed in the context of the Traveling
Salesman Problem (TSP).
A. Lodi, How to use your favorite MIP Solver
1
Outline
1. The building blocks of a MIP solver.
We will run over the first 50 exciting years of MIP by showing some crucial milestones and we
will highlight the building blocks that are making nowadays solvers effective from both a
performance and an application viewpoint.
2. How to use a MIP solver as a sophisticated (heuristic) framework.
Nowadays MIP solvers should not be conceived as black-box exact tools. In fact, they provide
countless options for their smart use as hybrid algorithmic frameworks, which thing might turn
out especially interesting on the applied context. We will review some of those options and
possible hybridizations, including some real-world applications.
A. Lodi, How to use your favorite MIP Solver
2
Outline
1. The building blocks of a MIP solver.
We will run over the first 50 exciting years of MIP by showing some crucial milestones and we
will highlight the building blocks that are making nowadays solvers effective from both a
performance and an application viewpoint.
2. How to use a MIP solver as a sophisticated (heuristic) framework.
Nowadays MIP solvers should not be conceived as black-box exact tools. In fact, they provide
countless options for their smart use as hybrid algorithmic frameworks, which thing might turn
out especially interesting on the applied context. We will review some of those options and
possible hybridizations, including some real-world applications.
3. Modeling and algorithmic tips to make a solver effective in practice.
The capability of a solver to produce good, potentially optimal, solutions depends on the
selection of the right model and the use of the right algorithmic tools the solver provides. We
will discuss useful tips, from simple to sophisticated, which allow a smart use of a MIP solver.
Finally, we will show that this is NOT the end of the story and many challenges for MIP
technology are still to be faced.
A. Lodi, How to use your favorite MIP Solver
2
PART 3
1. The building blocks of a MIP solver
2. How to use a MIP solver as a sophisticated (heuristic) framework
3. Modeling and algorithmic tips to make a solver effective in practice
A. Lodi, How to use your favorite MIP Solver
3
PART 3
1. The building blocks of a MIP solver
2. How to use a MIP solver as a sophisticated (heuristic) framework
3. Modeling and algorithmic tips to make a solver effective in practice
• Outline:
– Solving difficult MIPs [heavily based on Klotz & Newman 2011, PART-II-2.pdf]
A. Lodi, How to use your favorite MIP Solver
3
PART 3
1. The building blocks of a MIP solver
2. How to use a MIP solver as a sophisticated (heuristic) framework
3. Modeling and algorithmic tips to make a solver effective in practice
• Outline:
– Solving
1. Lack
2. Lack
3. Lack
4. Lack
difficult MIPs [heavily based on Klotz & Newman 2011, PART-II-2.pdf]
of node throughput because of LP solving
in progress in the best (mixed-)integer solution
in progress in the best bound
of node throughput because of numerical instability
A. Lodi, How to use your favorite MIP Solver
3
PART 3
1. The building blocks of a MIP solver
2. How to use a MIP solver as a sophisticated (heuristic) framework
3. Modeling and algorithmic tips to make a solver effective in practice
• Outline:
– Solving
1. Lack
2. Lack
3. Lack
4. Lack
difficult MIPs [heavily based on Klotz & Newman 2011, PART-II-2.pdf]
of node throughput because of LP solving
in progress in the best (mixed-)integer solution
in progress in the best bound
of node throughput because of numerical instability
– MIP Challenges
A. Lodi, How to use your favorite MIP Solver
3
Solving difficult MIPs: four common reasons
• There are four common reasons that integer programs can require significant amount of
solution time.
A. Lodi, How to use your favorite MIP Solver
4
Solving difficult MIPs: four common reasons
• There are four common reasons that integer programs can require significant amount of
solution time.
1. There is lack of node throughput due to troublesome linear programming node solves.
A. Lodi, How to use your favorite MIP Solver
4
Solving difficult MIPs: four common reasons
• There are four common reasons that integer programs can require significant amount of
solution time.
1. There is lack of node throughput due to troublesome linear programming node solves.
2. There is lack of progress in the best integer solution, i.e., the lower bound.
A. Lodi, How to use your favorite MIP Solver
4
Solving difficult MIPs: four common reasons
• There are four common reasons that integer programs can require significant amount of
solution time.
1. There is lack of node throughput due to troublesome linear programming node solves.
2. There is lack of progress in the best integer solution, i.e., the lower bound.
3. There is lack of progress in the best upper bound.
A. Lodi, How to use your favorite MIP Solver
4
Solving difficult MIPs: four common reasons
• There are four common reasons that integer programs can require significant amount of
solution time.
1. There is lack of node throughput due to troublesome linear programming node solves.
2. There is lack of progress in the best integer solution, i.e., the lower bound.
3. There is lack of progress in the best upper bound.
4. There is insufficient node throughput due to numerical instability in the problem data or
excessive memory usage.
A. Lodi, How to use your favorite MIP Solver
4
249
However, conducting different runs in which the practitioner invokes, alternately, the primal or the
250
dual simplex method at the child nodes is a good idea. Consider the following two node logs, the
251
former corresponding
to solving
the root and child
node linearofprograms
with the dual simplex
Lack of node
throughput
because
LP solving
252
method and the latter with the primal simplex method.
253
Node Log #1: Node Linear Programs Solved with Dual Simplex
254
Nodes
Cuts/
Best Integer
ItCnt
Node
Left
Objective
IInf
0
0
-89.0000
6
-89.0000
5278
0
0
-89.0000
6
Fract: 4
12799
0
2
-89.0000
6
-89.0000
12799
1
1
infeasible
-89.0000
20767
2
2
-89.0000
-89.0000
27275
3
1
infeasible
-89.0000
32502
8
2
-89.0000
-89.0000
65717
9
1
infeasible
-89.0000
73714
5
Best Node
...
8
...
9
Solution time = 177.33 sec. Iterations = 73,714 Nodes = 10 (1)
A. Lodi, How to use your favorite MIP Solver
5
Solution time = 177.33 sec. Iterations = 73714
Nodes = 10 (1)
Lack of node throughput because of LP solving (cont.d)
255
256
Node Log #2: Node Linear Programs Solved with Primal Simplex
257
Nodes
Cuts/
Best Integer
ItCnt
Node
Left
Objective
IInf
0
0
-89.0000
5
-89.0000
6603
0
0
-89.0000
5
Fract: 5
7120
0
2
-89.0000
5
-89.0000
7120
1
1
infeasible
-89.0000
9621
2
2
-89.0000
-89.0000
10616
3
1
infeasible
-89.0000
12963
8
2
-89.0000
-89.0000
21522
9
1
infeasible
-89.0000
23891
5
Best Node
...
8
...
Solution time = 54.37 sec. Iterations = 23891
Nodes = 10 (1)
258
Solution
time = 54.37 sec. Iterations = 23,891 Nodes = 10 (1)
259
The iteration count for the root node solve shown in Node Log #1 that occurred without
260
any advanced start information indicates 5,278 iterations. Computing the average iteration count
261
across all node LP solves, there are 11 solves (10 nodes, and 1 extra solve for cut generation at node
262
0) and 73,714 iterations, which were performed in a total of 177 seconds. The summary output in
A. Lodi, How to use your favorite MIP Solver
6
Lack of node throughput because of LP solving (cont.d)
• Summary of the Dual Simplex output:
– 5,278 iterations without any advanced start information,
– overall 73,714 iterations and 177 seconds for 11 solves indicates approximately 6,701
iterations and 17 seconds per solve.
A. Lodi, How to use your favorite MIP Solver
7
Lack of node throughput because of LP solving (cont.d)
• Summary of the Dual Simplex output:
– 5,278 iterations without any advanced start information,
– overall 73,714 iterations and 177 seconds for 11 solves indicates approximately 6,701
iterations and 17 seconds per solve.
• Summary of the Primal Simplex output:
– 6,603 iterations without any advanced start information,
– overall 23,891 iterations and 54 seconds for 11 solves indicates approximately 2,172
iterations and 5 seconds per solve.
A. Lodi, How to use your favorite MIP Solver
7
Lack of node throughput because of LP solving (cont.d)
• Summary of the Dual Simplex output:
– 5,278 iterations without any advanced start information,
– overall 73,714 iterations and 177 seconds for 11 solves indicates approximately 6,701
iterations and 17 seconds per solve.
• Summary of the Primal Simplex output:
– 6,603 iterations without any advanced start information,
– overall 23,891 iterations and 54 seconds for 11 solves indicates approximately 2,172
iterations and 5 seconds per solve.
• Thus, with the dual Simplex any solve subsequent to the first one requires 6,844 = (73,714 5,278)/10 iterations, which is higher than the 5,278 iterations required for the first solve!
• Any time this is true, or even when the average node LP iteration count is more than 30-50%
of the root node iteration count, an opportunity for improving node LP solve times exists by
changing algorithms or algorithmic settings.
A. Lodi, How to use your favorite MIP Solver
7
Lack of node throughput because of LP solving (cont.d)
• Summary of the Dual Simplex output:
– 5,278 iterations without any advanced start information,
– overall 73,714 iterations and 177 seconds for 11 solves indicates approximately 6,701
iterations and 17 seconds per solve.
• Summary of the Primal Simplex output:
– 6,603 iterations without any advanced start information,
– overall 23,891 iterations and 54 seconds for 11 solves indicates approximately 2,172
iterations and 5 seconds per solve.
• Thus, with the dual Simplex any solve subsequent to the first one requires 6,844 = (73,714 5,278)/10 iterations, which is higher than the 5,278 iterations required for the first solve!
• Any time this is true, or even when the average node LP iteration count is more than 30-50%
of the root node iteration count, an opportunity for improving node LP solve times exists by
changing algorithms or algorithmic settings.
• Indeed, in the primal Simplex case, any additional solve requires only 1,729 iterations, which is
much smaller than the 6,603 of the first solve.
A. Lodi, How to use your favorite MIP Solver
7
was 623 seconds. So, the time to obtain the first solution is faster by providing an initial feasible
314
317
315
solution, and if we let the algorithm with the initial solution run for an additional 1589 − 623 = 966
Node Log #4: No initial practitioner-supplied solution
seconds, the gap for the instance with the initial solution improves to 1.53%.
318
316
! Root relaxation
solution in
timethe
= 131.45
Lack
in progress
bestsec.(mixed-)integer solution
317
!
Node Log #4: No initial practitioner-supplied solution
Nodes
Cuts/
318
Root
relaxation
solution
timeIInf
= 131.45
Node
Left
Objective
Best sec.
Integer
0 Nodes
0
1.09590e+07
2424
Best Integer
Best Node
ItCnt
Cuts/
1.09590e+07
108111
Best
Node4
Cuts:
ItCnt
108510
Node
0
Left
0
Objective
1.09570e+07
IInf
2531
0
0
1.09405e+07
2476
Cuts: 2
109208
0
0
1.09590e+07
Heuristic
still
looking.
2424
1.09590e+07
108111
0
0
1.09570e+07
Heuristic
still
looking.
2531
Cuts: 4
108510
0
0
1.09405e+07
Heuristic
still
looking.
2476
Cuts: 2
109208
Gap
Gap
Heuristic still looking.
Heuristic still looking.
Heuristic
still
looking.
0
2
1.09405e+07
!
2476
1.09405e+07
Heuristic
still
Elapsed
real
timelooking.
= 384.09 sec. (tree size =
Heuristic
still
looking.
1
3
1.08913e+07
20
42
*
1277
1.09405e+07
109673
1.09405e+07 2326
2476
1.09261e+07
1.09405e+07
109208
109977
1.05554e+07
225
1880+ 1300
1880
1302
0.01 MB)
2488
Elapsed real time = 384.09 sec. (tree size =
...
12
1
3
1.08913e+07 2488
1776 1208
1.05645e+07
27
2 1246
4
1.09261e+07 2326
1814
1.05588e+07
31
1847
1.05474e+07
228
!
0.01 MB)
1.09405e+07
109673
1.09164e+07
474242
1.09405e+07 478648
109977
1.09164e+07
12
1.04780e+07
1.09164e+07
484687
1.09164e+07
491469
4.18%
1.04780e+07
1.09164e+07
491469
4.18%
Elapsed real time = 1589.38 sec. (tree size = 63.86 MB)
!
319
!
320 !
!
321
109208
A. Lodi, How to use your favorite MIP Solver
Node Log #5: An initial solution supplied by the practitioner
!
8
1880
1302
1.05474e+07
228
1.04780e+07
1.09164e+07
491469
4.18%
Elapsed real time = 1589.38 sec. (tree size = 63.86 MB)
Lack in progress in the best (mixed-)integer solution (cont.d)
319
320
Node Log #5: An initial solution supplied by the practitioner
321
Root relaxation solution time =
93.92 sec.
Nodes
Node
*
Left
Cuts/
Objective
IInf
Best Integer
Best Node
1.07197e+07
ItCnt
Gap
108111
---
0+
0
0
0
1.09590e+07
2424
1.07197e+07
1.09590e+07
108111
2.23%
0
0
1.09570e+07
2531
1.07197e+07
Cuts: 4
108538
2.21%
485
433
1.09075e+07
2398
1.07197e+07
1.08840e+07
244077
1.53%
487
434
1.08237e+07
2303
1.07197e+07
1.08840e+07
244350
1.53%
497
439
1.08637e+07
1638
1.07197e+07
1.08840e+07
245391
1.53%
...
Elapsed real time = 750.11 sec. (tree size = 32.61 MB)
501
443
1.08503e+07
1561
1.07197e+07
1.08840e+07
245895
1.53%
...
Elapsed real time = 984.03 sec. (tree size = 33.00 MB)
1263
674
1.08590e+07
2574
1.07197e+07
1.08840e+07
314814
1.53%
322
323
A. Lodi, How to use your favorite MIP Solver
In the absence of a readily identifiable initial solution, various branching strategies can aid in
9
Figure 2: Convex hull
Lack in progress in the best bound
Node log #6 exemplifies progress in best integer solution but not in the best bound:
361
362
Node Log #6: Progress in Best Integer Solution but not in the Best Bound
363
Nodes
364
365
Cuts/
ItCnt
Gap
Node
Left
Objective
IInf
Best Integer
Best Node
300
296
2018.0000
27
3780.0000
560.0000
3703
85.19%
366
367
368
*
300+
296
0
2626.0000
560.0000
3703
78.67%
369
*
393
368
0
2590.0000
560.0000
4405
78.38%
370
400
372
560.0000
291
2590.0000
560.0000
4553
78.38%
371
500
472
810.0000
175
2590.0000
560.0000
5747
78.38%
0
1710.0000
560.0000
66026
67.25%
372
...
373
* 7740+
5183
374
7800
5240
1544.0000
110
1710.0000
560.0000
66279
67.25%
375
7900
5325
944.0000
176
1710.0000
560.0000
66801
67.25%
376
8000
5424
1468.0000
93
1710.0000
560.0000
67732
67.25%
377
15
A. Lodi, How to use your favorite MIP Solver
10
Lack in progress in the best bound (cont.d)
• Most solvers offer parameter settings that can help improve progress of the best node or
tighten the formulation of the model by moving the value of the linear programming relaxation
closer to that of the optimal integer objective.
A. Lodi, How to use your favorite MIP Solver
11
Lack in progress in the best bound (cont.d)
• Most solvers offer parameter settings that can help improve progress of the best node or
tighten the formulation of the model by moving the value of the linear programming relaxation
closer to that of the optimal integer objective.
Especially,
–
–
–
–
Best-bound-first node selection.
Strong Branching.
Probing.
More aggressive levels of cut generation.
A. Lodi, How to use your favorite MIP Solver
11
Lack in progress in the best bound (cont.d)
• Most solvers offer parameter settings that can help improve progress of the best node or
tighten the formulation of the model by moving the value of the linear programming relaxation
closer to that of the optimal integer objective.
Especially,
–
–
–
–
Best-bound-first node selection.
Strong Branching.
Probing.
More aggressive levels of cut generation.
• If those mechanisms fail, then the user must carefully look at the model and
– Change model formulation by using alternate variable definitions.
A. Lodi, How to use your favorite MIP Solver
11
Lack in progress in the best bound (cont.d)
• Most solvers offer parameter settings that can help improve progress of the best node or
tighten the formulation of the model by moving the value of the linear programming relaxation
closer to that of the optimal integer objective.
Especially,
–
–
–
–
Best-bound-first node selection.
Strong Branching.
Probing.
More aggressive levels of cut generation.
• If those mechanisms fail, then the user must carefully look at the model and
– Change model formulation by using alternate variable definitions.
– Revisit the use of elastic/indicator variables, i.e., those relaxing a constraint by allowing for
violations (penalized in the objective function).
A. Lodi, How to use your favorite MIP Solver
11
Lack in progress in the best bound (cont.d)
• Most solvers offer parameter settings that can help improve progress of the best node or
tighten the formulation of the model by moving the value of the linear programming relaxation
closer to that of the optimal integer objective.
Especially,
–
–
–
–
Best-bound-first node selection.
Strong Branching.
Probing.
More aggressive levels of cut generation.
• If those mechanisms fail, then the user must carefully look at the model and
– Change model formulation by using alternate variable definitions.
– Revisit the use of elastic/indicator variables, i.e., those relaxing a constraint by allowing for
violations (penalized in the objective function).
– Look at additional cutting planes either within the standard families that might not having
been discovered by the solver or specific for the model at hands.
A. Lodi, How to use your favorite MIP Solver
11
Lack in progress in the best bound (cont.d)
• Let us consider again cut generation and the following small MIP:
max 3x1 + 2x2 + x3 + 2x4 + x5
(2)
x1 + x2 ≤ 1
(3)
x1 + x3 ≤ 1
(4)
x2 + x3 ≤ 1
(5)
4x3 + 3x4 + 5x5 ≤ 10
(6)
x1 + 3x4 ≤ 2
(7)
3x2 + 4x5 ≤ 5
(8)
5
(9)
subject to
x ∈ {0, 1}
A. Lodi, How to use your favorite MIP Solver
12
Lack in progress in the best bound (cont.d)
• Adding cuts does not always help branch-and-bound performance.
A. Lodi, How to use your favorite MIP Solver
13
Lack in progress in the best bound (cont.d)
• Adding cuts does not always help branch-and-bound performance.
• While it can remove integer infeasibilities, it also results in more constraints in each node LP.
• More constraints can increase the intractability of these LPs. Without a commensurate
speed-up in solution time associated with processing fewer nodes, cuts may not be worth
adding.
A. Lodi, How to use your favorite MIP Solver
13
Lack in progress in the best bound (cont.d)
• Adding cuts does not always help branch-and-bound performance.
• While it can remove integer infeasibilities, it also results in more constraints in each node LP.
• More constraints can increase the intractability of these LPs. Without a commensurate
speed-up in solution time associated with processing fewer nodes, cuts may not be worth
adding.
• Some solvers have internal logic to automatically assess the trade-offs between adding cuts and
node LP solve time. However, if the solver lacks such logic or fails to make a good decision, the
user may need to look at the branch-and-bound output.
A. Lodi, How to use your favorite MIP Solver
13
Lack in progress in the best bound (cont.d)
• Adding cuts does not always help branch-and-bound performance.
• While it can remove integer infeasibilities, it also results in more constraints in each node LP.
• More constraints can increase the intractability of these LPs. Without a commensurate
speed-up in solution time associated with processing fewer nodes, cuts may not be worth
adding.
• Some solvers have internal logic to automatically assess the trade-offs between adding cuts and
node LP solve time. However, if the solver lacks such logic or fails to make a good decision, the
user may need to look at the branch-and-bound output.
• In other cases, the computational effort required to derive the cuts needed to effectively solve
the model may exceed the performance benefit they provide.
A. Lodi, How to use your favorite MIP Solver
13
Lack of node throughput because of numerical instability
• Because the solver solves LPs at each node of the branch-and-bound tree, the practitioner must
be careful to avoid LP numerical performance issues (see, Section 3 of Klotz and Newman,
reading material PART-II-1.pdf).
A. Lodi, How to use your favorite MIP Solver
14
Lack of node throughput because of numerical instability
• Because the solver solves LPs at each node of the branch-and-bound tree, the practitioner must
be careful to avoid LP numerical performance issues (see, Section 3 of Klotz and Newman,
reading material PART-II-1.pdf).
• Especially important is avoiding, when possible, large differences in orders of magnitude in data
to preclude the introduction of unnecessary round-off error. Such differences of input values
create round-off error in floating point calculations that makes it difficult for the algorithm to
distinguish between this error and a legitimate value [Koch et al. 2011].
A. Lodi, How to use your favorite MIP Solver
14
Lack of node throughput because of numerical instability
• Because the solver solves LPs at each node of the branch-and-bound tree, the practitioner must
be careful to avoid LP numerical performance issues (see, Section 3 of Klotz and Newman,
reading material PART-II-1.pdf).
• Especially important is avoiding, when possible, large differences in orders of magnitude in data
to preclude the introduction of unnecessary round-off error. Such differences of input values
create round-off error in floating point calculations that makes it difficult for the algorithm to
distinguish between this error and a legitimate value [Koch et al. 2011].
• Elastic/indicator variables (refereed to as “big-M ’s”) correspond to logic expressions as “if
z = 0, then x = 0”, which are imposed through the use of arbitrary large coefficients
x − 100000000000z ≤ 0
(10)
0 ≤ x ≤ 5000; z binary
(11)
A. Lodi, How to use your favorite MIP Solver
14
Lack of node throughput because of numerical instability
• Because the solver solves LPs at each node of the branch-and-bound tree, the practitioner must
be careful to avoid LP numerical performance issues (see, Section 3 of Klotz and Newman,
reading material PART-II-1.pdf).
• Especially important is avoiding, when possible, large differences in orders of magnitude in data
to preclude the introduction of unnecessary round-off error. Such differences of input values
create round-off error in floating point calculations that makes it difficult for the algorithm to
distinguish between this error and a legitimate value [Koch et al. 2011].
• Elastic/indicator variables (refereed to as “big-M ’s”) correspond to logic expressions as “if
z = 0, then x = 0”, which are imposed through the use of arbitrary large coefficients
x − 100000000000z ≤ 0
(10)
0 ≤ x ≤ 5000; z binary
(11)
• However, the coefficient 1011 can be safely and effectively replaced by 5000, which forbids a
solution in which z = 10−8 and x = 1000 from being feasible.
A. Lodi, How to use your favorite MIP Solver
14
Tightening the formulation
• As anticipated, sometimes the user might be required to add problem-specific cutting planes.
A. Lodi, How to use your favorite MIP Solver
15
Tightening the formulation
• As anticipated, sometimes the user might be required to add problem-specific cutting planes.
However, before doing that, it is often useful to identify elements of the model making it
difficult, specifically, those that contain the constraints and variables from which useful cuts can
be derived.
A. Lodi, How to use your favorite MIP Solver
15
Tightening the formulation
• As anticipated, sometimes the user might be required to add problem-specific cutting planes.
However, before doing that, it is often useful to identify elements of the model making it
difficult, specifically, those that contain the constraints and variables from which useful cuts can
be derived.
– Simplify the model if necessary.
For example, try to identify any constraints or integrality restrictions that are not involved in
the slow performance by systematically removing constraints and restrictions and solving the
resulting model.
A. Lodi, How to use your favorite MIP Solver
15
Tightening the formulation
• As anticipated, sometimes the user might be required to add problem-specific cutting planes.
However, before doing that, it is often useful to identify elements of the model making it
difficult, specifically, those that contain the constraints and variables from which useful cuts can
be derived.
– Simplify the model if necessary.
For example, try to identify any constraints or integrality restrictions that are not involved in
the slow performance by systematically removing constraints and restrictions and solving the
resulting model.
– Identify the constraints that prevent the objective from improving.
With a maximization problem, this typically means identifying the constraints that force
prizes not to be gained.
A. Lodi, How to use your favorite MIP Solver
15
Tightening the formulation
• As anticipated, sometimes the user might be required to add problem-specific cutting planes.
However, before doing that, it is often useful to identify elements of the model making it
difficult, specifically, those that contain the constraints and variables from which useful cuts can
be derived.
– Simplify the model if necessary.
For example, try to identify any constraints or integrality restrictions that are not involved in
the slow performance by systematically removing constraints and restrictions and solving the
resulting model.
– Identify the constraints that prevent the objective from improving.
With a maximization problem, this typically means identifying the constraints that force
prizes not to be gained.
– Determine how removing integrality restrictions allows the root node relaxation to improve.
In weak formulations, the root node relaxation objective tends to be significantly better than
the optimal objective of the associated MIP. The variables with fractional solutions in the
root node relaxation help identify the constraints and variables that motivate additional cuts.
A. Lodi, How to use your favorite MIP Solver
15
Tightening the formulation (cont.d)
• Model characteristics from which to derive cuts are
A. Lodi, How to use your favorite MIP Solver
16
Tightening the formulation (cont.d)
• Model characteristics from which to derive cuts are
– Linear or logical combinations of constraints.
As discussed, combination of constraints is the base of current cut generation techniques.
The knowledge of the problem at hand can suggest which constraints should be combined.
A. Lodi, How to use your favorite MIP Solver
16
Tightening the formulation (cont.d)
• Model characteristics from which to derive cuts are
– Linear or logical combinations of constraints.
As discussed, combination of constraints is the base of current cut generation techniques.
The knowledge of the problem at hand can suggest which constraints should be combined.
– The optimization of one or more related models.
Extract a small(er) instance with same characteristics of the problem at hand to play with is
often very instructive.
A. Lodi, How to use your favorite MIP Solver
16
Tightening the formulation (cont.d)
• Model characteristics from which to derive cuts are
– Linear or logical combinations of constraints.
As discussed, combination of constraints is the base of current cut generation techniques.
The knowledge of the problem at hand can suggest which constraints should be combined.
– The optimization of one or more related models.
Extract a small(er) instance with same characteristics of the problem at hand to play with is
often very instructive.
– Use of the incumbent solution objective value.
Template cuts are based on detecting infeasibilities, while optimality cuts might lead in some
special cases to effective partitions of the solution space.
A. Lodi, How to use your favorite MIP Solver
16
Tightening the formulation (cont.d)
• Model characteristics from which to derive cuts are
– Linear or logical combinations of constraints.
As discussed, combination of constraints is the base of current cut generation techniques.
The knowledge of the problem at hand can suggest which constraints should be combined.
– The optimization of one or more related models.
Extract a small(er) instance with same characteristics of the problem at hand to play with is
often very instructive.
– Use of the incumbent solution objective value.
Template cuts are based on detecting infeasibilities, while optimality cuts might lead in some
special cases to effective partitions of the solution space.
– Disjunctions.
A. Lodi, How to use your favorite MIP Solver
16
Tightening the formulation (cont.d)
• Model characteristics from which to derive cuts are
– Linear or logical combinations of constraints.
As discussed, combination of constraints is the base of current cut generation techniques.
The knowledge of the problem at hand can suggest which constraints should be combined.
– The optimization of one or more related models.
Extract a small(er) instance with same characteristics of the problem at hand to play with is
often very instructive.
– Use of the incumbent solution objective value.
Template cuts are based on detecting infeasibilities, while optimality cuts might lead in some
special cases to effective partitions of the solution space.
– Disjunctions.
– The exploitation of infeasibility.
Infeasibility considerations on the model might allow to remove useless pieces of the search
tree.
A. Lodi, How to use your favorite MIP Solver
16
Tightening the formulation, Example 1
• The very small MIP
13429x1 + 26850x2 + 26855x3 + 40280x4
+
40281x5 + 53711x6 + 53714x7 + 67141x8
=
xj ≥ 0, integer, j = 1, . . . , 8
45094583
(12)
(13)
presents the following (disappointing) computational behavior:
A. Lodi, How to use your favorite MIP Solver
17
644
645
Running CPLEX 12.2.0.2 with default settings results in no conclusion after over 7 hours and
2 billion nodes, as illustrated in Node Log #7:
Tightening the formulation, Example 1 (cont.d)
646
647
Node Log #7
Nodes
648
649
650
651
652
Node
Cuts/
Left
Objective
IInf
2054970910 13066
0.0000
1
Best Integer
Best Node
ItCnt
...
Elapsed real time = 27702.98 sec. (tree size =
0.0000 25234328
2.70 MB, solutions = 0)
653
2067491472 14446
0.0000
1
0.0000 25388082
654
2080023238 12892
0.0000
1
0.0000 25542160
655
2092548561 15366
0.0000
1
0.0000 25696280
656
...
-------
657
658
Gap
Total (root+branch&cut) = 28302.29 sec.
659
660
661
MIP - Node limit exceeded, no integer solution.
662
Current MIP best bound =
663
Solution time = 28302.31 sec.
0.0000000000e+00 (gap is infinite)
Iterations = 25787898
Nodes = 2100000004 (16642)
664
665
However, note that all the coefficients in the model are very close to integer multiples of the
666
coefficient of x1 . Therefore, we can separate the left hand side into the part that is an integer
667
multiple of this coefficient, and the much smaller remainder terms:
A. Lodi, How to use your favorite MIP Solver
18
x
ˆ ≥ 3359 ⇒ −8x2 − 3x3 − 7x4 − 6x5 − 5x6 − 2x7 − 4x8 ≤ −13428
674
675
(23)
This analysis shows that we either have an infeasible model, or that constraints (24) (using the
Tightening the formulation, Example 1 (cont.d)
infeasibility argument above) and (25) (multiplying 23 through by -1) are globally valid cuts.
x + 2x + 2x + 3x + 3x + 4x + 4x + 5x ≥ 3359
(24)
8x2 + 3x3 + 7x4 + 6x5 + 5x6 + 2x7 + 4x8 ≥ 13428
(25)
1
4
5
6
7
8
• The behavior is then improved
by2 the3 addition
of the
two
cuts
x1 + 2x2 + 2x3 + 3x4 + 3x5 + 4x6 + 4x7 + 5x8 ≥ 3359
(14)
+ 3x3 + 7x4 + 6x5 + 5x6 + 2x7 + 4x8 ≥ 13428
(15)
676
Adding these cuts enables CPLEX 12.2.0.2 to easily identify that the model is infeasible (see Node
677
Log #8).
8x2
678
679
Node Log #8
680
Nodes
681
Cuts/
Node
Left
Objective
IInf
684
0
0
0.0000
685
0
0
686
0
687
0
682
Best Integer
Best Node
ItCnt
1
0.0000
1
0.0000
2
MIRcuts: 1
3
0
0.0000
2
MIRcuts: 1
5
0
cutoff
Gap
683
5
688
Elapsed real time =
0.23 sec. (tree size =
689
Mixed integer rounding cuts applied:
690
...
691
MIP - Integer infeasible.
692
Current MIP best bound is infinite.
693
Solution time =
0.46 sec.
0.00 MB, solutions = 0)
1
Iterations = 5
Nodes = 0
28
A. Lodi, How to use your favorite MIP Solver
19
Tightening the formulation, Example 2
• The following Mixed Integer Quadratic Program
max
n
n
X
X
dij xixj
(16)
xj ≤ k
(17)
n
(18)
i=1 j=i+1
n
X
subject to
j=1
x ∈ {0, 1}
can be classically reformulated as a MIP by binary variables zij = xixj and constraints
zij
≤
xi ,
∀i, j
(19)
zij
≤
xj ,
∀i, j
(20)
xi + xj
≤
1 + zij
∀i, j.
(21)
• The performance of Cplex solver are as follows.
A. Lodi, How to use your favorite MIP Solver
20
723
hours, terminating when the size of the swap file for the branch-and-bound tree exceeds memory
724
limits. At that point the solution has an objective value of 3483.0000, proven to be within 51.32% of
! optimal. Although we do not provide the output here, the original MIQP formulation in (M IQP )
726 ! performs even worse.
!
727
!
725
Tightening the formulation, Example 2 (cont.d)
Node Log #9
728
Nodes
729
Node
730
Cuts/
Left
Objective
IInf
Best Integer
Best Node
ItCnt
Gap
2247
---
731
732
*
733
734
*
0+
0
0
0
0+
0.0000
7640.4000
1830
0.0000
7640.4000
2247
---
0
19.0000
7640.4000
2247
---
0+
0
3185.0000
7445.4286
2286
133.77%
0
2
3185.0000
7445.4286
2286
133.77%
735
736
...
737
738
*
739
740
Elapsed real time =
35
741
742
743
744
746
745
747
7628.5333
37
1829
4.09 sec. (tree size =
6579.2308
1378
3185.0000
7445.4286
6615
133.77%
...
4332613 3675298
4936.6750
1099
3483.0000
5270.8377 1.78e+08
51.33%
4341075 3682375
...
3889.4643
714
3483.0000
5270.4545 1.79e+08
51.32%
CPLEX Error
!
1803: Failure on temporary file write.
748
749
0.01 MB, solutions = 8)
30
Solution pool: 25 solutions saved.
750
751
MIP - Error termination, no tree:
752
Current MIP best bound =
753
Solution time = 15031.18 sec.
754
755
756
757
Objective =
3.4830000000e+03
5.2704102564e+03 (gap = 1787.41, 51.32%)
Iterations = 178699476
Nodes = 4342299 (3682262)
!
!
!
!
Experimentation with non-default parameter settings as described in Section 3 yields modest
!
to enabling
A. Lodi, but
Howdoes
to not
usecome
yourclose
favorite
MIP CPLEX
Solver to find an optimal solution
! performance improvements,
to the model.
21
797
795
!
798
796
!
797
!
799
798
!
800
!
799
!
best node value that was essential to solving the model to optimality in a reasonable amount of
!the cut. Furthermore, the cut enabled CPLEX to add numerous zero-half cuts to the model that
time.
could not with the original formulation. The zero-half cuts resulted in additional progress in the
!it
!
!best node value that was essential to solving the model to optimality in a reasonable amount of
!
!
!time.
Node Log #10
!
Nodes
Cuts/
!
Tightening the formulation, Example 2, improved
Node
Node Log
Left#10 Objective
800
IInf
Best Integer
Nodes
*
0+ Left
0
Node
0
0
*
0+
0
...
0
0
*
0+
0
...
0
2
Gap
Objective
IInf
0.0000
Best Integer
Best Node
1161
ItCnt
--Gap
4552.4000
750
0.0000
4552.4000
1161
---
6.0000
0.0000
4552.4000
1161
---
0.0000
4552.4000
1161
---
3477.0000
6.0000
3924.7459
4552.4000
37882
1161
12.88%
---
3477.0000
3924.7459
37882
12.88%
51.42 sec. (tree 3477.0000
size = 0.01 MB,
solutions 37882
= 31)
3924.7459
12.88%
4552.4000
3924.7459
750
1281
39886
37882
12.88%
12.88%
2 real4time =
3910.8201
1243
3477.0000
3924.7459
Elapsed
51.42 sec.
(tree size
= 0.01 MB,
solutions =42289
31)
12.88%
3
1
3
2
ItCnt
Cuts/
Elapsed
*
0+real0time =
1
0
Best Node
5
3
3919.3378 1281
1212
3924.7459
3910.8041 1212
1144
3919.3378
3477.0000
3477.0000
3477.0000
3477.0000
3924.7459
3924.7459
3919.3355
3924.7459
44070
39886
12.72%
12.88%
...
2
4
3910.8201 1243
3477.0000
3924.7459
42289
12.88%
125571 7819
cutoff
3590.0000
3599.7046 60456851
0.27%
3
5
3910.8041 1144
3477.0000
3919.3355
44070
12.72%
33
Elapsed real time = 9149.19 sec. (tree size = 234.98 MB, solutions = 43)
...
Nodefile
size = 196.38
MB (168.88 MB after
compression)
125571 7819
cutoff
3590.0000
3599.7046 60456851
0.27%
33
*126172 real
7231time =integral
60571398
Elapsed
9149.19 sec.0(tree3591.0000
size = 234.98 3599.7046
MB, solutions
= 43) 0.24%
127700 size
5225 = 196.38
cutoff
3591.0000
3598.0159 60769494
Nodefile
MB (168.88 MB after
compression)
131688 7231
6
cutoff
3591.0000
3592.5939 60571398
60980430
*126172
integral
0
3591.0000
3599.7046
127700 5225
cutoff
Zero-half
cuts
2244
131688
6 applied:
cutoff
!
!
0.20%
0.04%
0.24%
3591.0000
3598.0159 60769494
0.20%
3591.0000
3592.5939 60980430
0.04%
Solution
solutions
saved.
Zero-halfpool:
cuts 44
applied:
2244
!
MIP - Integer
solution:
Objective = 3.5910000000e+03
Solution
pool:optimal
44 solutions
saved.
Solution time = 9213.79 sec. Iterations = 60980442 Nodes = 131695
!
!
! MIP - Integer optimal solution: Objective = 3.5910000000e+03
!
801
sec. Iterations = 60980442 Nodes = 131695
!
! Solution time =A.9213.79
Lodi,
How
to use ayour
MIP
Solver
802
Given
the
modest
size
of
the model,
run favorite
time of 2.5
hours
to optimality suggests potential
!
803 ! for additional improvements in the formulation. However, by adding one globally valid cut, we see
801
22
MIP Challenges
• Overall, a big challenge from both performance and modeling viewpoints is accuracy, which is
somehow a new issue, i.e., an old issue that starts to be very important after realizing that MIP
solvers can now really solve the problems.
A. Lodi, How to use your favorite MIP Solver
23
MIP Challenges
• Overall, a big challenge from both performance and modeling viewpoints is accuracy, which is
somehow a new issue, i.e., an old issue that starts to be very important after realizing that MIP
solvers can now really solve the problems.
The MIPlib 2010 paper [Koch et al. 2011] includes, for the first time, scripts to run automated
tests in a predefined way, and a solution checker to test the accuracy of provided solutions
using exact arithmetic.
A. Lodi, How to use your favorite MIP Solver
23
MIP Challenges
• Overall, a big challenge from both performance and modeling viewpoints is accuracy, which is
somehow a new issue, i.e., an old issue that starts to be very important after realizing that MIP
solvers can now really solve the problems.
The MIPlib 2010 paper [Koch et al. 2011] includes, for the first time, scripts to run automated
tests in a predefined way, and a solution checker to test the accuracy of provided solutions
using exact arithmetic.
• Some difficult MIPs are encountered because of:
– bad modeling, i.e.,
∗ the model has numerical difficulties,
∗ the MIP modeling capability is not sufficient wrt the real problem;
– large size;
– knapsack constraints with huge coefficients and general-integer variables with large bounds;
– scheduling components with disjunctive constraints and fundamental continuous variables.
A. Lodi, How to use your favorite MIP Solver
23
MIP Challenges, performance
• The performance of MIP solvers can/must be improved in many different directions.
A. Lodi, How to use your favorite MIP Solver
24
MIP Challenges, performance
• The performance of MIP solvers can/must be improved in many different directions.
Among them, my favorite ones are:
– branching vs cutting
– sophisticated techniques for general-integer and continuous variables
– performance variability
– revisiting good “old” methods
– cutting plane exploitation
– symmetric MIPs
A. Lodi, How to use your favorite MIP Solver
24
MIP Challenges: branching vs cutting
αT x = α0
αT x = α0 + 1
x∗
-
A. Lodi, How to use your favorite MIP Solver
25
MIP Challenges: branching vs cutting
αT x = α0
αT x = α0 + 1
x∗
-
R
/
A. Lodi, How to use your favorite MIP Solver
25
MIP Challenges: branching vs cutting
αT x = α0
αT x = α0 + 1
x∗
-
β T x = β0
x∗
W
W
/
x
∗,1
x
∗,2
R
first wisdom
A. Lodi, How to use your favorite MIP Solver
25
MIP Challenges: branching vs cutting
αT x = α0
αT x = α0 + 1
x∗
αT x = α0 + 1
αT x = α0
-
x∗
@
@
@
β T x = β0
@
@
@
β T x = β0
x∗
@
@
@
B
BN
@
@
W
@
W
/
x
∗,1
x
∗,2
@
R
R
/
N
first wisdom
A. Lodi, How to use your favorite MIP Solver
25
MIP Challenges: branching vs cutting
αT x = α0
αT x = α0 + 1
x∗
αT x = α0 + 1
αT x = α0
-
x∗
@
@
@
β T x = β0
@
@
@
β T x = β0
x∗
@
@
@
B
BN
@
@
W
@
W
/
x
∗,1
x
∗,2
@
R
R
/
N
first wisdom
A. Lodi, How to use your favorite MIP Solver
25
MIP Challenges: branching vs cutting
αT x = α0
αT x = α0 + 1
x∗
αT x = α0 + 1
αT x = α0
-
x∗
@
@
@
β T x = β0
@
@
@
β T x = β0
x∗
@
@
@
B
BN
@
@
W
@
W
/
x
∗,1
x
∗,2
@
R
R
/
N
second wisdom
first wisdom
A. Lodi, How to use your favorite MIP Solver
25
MIP Challenges, branching vs cutting (cont.d)
• The previous slide highlights a possibility of using traditional cutting plane theory in the
branching context [Karamanov & Cornu´ejols 2005, 2010]
A. Lodi, How to use your favorite MIP Solver
26
MIP Challenges, branching vs cutting (cont.d)
• The previous slide highlights a possibility of using traditional cutting plane theory in the
branching context [Karamanov & Cornu´ejols 2005, 2010]
• It seems that a better coordination of these two fundamental ingredients of the MIP solvers is
crucial for strong improvements.
A. Lodi, How to use your favorite MIP Solver
26
MIP Challenges, branching vs cutting (cont.d)
• The previous slide highlights a possibility of using traditional cutting plane theory in the
branching context [Karamanov & Cornu´ejols 2005, 2010]
• It seems that a better coordination of these two fundamental ingredients of the MIP solvers is
crucial for strong improvements.
• In the context of hard knapsack constraints branching on variables is not effective while (pure)
basis reduction methods have proven to be very powerful [Eisenbrand; Aardal; Pataki; . . . ].
A. Lodi, How to use your favorite MIP Solver
26
MIP Challenges, branching vs cutting (cont.d)
• The previous slide highlights a possibility of using traditional cutting plane theory in the
branching context [Karamanov & Cornu´ejols 2005, 2010]
• It seems that a better coordination of these two fundamental ingredients of the MIP solvers is
crucial for strong improvements.
• In the context of hard knapsack constraints branching on variables is not effective while (pure)
basis reduction methods have proven to be very powerful [Eisenbrand; Aardal; Pataki; . . . ].
• On the other hand, a tight integration of basis reduction techniques within MIP solvers has not
yet been achieved. One possibility for such an integration is the use of partial reformulations
but an intriguing option is exploiting these reformulations to generate cuts in the original space
of variables [Aardal & Wolsey 2009].
A. Lodi, How to use your favorite MIP Solver
26
MIP Challenges, branching vs cutting (cont.d)
• The previous slide highlights a possibility of using traditional cutting plane theory in the
branching context [Karamanov & Cornu´ejols 2005, 2010]
• It seems that a better coordination of these two fundamental ingredients of the MIP solvers is
crucial for strong improvements.
• In the context of hard knapsack constraints branching on variables is not effective while (pure)
basis reduction methods have proven to be very powerful [Eisenbrand; Aardal; Pataki; . . . ].
• On the other hand, a tight integration of basis reduction techniques within MIP solvers has not
yet been achieved. One possibility for such an integration is the use of partial reformulations
but an intriguing option is exploiting these reformulations to generate cuts in the original space
of variables [Aardal & Wolsey 2009].
• Branching on appropriate disjunctions has been recently proposed in the context of highly
symmetric MIPs [Ostrowsky, Linderoth, Rossi & Smriglio 2009].
A. Lodi, How to use your favorite MIP Solver
26
MIP Challenges, branching vs cutting (cont.d)
• The previous slide highlights a possibility of using traditional cutting plane theory in the
branching context [Karamanov & Cornu´ejols 2005, 2010]
• It seems that a better coordination of these two fundamental ingredients of the MIP solvers is
crucial for strong improvements.
• In the context of hard knapsack constraints branching on variables is not effective while (pure)
basis reduction methods have proven to be very powerful [Eisenbrand; Aardal; Pataki; . . . ].
• On the other hand, a tight integration of basis reduction techniques within MIP solvers has not
yet been achieved. One possibility for such an integration is the use of partial reformulations
but an intriguing option is exploiting these reformulations to generate cuts in the original space
of variables [Aardal & Wolsey 2009].
• Branching on appropriate disjunctions has been recently proposed in the context of highly
symmetric MIPs [Ostrowsky, Linderoth, Rossi & Smriglio 2009].
• Finally, the use of bilevel programming for computing strong multiple disjunctions (i.e.,
disjunctions involving more than 2 children) has been recently shown to be effective for special
0-1 MIPs [Lodi, Ralphs, Rossi & Smriglio 2011].
A. Lodi, How to use your favorite MIP Solver
26
MIP Challenges, performance (cont.d)
• A very important class of MIPs is 0/1 IPs. Many of the sophisticated techniques already
discussed have been originally proposed for this class and eventually extended to general MIPs.
A. Lodi, How to use your favorite MIP Solver
27
MIP Challenges, performance (cont.d)
• A very important class of MIPs is 0/1 IPs. Many of the sophisticated techniques already
discussed have been originally proposed for this class and eventually extended to general MIPs.
• For example, branching on variables is particularly natural and effective in the 0/1 case while it
is not when general-integer variables play a central role.
A. Lodi, How to use your favorite MIP Solver
27
MIP Challenges, performance (cont.d)
• A very important class of MIPs is 0/1 IPs. Many of the sophisticated techniques already
discussed have been originally proposed for this class and eventually extended to general MIPs.
• For example, branching on variables is particularly natural and effective in the 0/1 case while it
is not when general-integer variables play a central role.
• Another example are the models in which continuous variables are important: for those
variables MIP solvers do not do much (heuristics, strengthening, . . . ).
A. Lodi, How to use your favorite MIP Solver
27
MIP Challenges, performance (cont.d)
• A very important class of MIPs is 0/1 IPs. Many of the sophisticated techniques already
discussed have been originally proposed for this class and eventually extended to general MIPs.
• For example, branching on variables is particularly natural and effective in the 0/1 case while it
is not when general-integer variables play a central role.
• Another example are the models in which continuous variables are important: for those
variables MIP solvers do not do much (heuristics, strengthening, . . . ).
• A (urgent) MIP challenge is definitely dealing with general-integer and continuous variables
with special-purpose techniques.
A. Lodi, How to use your favorite MIP Solver
27
MIP Challenges, performance (cont.d)
• A very important class of MIPs is 0/1 IPs. Many of the sophisticated techniques already
discussed have been originally proposed for this class and eventually extended to general MIPs.
• For example, branching on variables is particularly natural and effective in the 0/1 case while it
is not when general-integer variables play a central role.
• Another example are the models in which continuous variables are important: for those
variables MIP solvers do not do much (heuristics, strengthening, . . . ).
• A (urgent) MIP challenge is definitely dealing with general-integer and continuous variables
with special-purpose techniques.
• Cutting plane generation has been a key step for the success of MIP solvers but: are we using
cuts in the best way?
A. Lodi, How to use your favorite MIP Solver
27
MIP Challenges, performance (cont.d)
• A very important class of MIPs is 0/1 IPs. Many of the sophisticated techniques already
discussed have been originally proposed for this class and eventually extended to general MIPs.
• For example, branching on variables is particularly natural and effective in the 0/1 case while it
is not when general-integer variables play a central role.
• Another example are the models in which continuous variables are important: for those
variables MIP solvers do not do much (heuristics, strengthening, . . . ).
• A (urgent) MIP challenge is definitely dealing with general-integer and continuous variables
with special-purpose techniques.
• Cutting plane generation has been a key step for the success of MIP solvers but: are we using
cuts in the best way?By far not!
A. Lodi, How to use your favorite MIP Solver
27
MIP Challenges, performance (cont.d)
• A very important class of MIPs is 0/1 IPs. Many of the sophisticated techniques already
discussed have been originally proposed for this class and eventually extended to general MIPs.
• For example, branching on variables is particularly natural and effective in the 0/1 case while it
is not when general-integer variables play a central role.
• Another example are the models in which continuous variables are important: for those
variables MIP solvers do not do much (heuristics, strengthening, . . . ).
• A (urgent) MIP challenge is definitely dealing with general-integer and continuous variables
with special-purpose techniques.
• Cutting plane generation has been a key step for the success of MIP solvers but: are we using
cuts in the best way?By far not!
• Fundamental questions about the use of cutting planes remain open, among which:
– stabilization/saturation issues,
– cut selection,
– cut interaction.
A. Lodi, How to use your favorite MIP Solver
27
MIP Challenges, performance (cont.d)
• The already discussed performance variability (some good/neutral features that might not be
monotonically helpful, or, worse, can deteriorate performance) [Koch et al. 2011] is due to
imperfect tie-breaking but is also related to the interaction of key ingredients of MIP.
A. Lodi, How to use your favorite MIP Solver
28
MIP Challenges, performance (cont.d)
• The already discussed performance variability (some good/neutral features that might not be
monotonically helpful, or, worse, can deteriorate performance) [Koch et al. 2011] is due to
imperfect tie-breaking but is also related to the interaction of key ingredients of MIP.
• This is the case of finding a (near-)optimal solution very early in the search tree that explicitly
improves the quality of the primal bound but might sometimes hurt in proving optimality (or at
least does not help).
A. Lodi, How to use your favorite MIP Solver
28
MIP Challenges, performance (cont.d)
• The already discussed performance variability (some good/neutral features that might not be
monotonically helpful, or, worse, can deteriorate performance) [Koch et al. 2011] is due to
imperfect tie-breaking but is also related to the interaction of key ingredients of MIP.
• This is the case of finding a (near-)optimal solution very early in the search tree that explicitly
improves the quality of the primal bound but might sometimes hurt in proving optimality (or at
least does not help).
• A deeper understanding through sophisticated testing techniques is needed [Hooker; McGeoch;
Margot].
A. Lodi, How to use your favorite MIP Solver
28
MIP Challenges, performance (cont.d)
• The already discussed performance variability (some good/neutral features that might not be
monotonically helpful, or, worse, can deteriorate performance) [Koch et al. 2011] is due to
imperfect tie-breaking but is also related to the interaction of key ingredients of MIP.
• This is the case of finding a (near-)optimal solution very early in the search tree that explicitly
improves the quality of the primal bound but might sometimes hurt in proving optimality (or at
least does not help).
• A deeper understanding through sophisticated testing techniques is needed [Hooker; McGeoch;
Margot].
• The negative example suggests an additional very crucial question: besides avoiding good primal
solutions hurting the optimality proof, how can we use them to have instead a strong speed up?
A. Lodi, How to use your favorite MIP Solver
28
MIP Challenges, performance (cont.d)
• The already discussed performance variability (some good/neutral features that might not be
monotonically helpful, or, worse, can deteriorate performance) [Koch et al. 2011] is due to
imperfect tie-breaking but is also related to the interaction of key ingredients of MIP.
• This is the case of finding a (near-)optimal solution very early in the search tree that explicitly
improves the quality of the primal bound but might sometimes hurt in proving optimality (or at
least does not help).
• A deeper understanding through sophisticated testing techniques is needed [Hooker; McGeoch;
Margot].
• The negative example suggests an additional very crucial question: besides avoiding good primal
solutions hurting the optimality proof, how can we use them to have instead a strong speed up?
• Good “old” methods have been rediscovered and revisited during the years, Gomory Mixed
Integer cuts being the most noticeable example. Recently:
– strong Benders cutting planes [Fischetti, Salvagnin & Zanette 2009];
– cutting plane use with the lexicographic simplex [Zanette, Fischetti & Balas 2010];
– cutting planes from group relaxation [Gomory; Richard; Dey; Wolsey; Dash & G¨
unl¨
uk;. . . ].
A. Lodi, How to use your favorite MIP Solver
28
MIP Challenges, the modeling viewpoint
• Besides developing additional tools in the spirit of the ones described before
(among all possible I would like
a tool for detecting minimal sources of numerical instability)
A. Lodi, How to use your favorite MIP Solver
29
MIP Challenges, the modeling viewpoint
• Besides developing additional tools in the spirit of the ones described before
(among all possible I would like
a tool for detecting minimal sources of numerical instability)
the main challenge from a modeling/application viewpoint seems to be dissemination.
A. Lodi, How to use your favorite MIP Solver
29
MIP Challenges, the modeling viewpoint
• Besides developing additional tools in the spirit of the ones described before
(among all possible I would like
a tool for detecting minimal sources of numerical instability)
the main challenge from a modeling/application viewpoint seems to be dissemination.
• More precisely, an interesting direction would be extending the modeling (and solving)
capability of the MIP framework.
A. Lodi, How to use your favorite MIP Solver
29
MIP Challenges, the modeling viewpoint
• Besides developing additional tools in the spirit of the ones described before
(among all possible I would like
a tool for detecting minimal sources of numerical instability)
the main challenge from a modeling/application viewpoint seems to be dissemination.
• More precisely, an interesting direction would be extending the modeling (and solving)
capability of the MIP framework.
• Two successful stories in this direction are:
1. SCIP (Solving Constraint Integer Programs [Achterberg 2007]) whose main feature is a tight
integration of Constraint Programming (CP) and SATisfiability techniques within an MIP
solver.
2. Bonmin (Basic Open-source Nonlinear Mixed INteger programming [Bonami et al. 2008])
has been developed for Convex MINLP within the framework of the MIP solver Cbc [Forrest].
A. Lodi, How to use your favorite MIP Solver
29
MIP Modeling, CP and SCIP
• SCIP can handle arbitrary (non-linear) constraints in a Constraint Programming fashion
A. Lodi, How to use your favorite MIP Solver
30
MIP Modeling, CP and SCIP
• SCIP can handle arbitrary (non-linear) constraints in a Constraint Programming fashion
– A
global
constraint
defines
combinatorially a portion of the
feasible region, i.e., it is able to check
feasibility of an assignment of values
to variables.
A. Lodi, How to use your favorite MIP Solver
30
MIP Modeling, CP and SCIP
• SCIP can handle arbitrary (non-linear) constraints in a Constraint Programming fashion
– A
global
constraint
defines
combinatorially a portion of the
feasible region, i.e., it is able to check
feasibility of an assignment of values
to variables.
– Moreover, a global constraint contains
an algorithm that prunes (filters) values
from the variable domains so as to
reduce as much as possible the search
space.
A. Lodi, How to use your favorite MIP Solver
30
MIP Modeling, CP and SCIP
• SCIP can handle arbitrary (non-linear) constraints in a Constraint Programming fashion
– A
global
constraint
defines
combinatorially a portion of the
feasible region, i.e., it is able to check
feasibility of an assignment of values
to variables.
– Moreover, a global constraint contains
an algorithm that prunes (filters) values
from the variable domains so as to
reduce as much as possible the search
space.
A. Lodi, How to use your favorite MIP Solver
30
MIP Modeling, CP and SCIP
• SCIP can handle arbitrary (non-linear) constraints in a Constraint Programming fashion
– A
global
constraint
defines
combinatorially a portion of the
feasible region, i.e., it is able to check
feasibility of an assignment of values
to variables.
– Moreover, a global constraint contains
an algorithm that prunes (filters) values
from the variable domains so as to
reduce as much as possible the search
space.
• In other words, a higher-level modeling layer has been added, of which MIP is just one of the
options, so as to allow a beneficial interaction among different modeling and solving
technologies.
A. Lodi, How to use your favorite MIP Solver
30
MIP Modeling, CP and SCIP
• SCIP can handle arbitrary (non-linear) constraints in a Constraint Programming fashion
– A
global
constraint
defines
combinatorially a portion of the
feasible region, i.e., it is able to check
feasibility of an assignment of values
to variables.
– Moreover, a global constraint contains
an algorithm that prunes (filters) values
from the variable domains so as to
reduce as much as possible the search
space.
• In other words, a higher-level modeling layer has been added, of which MIP is just one of the
options, so as to allow a beneficial interaction among different modeling and solving
technologies.
• This is especially effective for those applications, like some classes of scheduling problems, in
which none of those technologies, in isolation, would outperform the others [Heinz & Beck
2012].
A. Lodi, How to use your favorite MIP Solver
30
MIP Modeling, Convex (and Non-Convex) MINLPs and Bonmin
• A network design example in water distribution, instance fossolo
• The model does not have special difficulties besides the so-called Hazen-Williams equation
modeling pressure loss in water pipes. However, such an equation is very “bad” . . .
A. Lodi, How to use your favorite MIP Solver
31
MIP Modeling, Convex (and Non-Convex) MINLPs and Bonmin
• A network design example in water distribution, instance fossolo
• The model does not have special difficulties besides the so-called Hazen-Williams equation
modeling pressure loss in water pipes. However, such an equation is very “bad” . . .
• A classical MIP model from the 80’s linearizes such an equation BUT Cplex does not find any
feasible solution for fossolo in 2 days of CPU time (!!) while Bonmin finds a very accurate
one in few seconds.
A. Lodi, How to use your favorite MIP Solver
31
MIP Modeling, Convex (and Non-Convex) MINLPs and Bonmin
• A network design example in water distribution, instance fossolo
• The model does not have special difficulties besides the so-called Hazen-Williams equation
modeling pressure loss in water pipes. However, such an equation is very “bad” . . .
• A classical MIP model from the 80’s linearizes such an equation BUT Cplex does not find any
feasible solution for fossolo in 2 days of CPU time (!!) while Bonmin finds a very accurate
one in few seconds. Using the diameters computed by Bonmin, the MIP does not certify the
solution to be feasible even allowing 1,000 linearization points.
A. Lodi, How to use your favorite MIP Solver
31
End of the course: concluding remarks
• We have seen
1. The building blocks of a MIP solver.
2. How to use a MIP solver as a sophisticated (heuristic) framework.
3. Modeling and algorithmic tips to make a solver effective in practice.
A. Lodi, How to use your favorite MIP Solver
32
End of the course: concluding remarks
• We have seen
1. The building blocks of a MIP solver.
2. How to use a MIP solver as a sophisticated (heuristic) framework.
3. Modeling and algorithmic tips to make a solver effective in practice.
Finally, we discussed some MIP Challenges.
A. Lodi, How to use your favorite MIP Solver
32
End of the course: concluding remarks
• We have seen
1. The building blocks of a MIP solver.
2. How to use a MIP solver as a sophisticated (heuristic) framework.
3. Modeling and algorithmic tips to make a solver effective in practice.
Finally, we discussed some MIP Challenges.
• In summary, MIP technology provides, through its commercial and noncommercial solvers, a
challenging, reliable, flexible and effective environment for application-oriented optimization.
1.
2.
3.
4.
challenging: a lot of good theoretical, methodological and experimental work is needed;
reliable: the software tools are stable;
flexible: it is open to hybridization, cannibalization, extensions;
effective: problems that were conceived as impossible only few years ago can regularly be
solved nowadays.
A. Lodi, How to use your favorite MIP Solver
32
End of the course: concluding remarks
• We have seen
1. The building blocks of a MIP solver.
2. How to use a MIP solver as a sophisticated (heuristic) framework.
3. Modeling and algorithmic tips to make a solver effective in practice.
Finally, we discussed some MIP Challenges.
• In summary, MIP technology provides, through its commercial and noncommercial solvers, a
challenging, reliable, flexible and effective environment for application-oriented optimization.
1.
2.
3.
4.
challenging: a lot of good theoretical, methodological and experimental work is needed;
reliable: the software tools are stable;
flexible: it is open to hybridization, cannibalization, extensions;
effective: problems that were conceived as impossible only few years ago can regularly be
solved nowadays.
• All of the above look like solid reasons for developing the skills for using (and, why not,
improving on) the MIP technology.
A. Lodi, How to use your favorite MIP Solver
32