integer programming: an introductiontw/school2013/ip-summer-school-1.pdf · solving integer...

142
Integer Programming: An Introduction Martin W. P. Savelsbergh University of Newcastle

Upload: others

Post on 02-Sep-2019

26 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Integer Programming: An Introduction Martin W. P. Savelsbergh University of Newcastle

Page 2: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

George Dantzig

Page 3: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program
Page 4: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Ralph Gomory

Page 5: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program
Page 6: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Ailsa Land Alison Doig

Page 7: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program
Page 8: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

George Nemhauser Laurence Wolsey

Page 9: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program
Page 10: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Zonghau Gu

Page 11: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

CPLEX – IP Solver GuRoBi – IP Solver

Page 12: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Natashia Boland

Page 13: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Will answer all questions about my presentation

Page 14: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Outline

• Some integer programs • Solving integer programs

– Branch-and-bound – Preprocessing – Primal heuristics – Valid inequalities

• Reformulation – Extended formulations – Column generation formulations

Page 15: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Some Integer Programs

Page 16: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Knapsack Problem

Variables

Parameters

Formulation

Page 17: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Node/Vertex Packing Parameters

Formulation

Variables

Page 18: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Economic Lotsizing

Variables

Parameters

Formulation

Page 19: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Generalized Assignment Problem Parameters

Variables

Formulation

Page 20: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Solving Integer Programs

• Three basic concepts – Divide and conquer

• Solve a problem by solving two smaller problems

– Relax • Remove a constraint to make the problem easier • Optimal value may improve

– Restrict • Add a constraint to make the problem smaller • Optimal value may worsen

Page 21: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Solving Integer Programs

Integer Program

Page 22: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Solving Integer Programs

Linear Programming Relaxation

Page 23: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Solving Integer Programs

Restricted Integer Program

Page 24: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Solving Integer Programs

• Divide and conquer

Divide and conquer: Solve original IP by solving two smaller restricted IPs

Page 25: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Solving Integer Programs

• Relaxation

• Restriction

Page 26: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Solving Integer Programs

• Recall: Solving linear programs is easy • What can happen if we solve the LP relaxation

of our integer program? – Infeasible

• IP is infeasible - stop

– Feasible & integer • Optimal IP solution – record & stop

– Feasible & fractional • Divide & conquer

Page 27: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Solving Integer Programs

Solve LP relaxation

Solve restricted IP Solve restricted IP

Branching

solution feasible & fractional

(xk fractional)

Page 28: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Solving Integer Programs

• Observation: When we solve the LP, we relax the problem. Therefore, the IP solution value will never be better

• Observation: When we branch, we restrict the problem. Therefore, the solution value will never improve

• Observation: If the value of the LP relaxation is worse than the value of the best known IP solution, then the restricted IP cannot provide a better solution

Page 29: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Solving Integer Programs

Solve LP relaxation

Bounding

Page 30: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Branch-and-Bound Tree/Search Tree root node

leaf node

open node

evaluated node

level / depth

Page 31: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Branch-and-Bound Tree/Search Tree

parent node

(right) child node

(left) child node

siblings

Page 32: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

How Can We Improve Basic Branch-and-Bound?

• Solve smaller linear programs • Improve linear programming bounds • Find feasible solutions quickly • Branch intelligently

Page 33: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Branch Intelligently

Page 34: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Branch Intelligently

• Key questions – Which variable to branch on? – What node to evaluate next?

Page 35: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Variable Selection

• Focus: improving global bound

• Algorithm – For all candidate variables calculate a score – Select the candidate with the highest score

• Score function

left child right child

Page 36: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Most Infeasible Branching

Page 37: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

If the goal is to improve the global bound, then quality of a branching has to be measured by the change in objective function value at the child nodes

Page 38: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Pseudocost Branching

observed per unit change in objective function at right child

sum of observed per unit change in objective function at right child over all branchings on the variable

number of branchings on the variable

average observed per unit change at right child for the variable

Page 39: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Pseudocost Branching

• Initialization? – Average over all known pseudocosts

Page 40: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Strong Branching

• Calculate change in objective function value at children of all candidate variables (i.e., solve two LPs)

• Efficiency – Restrict number of pivots – Restrict candidate set

• Dynamic – order by pseudocost – no improved candidate for k iterations

Page 41: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Hybrid Pseudocost/Strong Branching

• Strong branching up to level d in the tree and pseudocost branching for levels larger than d

