Transcript CPLEX 6.5
A New Generation of Mixed-Integer Programming Codes Robert E. Bixby and Mary Fenelon, Zongao Gu, Javier Lafuente, Ed Rothberg, Roland Wunderling ILOG, Inc 23 March 2002 CPAIOR ‘02 1 Outline • LP – Overview – Computational results • MIP – – – – – Examples Historical view Features Computational results One more example -- future 23 March 2002 CPAIOR ‘02 2 LP 23 March 2002 CPAIOR ‘02 3 LP A linear program (LP) is an optimization problem of the form Maxim ize SubjectTo 23 March 2002 T c x Ax b l xu CPAIOR ‘02 4 LP What’s the biggest change? • 1988 – One algorithm for LP – Primal simplex (Dantzig, 1947) • Today – Three algorithms for LP – Primal simplex – Dual simplex (Lemke, 1954) – Barrier (Karmarkar, 1984) 23 March 2002 CPAIOR ‘02 5 LP Progress: 1988 – Present • Algorithms – Simplex algorithms – Simplex + barrier algorithms 960x 2360x • Machines – Simplex algorithms – Barrier algorithms 800x 13000x Total: Over 2000000x 23 March 2002 CPAIOR ‘02 6 LP Algorithm Comparison Size (#rows) > 0 > 10000 >100000 #Models Prim/ Dual Dual/ Bar 680 248 73 1.5 2.0 2.1 1.1 1.0 1.6 Bar/ Simp 1.1 1.2 0.9 Key: Ratio > 1 means denominator better 23 March 2002 CPAIOR ‘02 7 MIP 23 March 2002 CPAIOR ‘02 8 LP A mixed-integer program (MIP) is an optimization problem of the form cT x Maxim ize Subjectto Ax b l xu some or all x j int eger 23 March 2002 CPAIOR ‘02 9 MIP Example 1: LP still can be HARD SGM: Schedule Generation Model 157323 rows, 182812 columns, 6348437 nzs • LP relaxation at root node: – Barrier: Solve time estimate 3-6 days. – Primal steepest edge: 64,000 seconds • Branch-and-bound – 368 nodes enumerated, infeasibility reduced by 3x. – Time: 2 weeks. • Currently “solved” by decomposition. 23 March 2002 CPAIOR ‘02 10 MIP Example 2: MIP really is HARD A Customer Model: 44 cons, 51 vars, 167 nzs, maximization 51 general integer variables (inf. bounds) Branch-and-Cut: Initial integer solution -2186.0 Initial upper bound -1379.4 …after 120,000 seconds, 32,000,000 B&C nodes, 5.5 Gig tree Integer solution and bound: UNCHANGED 23 March 2002 CPAIOR ‘02 11 MIP Example 2 (cont.): Avoid structures like Maximize x + y + z Subject To 2 x + 2 y 1 z = 0 x free y free x,y integer Note: This problem can be solved in several ways • Euclidean reduction on the constraint [Presolve] • Removing z=0, objective is integral [Presolve] • Bounds on variables (==> local cuts) However: Branch-and-bound cannot solve! 23 March 2002 CPAIOR ‘02 12 MIP • Example 3: A typical situation – Supply-chain scheduling Model description: – – • Initial modeling phase – – • Weekly model (repeated), daily buckets: Objective to minimize end-of-day inventory. Production (single facility), inventory, shipping (trucks), wholesalers (demand known) Simplified prototype + complicating constraints (consecutive day production, min truck constraints) RESULT: Couldn’t get good feasible solutions. Decomposition approach – – Talk to manual schedulers: They first decide on “producibles” schedule. Simulate using Constraint Programming. Fixed model: Fix variables and run MIP 23 March 2002 CPAIOR ‘02 13 MIP Supply-chain scheduling (continued): Solving the fixed model CPLEX 5.0: Integer optimal solution (0.0001/0): Objective = 1.5091900536e+05 Current MIP best bound = 1.5090391809e+05 (gap = 15.0873) Solution time = 3465.73 sec. Iterations = 7885711 Nodes = 489870 (2268) CPLEX 6.5: Implied bound cuts applied: Flow cuts applied: 200 55 Integer optimal solution (0.0001/1e-06): Objective = 1.5091904146e+05 Current MIP best bound = 1.5090843265e+05 (gap = 10.6088, 0.01%) Solution time = 1.53 sec. Iterations = 3187 Nodes = 58 (2) Original model: Now solves in 2 hours (20% improvement in solution quality) 23 March 2002 CPAIOR ‘02 14 MIP • Computational History: 1950 –1998 1954 Dantzig, Fulkerson, S. Johnson: 42 city TSP – Solved to optimality using cutting planes and solving LPs by hand • 1957 Gomory • 1960 Land, Doig, 1965 Dakin • 1971 MPSX/370, Benichou et al. 1972 UMPIRE, Forrest, Hirst, Tomlin (Beale) • • – Cutting plane algorithm: A complete solution – B&B – SOS, pseudo-costs, best projection, … 23 March 2002 CPAIOR ‘02 1972 – 1998 Good B&B remained the state-of-the-art in commercial codes, in spite of – 1973 Padberg – 1974 Balas (disjunctive programming) – 1983 Crowder, Johnson, Padberg: PIPX, pure 0/1 MIP – 1987 Van Roy and Wolsey: MPSARX, mixed 0/1 MIP – Grötschel, Padberg, Rinaldi …TSP (120, 666, 2392 city models solved) 15 MIP • 1998… A new generation of MIP codes Linear programming • Presolve • Cutting planes – Gomory, knapsack covers, – Stable, robust performance • Variable/node selection – Probing on dives (strong branching) • Primal heuristics – 8 different tried at root (one new one is local improvement) – Retried based upon success • Node presolve flow covers, mix-integer rounding, cliques, GUB covers, implied bounds, path cuts, disjunctive cuts – New features • Extensions of knapsacks • Aggregation for flow covers and MIR – Fast, incremental bound strengthening 23 March 2002 – Probing in constraints: xj ( uj) y, y = 0/1 xj ujy (for all j) CPAIOR ‘02 16 MIP Gomory Mixed Cut • Given y, xj Z+, and y + aijxj = d = d + f, f > 0 • Rounding: Where aij = aij + fj, define t = y + (aijxj: fj f) + (aijxj: fj > f) Z • Then (fj xj: fj f) + (fj-1)xj: fj > f) = d - t • Disjunction: t d (fjxj : fj f) f t d ((1-fj)xj: fj > f) 1-f • Combining: ((fj/f)xj: fj f) + ([(1-fj)/(1-f)]xj: fj > f) 1 23 March 2002 CPAIOR ‘02 17 MIP Computing Gomory Mixed Cuts 1. Make a an ordered list of “sufficiently” fractional variables. 2. Take the first 100. Compute corresponding tableau rows. Reject if coeff. range too big. 3. Add to LP. 4. Repeat twice. 5. Computed only at root. Slack cuts purged at end of root computation. 23 March 2002 CPAIOR ‘02 18 MIP Computational Results I: 964 models • Ran for 100,000 seconds (defaults) – CPLEX 5.0: Failed to solve 426 (44%) – CPLEX 8.0: Failed to solve 254 (26 %) • Among not solved (with CPLEX 8.0) – 109 had gap < 10% – 65 had no integral solution (7%) • With “mip emphasis feasibility”: 19 found no feasible solution (2.0%) 23 March 2002 CPAIOR ‘02 19 MIP Computational Results II: 651 models (all solvable) • Ran for 100,000 seconds (defaults) • Relative speedups: – – – – All models CPLEX 5.0 > 1 second CPLEX 5.0 > 10 seconds CPLEX 5.0 > 100 seconds 23 March 2002 CPAIOR ‘02 (651): 12x (447): 41x (362): 87x (281): 171x 20 MIP Computational Results III: 78 Models CPLEX 5.0 not solvable CPLEX new solvable < 1000 seconds • • • • • • • 23 March 2002 No cuts No presolve Old variable selection CPLEX 5.0 presolve Node presolve Heuristics Dive probing CPAIOR ‘02 33.3x 7.7x 2.7x 2.6x 1.3x 1.1x 1.1x 21 MIP Example: Network Design (France Telecom – C. Le Pape & L. Perron) • Construct a virtual private networks – Determine routes – Determine capacities • 6 additional constraints: 64 = 26 possibilities 1. Limit traffic at each node 2. Limit # of arcs in and out of nodes 3. Limit # of jumps 4. Symmetry constraint 5. 2-line constraint 6. Security constraint • 10 minute solve time limit 23 March 2002 CPAIOR ‘02 22 MIP CPLEX solve times (France Telecom): CPLEX 8.0: Default GUB cover cuts applied: 328 Cover cuts applied: 1290 Gomory fractional cuts applied: 2 Integer optimal solution: Objective = 1.6461200000e+05 Solution time = 525181.51 sec. Iterations = 469805329 Nodes = 3403990 10 Minutes: 34% gap CPLEX 8.0: Tuned with “mip emphasis” (4 processors) GUB cover cuts applied: 803 Cover cuts applied: 807 Gomory fractional cuts applied: 12 Integer optimal, tolerance (0.0001/1e-06) : Objective = 1.6461200000e+05 Current MIP best bound = 1.6459555512e+05 (gap = 16.4449, 0.01%) Solution time = 9275.43 sec. Iterations = 26528289 Nodes = 241051 (4219) 10 Minutes: 10% gap 23 March 2002 CPAIOR ‘02 23 MIP Faster integral solutions (France Telecom) : • Constraint Programming Approach – Build greedy initial solution. – “Sliced based search” to improve solution (Goals & propogation) • Results compared to CP approach – 33 cases CPLEX gives no integral solution – 31 remaining: 18 in which CPLEX produces better solutions • Now possible in CPLEX – – – – Advanced presolve (to use original problem representation) Concert technology (ILOG Solver-style modeling) Implemented local cuts Implemented ILOG Solver-style goals 23 March 2002 CPAIOR ‘02 24