• Pseudocost branching with strong branching initialization

Page 42: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Reliability Branching

• Generalizes pseudocost branching with strong branching initialization

• Use strong branching when pseudocosts are unreliable

Page 43: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

vpm2 neos3

strong branching

hybrid strong/pseudocost branching performs poorly on neos3, we can see why…

Page 44: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Recent Ideas

Perform one or more partial tree searches to determine “key” variables to branch on • Information-based branching • Backdoor branching

Restarts and backdoor are concept “borrowed” from constraint programming

Page 45: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Node selection

• Focus: finding (good) feasible solutions

• Static • Estimate-based • Backtracking

Page 46: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Static

• Best-bound – Guarantees that only nodes that have to be evaluated

are evaluated – May not be efficient since consecutive LPs differ

substantially • Depth-first

– Requires very little memory – Extremely efficient because consecutive LPs differ very

little – May evaluate many superfluous nodes

Page 47: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Estimate-based

• Best projection

per unit infeasibility cost

• Best estimate

Page 48: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Backtrack

• Goal: exploit advantage of depth-first search • Implementation: depth-first until the objective

value reaches a threshold, then jump (e.g, best-estimate)

Page 49: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Preprocessing

Page 50: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Preprocessing

• Infeasibility detection • Redundancy detection • Improving bounds • Fixing variables • Improving coefficients

Page 51: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Preprocessing

integer program

solve

analysis

row i

constraints without constraint i

Page 52: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Detecting redundancy

Improving bounds

Improving bounds

Page 53: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Fixing variables

Fixing variables

Page 54: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Improving coefficient

Improving coefficient

Page 55: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Preprocessing

• Implementation

ignore completely or ignore most

Page 56: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Probing

Tentatively fix a variable and explore the consequences

fix consequences (first constraint)

(second constraint)

Page 57: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Probing

x1

x2

x3

x4 1-x4

1-x3

1-x2

1-x1

Conflict graph: representation of the implications

An edge represents variables that cannot be one at the same time

e.g., x1 + x2 ≤ 1

Page 58: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Probing

x1

x2

x3

x4 1-x4

1-x3

1-x2

1-x1

Conflict graph: representation of the implications

x1 + x2 + 1-x1 ≤ 1

x2 ≤ 0

or

clique inequality:

implementation: requires solving a maximum clique problem

Page 59: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Reduced Cost Fixing

Optimal solution linear programming

relaxation

Reduced cost:

What if?

Integer program

Permanently set

optimal dual variables

Page 60: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Primal Heuristics

Page 61: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Primal Heuristics

• Relaxation Induced Neighborhood Search (RINS) • Local branching • Feasibility pump

Page 62: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Relaxation Induced Neighborhood Search

• Suppose a known feasible solution xIP exists • Consider a linear programming solution xLP at

a node of the search tree • Attempt to find a better feasible solution by

solving a restricted IP in which the variables where xIP and xLP agree are fixed

Page 63: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Relaxation Induced Neighborhood Search

• Implementation question – When to apply?

• Variation – Rather than using a known IP solution and an LP

solution, use two known IP solutions to determine restricted IP (path relinking)

Page 64: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Local Branching

• Search in the neighborhood of a known

feasible solution �̅� by limiting the possible changes

Set of variables at 1 in known feasible solution

Set of variables at 0 in known feasible solution

Known feasible solution

Page 65: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Local Branching (Cont.)

Page 66: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

The Feasibility Pump (FP)

Jj integer is xbAx.t.s

cxmin

j ∈∀≤

}n,...,1{J and Rx n ⊆∈

Start with LP feasible x z ← closest integer point to x x ← closest LP feasible point to z Repeat until z is feasible

Feasibility Pump: The general idea

rounding x, i.e. [x] projecting z onto LP feasible region

Page 67: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

The Feasibility Pump (FP)

Start with LP feasible x z ← closest integer point to x x ← closest LP feasible point to z Repeat until z is feasible

Feasibility Pump: The general idea

x1

x2

x3

z1

z2

z3

d(x1,z1) < d(z1,x2) < d(x2,z2) < d(z2,x3) < d(x3,z3)

x integer z feasible

Two scenarios: 1. Feasible z 2. Cycling (i.e., [x] = z and

projLP(z) = x)

Page 68: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

The Feasibility Pump (FP)

Spends most time in projection procedure: • May overlook good integer

solutions close to x Fix: • Spend more time around FP

iterates x to find feasible integer solutions rather than relying on naïve rounding

• Make search more balanced

Start with LP feasible x z ← closest integer point to x x ← closest LP feasible point to z Repeat until z is feasible

Feasibility Pump: The general idea

Page 69: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Line Search within FP

The chosen line segment is called the shooting line with starting point xs and end point xt.

Q. How to find suitable xt?

Q. How to find all rounded solutions along the shooting line efficiently?

xs

xt

A substitute for rounding

For each FP iterate x, round all points along a line segment passing through x and a point deep within the feasible region.

Page 70: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Valid Inequalities

Page 71: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Valid Inequalities

valid inequality feasible set

valid inequality: an inequality such that all feasible solutions satisfy the inequality

Page 72: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Valid Inequalities

Polyhedron

Feasible set

Valid inequality

Page 73: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Valid Inequalities / Cuts

• Are some cuts better than others? • Can we characterize the strongest cut?

Page 74: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Valid Inequalities

feasible set

three valid inequalities

Page 75: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Valid Inequalities convex hull

feasible set

a valid inequality that is necessary in the description of the convex hull of feasible solutions is the strongest possible valid inequality and called a facet inducing inequality

(a facet)

Page 76: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Valid Inequalities

feasible set

three valid inequalities

feasible set one facet

Page 77: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Valid Inequalities / Cuts

• Problem specific cuts – Node / vertex packing – Economic lotsizing

• Substructure cuts – Knapsack problem

• General cuts – Gomory cuts

Cuts for a relaxation of the problem

Page 78: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Node/Vertex Packing Parameters

Formulation

Variables

Page 79: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Node / Vertex Packing

Odd hole inequality:

Page 80: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Economic Lotsizing

Variables

Parameters

Formulation

Page 81: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Economic Lotsizing

Valid inequality

Page 82: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Knapsack Problem

Variables

Parameters

Formulation

Page 83: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Cover Cuts

Cover:

Cover inequality:

Page 84: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

General Cuts

• Gomory cut • Proof of validity

Page 85: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

How to determine valid inequalities?

• Exploit problem knowledge • Study LP solutions • Use PORTA

Page 86: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

How to use valid inequalities?

• How to handle an exponential number of valid inequalities?

• Are valid inequalities useful if there not facets?

• How to determine whether a valid inequality is a facet?

Page 87: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Cut Generation

Solve LP

Find violated cut

Add violated cut

Solve LP

SEPARATION

Page 88: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Separation

• Odd-hole inequalities • (l,S) inequalities • Cover inequalities

Page 89: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Odd-hole inequalities

Page 90: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

(l,S)-Inequalities

Separation

Page 91: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Cover Inequalities

Separation

Page 92: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Up Lifting (Cover Inequality)

valid inequality (when x1 = 0)

consider

valid when

where

Page 93: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Down Lifting (Cover Inequality)

valid inequality (when x1 = 1)

consider

valid when

where

Page 94: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Cover Inequalities

• Should the separation problem be solved using an exact method?

• Should the lifting problem be solved using an exact method?

• In what order should variables be lifted?

Page 95: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Up Lifting Theorem. Suppose S ⊆ Bn, Sδ = S ∩ {x ∈ Bn : x1=δ} for δ ∈ {0,1}, and

π2x2+ π3x3+ … πnxn≤ π0 (*) is valid for S0. If S1 = ∅ then x1 ≤ 0 is valid for S. If S1 ≠ ∅ then

αx1 + π2x2+ π3x3+ … πnxn≤ π0 (**) is valid for S for any α ≤ π0 - ζ where ζ = max{π2x2+ π3x3+ … πnxn : x ∈ S1}. Moreover, if (*) defines a facet of conv(S0) and α = π0 - ζ then (**) gives a facet of conv(S).

Page 96: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Down Lifting Theorem. Suppose S ⊆ Bn, Sδ = S ∩ {x ∈ Bn : x1=δ} for δ ∈ {0,1}, and

π2x2+ π3x3+ … πnxn≤ π0 (*) is valid for S1. If S0 = ∅ then x1 ≥ 1 is valid for S. If S0 ≠ ∅ then

γx1 + π2x2+ π3x3+ … πnxn≤ π0 + γ (***) is valid for S for any γ ≥ ζ - π0 where ζ = max{π2x2+ π3x3+ … πnxn : x ∈ S0}. Moreover, if (*) defines a facet of conv(S1) and γ = ζ - π0 then (***) gives a facet of conv(S).

Page 97: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Reformulation

Page 98: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Reformulation

• Disaggregation • Extended formulations • Column generation formulations

Page 99: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Disaggregation

ALTERNATIVELY

Is one formulation better than the other? Better in what sense?

Page 100: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Disaggregation

Consider

Page 101: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Economic Lotsizing

Variables

Parameters

Formulation

Page 102: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Economic Lotsizing Parameters

Variables

Formulation

Note

Page 103: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Extended formulations

Q ={(x,w): (x,w)∈Rn x Rp} is an extended formulation for a pure integer program with formulation P⊆Rn if ProjxQ ∩ Zn = P ∩ Zn where the projection of Q onto x is defined to be ProjxQ = {x : (x,w)∈Q, ∃w ∈Rp} How can we compare the formulations in this case? A: if ProjxQ⊂P, we say Q is a better formulation than P

Page 104: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Generalized Assignment Problem Parameters

Variables

Formulation

Page 105: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Generalized Assignment Problem

Formulation

Parameters

Variables

Page 106: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Generalized Assignment Problem

Parameters

Satisfy

Page 107: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Generalized Assignment Problem

Variables Coefficient matrix

RHS

Page 108: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

How to use column generation formulations

• How to handle exponential number of columns?

• How to find “missing” columns?

Page 109: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Branch-and-Price

Solve LP

Find column with negative reduced cost

Add negative reduced cost column

Solve LP

PRICING

Page 110: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Pricing Problem dual associated with machine i

dual associated with task j

where

Page 111: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Branching

• Branching on selection variables – Fixing to 1, i.e., selecting a particular schedule for

a machine – Fixing to 0, i.e., forbidding a particular schedule

for a machine

• How to prevent the forbidden schedule to be generated again?

Page 112: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Branching

• Branching on original variables

• Fixing to 1 – Force task j in schedule for machine i – Forbid task j in schedule for other machines

• Fixing to 0 – Forbid task j in schedule for machine i

Page 113: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

What Next?

• Parallel Integer Programming – Topics in Parallel Integer Optimization (Jeff

Linderoth, 1998) – PARINO: PARallel INteger Optimizer (Kalyan

Permulla, 1997)

• Multi-objective Integer Programming

– MINTO: Multi-objective INTeger Optimizer

Page 114: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Restrict and Relax Search

Page 115: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Outline

• Motivation • Restrict-and-Relax Search

– Initial restriction – Fixing and unfixing

• Computational experiments – 0-1 integer programs – Multi-commodity fixed charge network flow

Page 116: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Motivation

• Why use restricted integer programs? – Desire to find good feasible solutions quickly

• Crucial for real-life applications • Beneficial for many integer programming techniques

(e.g., reduced cost fixing)

• Why use restricted integer programs?

– Integer program of interest very large (e.g., too large to fit in memory)

Page 117: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Motivation

• Success stories – Relaxation induced neighborhood search (general) – Local branching (general) – IP-based neighborhood search (problem-specific)

Page 118: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

IP-based Neighborhood Search

Page 119: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

IP-based search heuristic

• Key decisions: – What variables to fix? – What values to fix them to?

Page 120: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

IP-based search heuristic If we solve a number of related restricted integer

programs, can we re-use the search tree?

Page 121: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Restrict-and-Relax Search

• Main ideas: – Branch-and-bound algorithm

that always works on a restricted integer program

– Branch-and-bound algorithm that uses local information to decide whether to relax (unfix variables) or restrict (fix variables)

restrict

restrict or relax

Page 122: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Restrict-and-Relax Search

• Main ideas: – Restrict: Efficiency – Relax: Quality

Page 123: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Restrict-and-Relax Search

Original IP

Restricted IP

Restricted IP at node of the search tree

Page 124: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Restrict-and-Relax Search

Restricted IP at node of the search tree

Modified restricted IP at node of the search tree

Page 125: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Restrict-and-Relax Search

• Key decisions – How to define the initial restricted integer

program? – How to determine the variables to fix or unfix? – At which nodes in the search tree to relax or

restrict?

Page 126: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

How to define the initial restricted integer program?

• Based on a known feasible solution • Based on the solution to the LP relaxation • Based on the Phase I solution to the LP

relaxation

Page 127: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

How to define the initial restricted integer program?

Scheme: – xLP = 0 for variable: Score: c – xLP = 1 for variable: Score: -c – Fix variables from large to small – Fix at most 90% of variables

Page 128: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

How to determine the variables to fix and unfix?

• Fixing variables (LP feasible node):

Choose variables to fix in nondecreasing order of absolute value of reduced costs

• Unfixing variables (LP feasible node):

Choose variables to unfix in nondecreasing order of absolute value of reduced costs

Fix variables in the current primal solution that are not likely to be part of an optimal solution in the future

Unfixing variables in the current primal solution that are likely to result in an optimal solution with lower value in the future

Page 129: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

How to determine the variables to fix and unfix?

• Implementation - Gradual transition:

– Fast linear programming solves – Up to date dual information

Page 130: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Unfixing variables

Fathomed by bound

Infeasible

Active LP feasible

Page 131: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Unfixing variables

Opportunistic relaxing: Unfix previously fixed variables

Page 132: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Unfixing variables

Infeasible: (1) Resolve LP with all variables unfixed (2) Unfix variables that change values

Fathomed by bound: (1) Remove cut-off (2) Resolve LP with all variables unfixed (3) If value < best known, unfix based on reduced costs

Resolve LP with all variables unfixed guarantees that no nodes are discarded that shouldn’t

Page 133: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

At which nodes in the search tree to relax or restrict?

• Parameters: – level-frequency (l-f) : Relax/restrict at node t if node level is a multiple of l-f – unfix-ratio (u-r) : At each trial, unfix at most u-r % of the fixed variables – fix-ratio (f-r) : At each trial, fix at most f-r % of the free variables – node-trial-limit (t-l) : At each node, fix/relax at most t-l times – max-depth (max-d) : Fix/unfix only at nodes below tree level max-d – min-depth (min-d) : Fix/unfix only at nodes above tree level min-d – Pruned-by-bound (p-b) : If enabled, fix/unfix at nodes pruned by bound

regardless of node level – Pruned-by-infeasibility (p-i) : If enabled, fix/unfix at nodes pruned by

infeasibility regardless of node level

Page 134: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

At which nodes in the search tree to relax or restrict?

• Default values: – level-frequency (l-f) : 4 – unfix-ratio (u-r) : 5% – fix-ratio (f-r) : 2.5% – node-trial-limit (t-l) : 5 – max-depth (max-d) : ∞ – min-depth (min-d) : 0 – Pruned-by-bound (p-b) : enabled – Pruned-by-infeasibility (p-i) : enabled

Page 135: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Computational Study

• Instances: – COR@L – MIPLIB

• Restrict-and-Relax

– Initial restricted IP: based on LP relaxation – Default settings for parameters – Time limit: 500 seconds

• Implementation: SYMPHONY + CLP

Page 136: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Computational Study

• Default solver: Original IP • Default solver: Restricted IP • Restrict-and-relax Search

Page 137: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Results

By varying control parameters we can obtained improved solutions for all instances!

Page 138: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Results (sample)

Original IP Restricted IP Restrict-and-Relax Search

Optimal

neos-693347 360 - 241 234

neos808444 - - 0 0

m100n500k4r1 -22 -22 -24 -25

Page 139: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Results (sample)

%fixed #nodes #unfix avg. #fix avg. #solutions neos-693347 0.74 593 266 18 243 27 1

neos808444 0.9 633 129 24 1 1 1

m100n500k4r1 0.7 38075 11095 6 1620 12 4

Page 140: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Multi-commodity Fixed Charge Network Flow

Variable flow cost (>= 0) Fixed cost of installing arc (>= 0)

Commodity flow balance

Arc capacity and coupling

Do we install arc (i,j)?

Does commodity k flow on arc (i,j)?

Page 141: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Computational Study • Instances

– Notation: T - #nodes(100x) - #arcs(1000x) - #commodities – Smallest (T-5-3-50)

• 150,000 variables, 180,000 constraints, 750,000 nonzeroes – Largest (T-5-3-200)

• 600,000 variables, 700,000 constraints, 3,000,000 nonzeroes • Restrict-and-relax settings

– Initial restriction:

• Phase I of simplex algorithm, fix up to 90% of variables – Parameters:

• unfix ratio: 6%, fix ratio: 5% – Time limit: 2 hours

Page 142: Integer Programming: An Introductiontw/school2013/ip-summer-school-1.pdf · Solving Integer Programs Linear Programming Relaxation . Solving Integer Programs Restricted Integer Program

Results