122
· ·

Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Introduction to Constraint Integer Programming

Ambros M. Gleixner

Zuse Institute Berlin · MATHEON · Berlin Mathematical School

5th Porto Meeting on Mathematics for Industry, April 10�11, 2014, Porto

1

Page 2: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

ZIB � Fast Algorithms, Fast Computers

Zuse Institute Berlin is a research institute and computing center of theState of Berlin with research units:

I Numerical Analysis and Modeling

I Visualization and Data Analysis

I Optimization: Energy�Tra�c�Telecommunication�Linear and Nonlinear IP

I Scienti�c Information Systems

I Computer Science and High Performance Computing

President: Prof. Dr. Dr. h.c. mult. Martin Grötschel

2

Page 3: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

ZIB � Fast Algorithms, Fast Computers

Zuse Institute Berlin is a research institute and computing center of theState of Berlin with research units:

I Numerical Analysis and Modeling

I Visualization and Data Analysis

I Optimization: Energy�Tra�c�Telecommunication�Linear and Nonlinear IP

I Scienti�c Information Systems

I Computer Science and High Performance Computing

President: Prof. Dr. Dr. h.c. mult. Martin Grötschel

2

Page 4: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Outline

Constraint Integer Programming

MIP + CP = CIP

Solving Constraint Integer Programs

The SCIP Optimization Suite

Using SCIP

3

Page 5: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Outline

Constraint Integer Programming

MIP + CP = CIP

Solving Constraint Integer Programs

The SCIP Optimization Suite

Using SCIP

4

Page 6: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

An example: the Traveling Salesman Problem

De�nition (TSP)

Given a complete graphG = (V ,E ) and distances de forall e ∈ E :

Find a Hamiltonian cycle (cyclecontaining all nodes, tour) ofminimum length.

K8

5

Page 7: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

An example: the Traveling Salesman Problem

De�nition (TSP)

Given a complete graphG = (V ,E ) and distances de forall e ∈ E :

Find a Hamiltonian cycle (cyclecontaining all nodes, tour) ofminimum length.

K8

5

Page 8: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

An example: the Traveling Salesman Problem

De�nition (TSP)

Given a complete graphG = (V ,E ) and distances de forall e ∈ E :

Find a Hamiltonian cycle (cyclecontaining all nodes, tour) ofminimum length.

(n−1)!2 possible solutions: �nite, but enumeration intractable!

5

Page 9: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

TSP � Integer Programming Formulation

Given

I complete graph G = (V ,E )

I distances de > 0 for all e ∈ E

Binary variables

I xe = 1 if edge e is used

xe

K8

min∑e∈E

de xe

subject to∑

e∈δ(v)

xe = 2 ∀v ∈ V

∑e∈δ(S)

xe ≥ 2 ∀S ⊂ V , S 6= ∅

xe ∈ {0, 1} ∀e ∈ E

6

Page 10: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

TSP � Integer Programming Formulation

Given

I complete graph G = (V ,E )

I distances de > 0 for all e ∈ E

Binary variables

I xe = 1 if edge e is used

xe

K8

min∑e∈E

de xe

subject to∑

e∈δ(v)

xe = 2 ∀v ∈ V

∑e∈δ(S)

xe ≥ 2 ∀S ⊂ V , S 6= ∅

xe ∈ {0, 1} ∀e ∈ E

6

Page 11: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

TSP � Integer Programming Formulation

Given

I complete graph G = (V ,E )

I distances de > 0 for all e ∈ E

Binary variables

I xe = 1 if edge e is used

xe

K8

min∑e∈E

de xe

subject to∑

e∈δ(v)

xe = 2 ∀v ∈ V

∑e∈δ(S)

xe ≥ 2 ∀S ⊂ V , S 6= ∅

xe ∈ {0, 1} ∀e ∈ E

node degree

6

Page 12: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

TSP � Integer Programming Formulation

Given

I complete graph G = (V ,E )

I distances de > 0 for all e ∈ E

Binary variables

I xe = 1 if edge e is used

xe

K8

min∑e∈E

de xe

subject to∑

e∈δ(v)

xe = 2 ∀v ∈ V

∑e∈δ(S)

xe ≥ 2 ∀S ⊂ V , S 6= ∅

xe ∈ {0, 1} ∀e ∈ E

subtour elimination

6

Page 13: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

TSP � Integer Programming Formulation

Given

I complete graph G = (V ,E )

I distances de > 0 for all e ∈ E

Binary variables

I xe = 1 if edge e is used

xe

K8

min∑e∈E

de xe

subject to∑

e∈δ(v)

xe = 2 ∀v ∈ V

∑e∈δ(S)

xe ≥ 2 ∀S ⊂ V , S 6= ∅

xe ∈ {0, 1} ∀e ∈ E

distance

6

Page 14: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

TSP � Integer Programming Formulation

Given

I complete graph G = (V ,E )

I distances de > 0 for all e ∈ E

Binary variables

I xe = 1 if edge e is used

min∑e∈E

de xe

subject to∑

e∈δ(v)

xe = 2 ∀v ∈ V

∑e∈δ(S)

xe ≥ 2 ∀S ⊂ V , S 6= ∅

xe ∈ {0, 1} ∀e ∈ E

6

Page 15: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

TSP � Integer Programming Formulation

LP Relaxation

I convex feasible region

I e�ciently solvable

I dual bound on the IP optimum

min∑e∈E

de xe

subject to∑

e∈δ(v)

xe = 2 ∀v ∈ V

∑e∈δ(S)

xe ≥ 2 ∀S ⊂ V , S 6= ∅

xe ∈ [0, 1] ∀e ∈ E

6

Page 16: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Linear Programming Algorithms

Simplex algorithm Ellipsoid method Interior point

7

Page 17: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Linear Programming Algorithms

1947 Dantzig: Primal Simplex algorithm

1954 Lemke and Beale: Dual Simplex algorithmI by far the most used algorithm to solve LPsI worst case exponential running timeI fast reoptimization ↔ does not parallelize well

1979 Khachiyan: Ellipsoid MethodI �rst polynomial time algorithmI not suited for practical application

1984 Karmarkar: Interior Point Method/Barrier Algorithm

1989 Kojima et al.: Primal-dual Interior Point AlgorithmI �rst practical polynomial algorithmsI for single LPs often faster then simplexI good parallel speedup ↔ unsuited for reoptimization

8

Page 18: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Linear Programming Algorithms

1947 Dantzig: Primal Simplex algorithm

1954 Lemke and Beale: Dual Simplex algorithmI by far the most used algorithm to solve LPsI worst case exponential running timeI fast reoptimization ↔ does not parallelize well

1979 Khachiyan: Ellipsoid MethodI �rst polynomial time algorithmI not suited for practical application

1984 Karmarkar: Interior Point Method/Barrier Algorithm

1989 Kojima et al.: Primal-dual Interior Point AlgorithmI �rst practical polynomial algorithmsI for single LPs often faster then simplexI good parallel speedup ↔ unsuited for reoptimization

8

Page 19: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Cutting Plane Separation

Task

I strengthen relaxation

I add valid constraints

I generate on demand

Techniques

I general cutsI complemented MIR cutsI Gomory mixed integer cutsI strong Chvátal-Gomory cutsI implied bound cutsI reduced cost strengthening

I problem speci�c cutsI 0-1 knapsack problemI stable set problemI 0-1 single node �ow problem

9

Page 20: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branch-and-Bound (Land and Doig 1960)

Steps

1. Abort criterion

2. Node selection

3. Solve relaxation

4. Bounding

5. Feasibility check

6. Branching

x IP

∅∞ ∅∞

x IP

10

Page 21: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branch-and-Bound (Land and Doig 1960)

Steps

1. Abort criterion

2. Node selection

3. Solve relaxation

4. Bounding

5. Feasibility check

6. Branching

x IP

∅∞ ∅∞

x IP

10

Page 22: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branch-and-Bound (Land and Doig 1960)

Steps

1. Abort criterion

2. Node selection

3. Solve relaxation

4. Bounding

5. Feasibility check

6. Branching

x IP

∅∞ ∅∞

x IP

10

Page 23: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branch-and-Bound (Land and Doig 1960)

Steps

1. Abort criterion

2. Node selection

3. Solve relaxation

4. Bounding

5. Feasibility check

6. Branching

x IP

∅∞ ∅∞

x IP

10

Page 24: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branch-and-Bound (Land and Doig 1960)

Steps

1. Abort criterion

2. Node selection

3. Solve relaxation

4. Bounding

5. Feasibility check

6. Branching

x IP

∅∞ ∅∞

x IP

10

Page 25: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branch-and-Bound (Land and Doig 1960)

Steps

1. Abort criterion

2. Node selection

3. Solve relaxation

4. Bounding

5. Feasibility check

6. Branching

x IP

∅∞ ∅∞

x IP

10

Page 26: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branch-and-Bound (Land and Doig 1960)

Steps

1. Abort criterion

2. Node selection

3. Solve relaxation

4. Bounding

5. Feasibility check

6. Branching

x IP

∅∞ ∅∞

x IP

10

Page 27: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branch-and-Bound (Land and Doig 1960)

Steps

1. Abort criterion

2. Node selection

3. Solve relaxation

4. Bounding

5. Feasibility check

6. Branching

x IP

∅∞ ∅∞

x IP

10

Page 28: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branch-and-Bound (Land and Doig 1960)

Steps

1. Abort criterion

2. Node selection

3. Solve relaxation

4. Bounding

5. Feasibility check

6. Branching

x IP

∅∞ ∅∞

x IP

10

Page 29: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branch-and-Bound (Land and Doig 1960)

Steps

1. Abort criterion

2. Node selection

3. Solve relaxation

4. Bounding

5. Feasibility check

6. Branching

x IP

∅∞ ∅∞

x IP

10

Page 30: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branch-and-Bound (Land and Doig 1960)

Steps

1. Abort criterion

2. Node selection

3. Solve relaxation

4. Bounding

5. Feasibility check

6. Branching

x IP

∅∞ ∅∞

x IP

10

Page 31: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branch-and-Bound (Land and Doig 1960)

Steps

1. Abort criterion

2. Node selection

3. Solve relaxation

4. Bounding

5. Feasibility check

6. Branching

x IP

∞ ∅∞

x IP

10

Page 32: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branch-and-Bound (Land and Doig 1960)

Steps

1. Abort criterion

2. Node selection

3. Solve relaxation

4. Bounding

5. Feasibility check

6. Branching

x IP

∅∞

x IP

10

Page 33: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branch-and-Bound (Land and Doig 1960)

Steps

1. Abort criterion

2. Node selection

3. Solve relaxation

4. Bounding

5. Feasibility check

6. Branching

x IP

∅∞

x IP

10

Page 34: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branch-and-Bound (Land and Doig 1960)

Steps

1. Abort criterion

2. Node selection

3. Solve relaxation

4. Bounding

5. Feasibility check

6. Branching

x IP

∅∞ ∅∞

x IP

10

Page 35: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branch-and-Bound (Land and Doig 1960)

Steps

1. Abort criterion

2. Node selection

3. Solve relaxation

4. Bounding

5. Feasibility check

6. Branching

x IP

∅∞ ∅∞

x IP

10

Page 36: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branch-and-Bound (Land and Doig 1960)

Steps

1. Abort criterion

2. Node selection

3. Solve relaxation

4. Bounding

5. Feasibility check

6. Branching

x IP

∅∞ ∅∞

x IP

10

Page 37: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branch-and-Bound (Land and Doig 1960)

Steps

1. Abort criterion

2. Node selection

3. Solve relaxation

4. Bounding

5. Feasibility check

6. Branching

x IP

∅∞ ∅∞

x IP

10

Page 38: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branch-and-Bound (Land and Doig 1960)

Steps

1. Abort criterion

2. Node selection

3. Solve relaxation

4. Bounding

5. Feasibility check

6. Branching

x IP

∅∞ ∅∞

x IP

10

Page 39: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branch-and-Bound (Land and Doig 1960)

Steps

1. Abort criterion

2. Node selection

3. Solve relaxation

4. Bounding

5. Feasibility check

6. Branching

x IP

∅∞ ∅∞

x IP

10

Page 40: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branch-and-Bound (Land and Doig 1960)

Steps

1. Abort criterion

2. Node selection

3. Solve relaxation

4. Bounding

5. Feasibility check

6. Branching

x IP

∅∞ ∅∞

x IP

10

Page 41: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branch-and-Bound (Land and Doig 1960)

Steps

1. Abort criterion

2. Node selection

3. Solve relaxation

4. Bounding

5. Feasibility check

6. Branching

x IP

∅∞

x IP

10

Page 42: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branch-and-Bound (Land and Doig 1960)

Steps

1. Abort criterion

2. Node selection

3. Solve relaxation

4. Bounding

5. Feasibility check

6. Branching

x IP

∅∞ ∅

x IP

10

Page 43: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branch-and-Bound (Land and Doig 1960)

Steps

1. Abort criterion

2. Node selection

3. Solve relaxation

4. Bounding

5. Feasibility check

6. Branching

x IP

∅∞ ∅

x IP

10

Page 44: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branch-and-Bound (Land and Doig 1960)

Steps

1. Abort criterion

2. Node selection

3. Solve relaxation

4. Bounding

5. Feasibility check

6. Branching

x IP

∅∞ ∅∞

x IP

10

Page 45: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Branching Rules

Task

I divide into (disjoint)subproblems

I improve local bounds

Techniques

I branching on variablesI most infeasibleI least infeasibleI random branchingI strong branchingI pseudocostI reliabilityI VSIDSI hybrid reliability/inference

I branching on constraintsI SOS1I SOS2

11

Page 46: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Example: Pseudocost Branching

Estimating the objective

I objective gain per unit:I ζ−(x3) = 4−2

7.4−7= 2

0.4 = 5

I other values at other nodes

I pseudocosts:average objective gainψ−(x3) =

ζ−1

(x3)+...+ζ−n

(x3)

n= 5+3

2 = 4

I estimate increase of objectiveby pseudocosts and fractionality:

ψ−(x3) · frac(x3) = 4 · 0.2 = 0.8,and ψ+(x3)(1− frac(x3)) = 7.6

x3 ≤ 7

c = 4

x3 ≥ 8

c = 8

x3 = 7.4

c = 2

12

Page 47: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Example: Pseudocost Branching

Estimating the objective

I objective gain per unit:I ζ−(x3) = 4−2

7.4−7= 2

0.4 = 5

I other values at other nodes

I pseudocosts:average objective gainψ−(x3) =

ζ−1

(x3)+...+ζ−n

(x3)

n= 5+3

2 = 4

I estimate increase of objectiveby pseudocosts and fractionality:

ψ−(x3) · frac(x3) = 4 · 0.2 = 0.8,and ψ+(x3)(1− frac(x3)) = 7.6

x3 ≤ 7

c = 4

x3 ≥ 8

c = 8

x3 = 7.4

c = 2

12

Page 48: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Example: Pseudocost Branching

Estimating the objective

I objective gain per unit:I ζ+(x3) = 8−2

8−7.4 = 6

0.6 = 10

I other values at other nodes

I pseudocosts:average objective gainψ−(x3) =

ζ−1

(x3)+...+ζ−n

(x3)

n= 5+3

2 = 4

I estimate increase of objectiveby pseudocosts and fractionality:

ψ−(x3) · frac(x3) = 4 · 0.2 = 0.8,and ψ+(x3)(1− frac(x3)) = 7.6

x3 ≤ 7

c = 4

x3 ≥ 8

c = 8

x3 = 7.4

c = 2

12

Page 49: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Example: Pseudocost Branching

Estimating the objective

I objective gain per unit:I ζ−

1(x3) = 5, ζ+

1(x3) = 10

I other values at other nodes

I pseudocosts:average objective gainψ−(x3) =

ζ−1

(x3)+...+ζ−n

(x3)

n= 5+3

2 = 4

I estimate increase of objectiveby pseudocosts and fractionality:

ψ−(x3) · frac(x3) = 4 · 0.2 = 0.8,and ψ+(x3)(1− frac(x3)) = 7.6

x3 ≤ 7

c = 4

x3 ≥ 8

c = 8

x3 = 7.4

c = 2

ζ−1 (x3) ζ+1 (x3)

12

Page 50: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Example: Pseudocost Branching

Estimating the objective

I objective gain per unit:I ζ−

1(x3) = 5, ζ+

1(x3) = 10

I other values at other nodes

I pseudocosts:average objective gainψ−(x3) =

ζ−1

(x3)+...+ζ−n

(x3)

n= 5+3

2 = 4

I estimate increase of objectiveby pseudocosts and fractionality:

ψ−(x3) · frac(x3) = 4 · 0.2 = 0.8,and ψ+(x3)(1− frac(x3)) = 7.6

x3 ≤ 5

c ≈ 0.8

x3 = 5.2 c = 0

x3 ≥ 6

c ≈ 7.6

ζ−1

(x3) = 5

x3 ≤ 4 x3 ≥ 5

ζ−2

(x3) = 3 ζ+2(x3) = 9

x3 ≤ 7

ζ+1(x3) = 10

x3 ≥ 8

12

Page 51: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Example: Pseudocost Branching

Estimating the objective

I objective gain per unit:I ζ−

1(x3) = 5, ζ+

1(x3) = 10

I other values at other nodes

I pseudocosts:average objective gainψ−(x3) =

ζ−1

(x3)+...+ζ−n

(x3)

n= 5+3

2 = 4

I estimate increase of objectiveby pseudocosts and fractionality:

ψ−(x3) · frac(x3) = 4 · 0.2 = 0.8,and ψ+(x3)(1− frac(x3)) = 7.6

x3 ≤ 5

c ≈ 0.8

x3 = 5.2 c = 0

x3 ≥ 6

c ≈ 7.6

ζ−1

(x3) = 5

x3 ≤ 4 x3 ≥ 5

ζ−2

(x3) = 3 ζ+2(x3) = 9

x3 ≤ 7

ζ+1(x3) = 10

x3 ≥ 8

12

Page 52: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Example: Pseudocost Branching

Estimating the objective

I objective gain per unit:I ζ−

1(x3) = 5, ζ+

1(x3) = 10

I other values at other nodes

I pseudocosts:average objective gainψ−(x3) = 4, ψ+(x3) = 9.5

I estimate increase of objectiveby pseudocosts and fractionality:

ψ−(x3) · frac(x3) = 4 · 0.2 = 0.8,and ψ+(x3)(1− frac(x3)) = 7.6

x3 ≤ 5

c ≈ 0.8

x3 = 5.2 c = 0

x3 ≥ 6

c ≈ 7.6

ζ−1

(x3) = 5

x3 ≤ 4 x3 ≥ 5

ζ−2

(x3) = 3 ζ+2(x3) = 9

x3 ≤ 7

ζ+1(x3) = 10

x3 ≥ 8

12

Page 53: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Example: Pseudocost Branching

Estimating the objective

I objective gain per unit:I ζ−

1(x3) = 5, ζ+

1(x3) = 10

I other values at other nodes

I pseudocosts:average objective gainψ−(x3) = 4, ψ+(x3) = 9.5

I estimate increase of objectiveby pseudocosts and fractionality:ψ−(x3) · frac(x3)

= 4 · 0.2 = 0.8,and ψ+(x3)(1− frac(x3)) = 7.6

x3 ≤ 5

c ≈ 0.8

x3 = 5.2 c = 0

x3 ≥ 6

c ≈ 7.6

ζ−1

(x3) = 5

x3 ≤ 4 x3 ≥ 5

ζ−2

(x3) = 3 ζ+2(x3) = 9

x3 ≤ 7

ζ+1(x3) = 10

x3 ≥ 8

12

Page 54: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Example: Pseudocost Branching

Estimating the objective

I objective gain per unit:I ζ−

1(x3) = 5, ζ+

1(x3) = 10

I other values at other nodes

I pseudocosts:average objective gainψ−(x3) = 4, ψ+(x3) = 9.5

I estimate increase of objectiveby pseudocosts and fractionality:ψ−(x3) · frac(x3) = 4 · 0.2 = 0.8,

and ψ+(x3)(1− frac(x3)) = 7.6

x3 ≤ 5

c ≈ 0.8

x3 = 5.2 c = 0

x3 ≥ 6

c ≈ 7.6

ζ−1

(x3) = 5

x3 ≤ 4 x3 ≥ 5

ζ−2

(x3) = 3 ζ+2(x3) = 9

x3 ≤ 7

ζ+1(x3) = 10

x3 ≥ 8

12

Page 55: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Example: Pseudocost Branching

Estimating the objective

I objective gain per unit:I ζ−

1(x3) = 5, ζ+

1(x3) = 10

I other values at other nodes

I pseudocosts:average objective gainψ−(x3) = 4, ψ+(x3) = 9.5

I estimate increase of objectiveby pseudocosts and fractionality:ψ−(x3) · frac(x3) = 4 · 0.2 = 0.8,and ψ+(x3)(1− frac(x3)) = 7.6

x3 ≤ 5

c ≈ 0.8

x3 = 5.2 c = 0

x3 ≥ 6

c ≈ 7.6

ζ−1

(x3) = 5

x3 ≤ 4 x3 ≥ 5

ζ−2

(x3) = 3 ζ+2(x3) = 9

x3 ≤ 7

ζ+1(x3) = 10

x3 ≥ 8

12

Page 56: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Primal Heuristics

Task

I improve primal bound

I e�ective on average

I guide remaining search

Techniques

I roundingI possibly solve �nal LP

I divingI least infeasibleI guided

I objective divingI objective feasibility pump

I Large Neighborhood SearchI RINS, local branchingI RENS

I combinatorial

13

Page 57: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Example: The Feasibility Pump

Algorithm

1. Solve LP;

2. Round LP optimum;

3. If feasible:

4. Stop!

5. Else:

6. Change objective;

7. Go to 1;

∆(x ,x̃) =∑|xj − x̃j |

14

Page 58: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Example: The Feasibility Pump

Algorithm

1. Solve LP;

2. Round LP optimum;

3. If feasible:

4. Stop!

5. Else:

6. Change objective;

7. Go to 1;

∆(x ,x̃) =∑|xj − x̃j |

14

Page 59: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Example: The Feasibility Pump

Algorithm

1. Solve LP;

2. Round LP optimum;

3. If feasible:

4. Stop!

5. Else:

6. Change objective;

7. Go to 1;

∆(x ,x̃) =∑|xj − x̃j |

14

Page 60: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Example: The Feasibility Pump

Algorithm

1. Solve LP;

2. Round LP optimum;

3. If feasible:

4. Stop!

5. Else:

6. Change objective;

7. Go to 1;

∆(x ,x̃) =∑|xj − x̃j |

14

Page 61: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Example: The Feasibility Pump

Algorithm

1. Solve LP;

2. Round LP optimum;

3. If feasible:

4. Stop!

5. Else:

6. Change objective;

7. Go to 1;

∆(x ,x̃) =∑|xj − x̃j |

14

Page 62: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Example: The Feasibility Pump

Algorithm

1. Solve LP;

2. Round LP optimum;

3. If feasible:

4. Stop!

5. Else:

6. Change objective;

7. Go to 1;

∆(x ,x̃) =∑|xj − x̃j |

14

Page 63: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Example: The Feasibility Pump

Algorithm

1. Solve LP;

2. Round LP optimum;

3. If feasible:

4. Stop!

5. Else:

6. Change objective;

7. Go to 1;

∆(x ,x̃) =∑|xj − x̃j |

14

Page 64: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Example: The Feasibility Pump

Algorithm

1. Solve LP;

2. Round LP optimum;

3. If feasible:

4. Stop!

5. Else:

6. Change objective;

7. Go to 1;

∆(x ,x̃) =∑|xj − x̃j |

14

Page 65: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Example: The Feasibility Pump

Algorithm

1. Solve LP;

2. Round LP optimum;

3. If feasible:

4. Stop!

5. Else:

6. Change objective;

7. Go to 1;

∆(x ,x̃) =∑|xj − x̃j |

14

Page 66: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Example: The Feasibility Pump

Algorithm

1. Solve LP;

2. Round LP optimum;

3. If feasible:

4. Stop!

5. Else:

6. Change objective;

7. Go to 1;

∆(x ,x̃) =∑|xj − x̃j |

14

Page 67: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

TSP World Record

by Bill Cook et al.

The largest solved instance of the traveling salesman problem consists of a tour through85,900 cities in a VLSI application that arose in Bell Laboratories in the late 1980s.

The total amount of computer usage for the computations was appx. 136 CPU years.

15

Page 68: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

MIP vs. CP

Mixed Integer Program

Objective function:

. linear function

Feasible set:

. described by linear constraints

Variable domains:

. real or integer values

General form:

min cTx

s.t. Ax ≤ b

(xI , xC ) ∈ ZI × RC

Constraint Program

Objective function:

. arbitrary function

Feasible set:

. given by arbitrary constraints

Variable domains:

. arbitrary (usually �nite)

General form:

min c(x)

s.t. Ck(x) for k = 1, . . . ,m

(xI , xN) ∈ ZI × X

16

Page 69: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

TSP � Constraint Programming Formulation

Given

I complete graph G = (V ,E )

I for each e ∈ E a distancede > 0

Integer variables

I xv position of v ∈ V in tour

xv

K8

1

2

3

45

6

78

min length(x1, . . . , xn)

subject to alldi�erent(x1, . . . , xn)

xv ∈ {1, . . . , n} ∀v ∈ V

17

Page 70: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

TSP � Constraint Programming Formulation

Given

I complete graph G = (V ,E )

I for each e ∈ E a distancede > 0

Integer variables

I xv position of v ∈ V in tour

xv

K8

1

2

3

45

6

78

min length(x1, . . . , xn)

subject to alldi�erent(x1, . . . , xn)

xv ∈ {1, . . . , n} ∀v ∈ V

17

Page 71: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Constraint Integer Programming

I Mixed Integer Programs

I SATis�ability problems

I Pseudo-Boolean Optimization

I Finite Domain

I Constraint Programming

I Constraint Integer Programming

CP

CIP

FDPBO

MIP

SAT

Relation to CP and MIP

I Every MIP is a CIP. �MIP ( CIP�

I Every CP over a �nite domain space is a CIP. �FD ( CIP�

18

Page 72: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Constraint Integer Programming

I Mixed Integer Programs

I SATis�ability problems

I Pseudo-Boolean Optimization

I Finite Domain

I Constraint Programming

I Constraint Integer Programming

CP

CIP

FDPBO

MIP

SAT

Relation to CP and MIP

I Every MIP is a CIP. �MIP ( CIP�

I Every CP over a �nite domain space is a CIP. �FD ( CIP�

18

Page 73: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Constraint Integer Programming

I Mixed Integer Programs

I SATis�ability problems

I Pseudo-Boolean Optimization

I Finite Domain

I Constraint Programming

I Constraint Integer Programming

CP

CIP

FD

PBO

MIP

SAT

Relation to CP and MIP

I Every MIP is a CIP. �MIP ( CIP�

I Every CP over a �nite domain space is a CIP. �FD ( CIP�

18

Page 74: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Constraint Integer Programming

I Mixed Integer Programs

I SATis�ability problems

I Pseudo-Boolean Optimization

I Finite Domain

I Constraint Programming

I Constraint Integer Programming

CP

CIP

FDPBO

MIP

SAT

Relation to CP and MIP

I Every MIP is a CIP. �MIP ( CIP�

I Every CP over a �nite domain space is a CIP. �FD ( CIP�

18

Page 75: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Constraint Integer Programming

I Mixed Integer Programs

I SATis�ability problems

I Pseudo-Boolean Optimization

I Finite Domain

I Constraint Programming

I Constraint Integer Programming

CP

CIP

FDPBO

MIP

SAT

Relation to CP and MIP

I Every MIP is a CIP. �MIP ( CIP�

I Every CP over a �nite domain space is a CIP. �FD ( CIP�

18

Page 76: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Constraint Integer Programming

I Mixed Integer Programs

I SATis�ability problems

I Pseudo-Boolean Optimization

I Finite Domain

I Constraint Programming

I Constraint Integer Programming

CP

CIP

FDPBO

MIP

SAT

Relation to CP and MIP

I Every MIP is a CIP. �MIP ( CIP�

I Every CP over a �nite domain space is a CIP. �FD ( CIP�

18

Page 77: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

What is a Constraint Integer Program?

Constraint Integer Program

Objective function:

. linear function

Feasible set:

. described by arbitrary constraints

Variable domains:

. real or integer values

After �xing all integer variables:

. CIP becomes tractable (e.g. LP)

General form:

min cTx

s.t. Ck(x) for k = 1, . . . ,m

(xI , xC ) ∈ ZI × RC

Remark:

I arbitrary objective orvariables modeled byconstraints

19

Page 78: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

What is a Constraint Integer Program?

Constraint Integer Program

Objective function:

. linear function

Feasible set:

. described by arbitrary constraints

Variable domains:

. real or integer values

After �xing all integer variables:

. CIP becomes tractable (e.g. LP)

min∑e∈E

de xe

s.t.∑

e∈δ(v)xe = 2 ∀ v ∈ V

nosubtour(x)xe ∈ {0, 1} ∀ e ∈ E

(CIP formulation of TSP)

Single nosubtour constraintrules out subtours (e.g. bydomain propagation). It mayalso separate subtour elimina-tion inequalities.

19

Page 79: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Outline

Constraint Integer Programming

MIP + CP = CIP

Solving Constraint Integer Programs

The SCIP Optimization Suite

Using SCIP

20

Page 80: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

How do we solve CIPs?

MIP

I LP relaxation

I cutting planes

CP

I domain propagation

SAT

I con�ict analysis

I periodic restarts

MIP, CP, and SAT

I branch-and-bound

SCIP

21

Page 81: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Con�ict Analysis

Task

I Analyze infeasibility

I Derive valid constraints

I Help to prune other nodes

Techniques

I AnalyzeI infeasible LPsI bound-exceeding LPsI propagation con�icts

I Reduce con�ict byI LP dual ray heuristicI cut in con�ict graph

I Apply con�ictsI for propagationI as cutting planes

22

Page 82: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Domain Propagation

x1

x2

x3

x4

x1

x2

x3

x4

Task

I simplify model locally

I improve local dual bound

I detect infeasibility

Techniques

I Constraint-speci�cI each constraint handler may

provide a propagation routineI reduced presolving (usually)

I Dual propagationI reduced cost strengtheningI objective function

I Special global structuresI variable boundsI cliques

23

Page 83: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Example: AND Constraints

AND

I y =∏

i∈J xi , y , xi ∈ {0, 1} ∀i ∈ J

I y : resultant, xi : operand variables

I can be linearized

I linearization weak/big

Propagation rules

I ∃i : xi = 0⇒ y = 0

I xi = 1 ∀i ∈ J ⇒ y = 1

I y = 1⇒ xi = 1 ∀i ∈ J

I y = 0 ∧ ∃k : xi = 1 ∀i ∈ J \ {k} ⇒ xk = 0

24

Page 84: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Linearization of y = x1 ∧ · · · ∧ xn

n∑i=1

xi − y ≤ n − 1

n∑i=1

xi − n y ≥ 0

I 2 constraints

I contains fractional vertices

n∑i=1

xi − y ≤ n − 1

xi − y ≥ 0 for i = 1, . . . , n

I n + 1 constraints

I only integer vertices

25

Page 85: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Enforcement of AND Constraints

Only propagation

I good: fast subproblem processing

I bad: LP relaxation has no knowledge about the nonlinear structure

Only relaxation � put the complete linearization into the LP

I good: LP relaxation contains complete problem

I bad: can blow up the LP

Only separation � generate the linearization as they are needed

I good: the LP only is fed with the import constraint (cuts)

I bad: LP relaxation has partial knowledge about the nonlinearities

SCIP's strategy

propagation + dynamically decide between relaxation and separation

26

Page 86: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Enforcement of AND Constraints

Only propagation

I good: fast subproblem processing

I bad: LP relaxation has no knowledge about the nonlinear structure

Only relaxation � put the complete linearization into the LP

I good: LP relaxation contains complete problem

I bad: can blow up the LP

Only separation � generate the linearization as they are needed

I good: the LP only is fed with the import constraint (cuts)

I bad: LP relaxation has partial knowledge about the nonlinearities

SCIP's strategy

propagation + dynamically decide between relaxation and separation

26

Page 87: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Enforcement of AND Constraints

Only propagation

I good: fast subproblem processing

I bad: LP relaxation has no knowledge about the nonlinear structure

Only relaxation � put the complete linearization into the LP

I good: LP relaxation contains complete problem

I bad: can blow up the LP

Only separation � generate the linearization as they are needed

I good: the LP only is fed with the import constraint (cuts)

I bad: LP relaxation has partial knowledge about the nonlinearities

SCIP's strategy

propagation + dynamically decide between relaxation and separation

26

Page 88: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Enforcement of AND Constraints

Only propagation

I good: fast subproblem processing

I bad: LP relaxation has no knowledge about the nonlinear structure

Only relaxation � put the complete linearization into the LP

I good: LP relaxation contains complete problem

I bad: can blow up the LP

Only separation � generate the linearization as they are needed

I good: the LP only is fed with the import constraint (cuts)

I bad: LP relaxation has partial knowledge about the nonlinearities

SCIP's strategy

propagation + dynamically decide between relaxation and separation

26

Page 89: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

SCIP's Modular, Plugin-based Structure

SCIP PrimalHeuristic

actconsdiving

coefdiving

crossover dins

feaspump

fixandinfer

fracdiving

guideddiving

intdiving

intshifting

linesearchdiving

localbranching

mutation

subnlp

objpscostdiving

octane

oneopt

pscostdiving

rensrins

rootsoldiving

rounding

shifting

shift&prop

simplerounding

trivial

trysol

twooptundercover

veclendiving

zi round

Variable

Event

default

Branch

allfullstrong

fullstrong

inference

leastinf

mostinf

pscostrandom

relpscost

Conflict

ConstraintHandler

and

bounddisjunc.

countsols cumu

lative

indicator

integral

knapsack

linear

linking

logicor

ororbitope

quadratic

setppc

soc

sos1

sos2

varbound

xor

Cutpool

LP

clp

cpxmsk

none

qso

spx

xprs

Dialog

default

Display

default

Nodeselector

bfs

dfs

estimate

hybridestim

restartdfs

· · ·

Presolver

boundshift

dualfix

implics

inttobinary

probing

trivial

Implications

Tree

Reader

ccg

cip

cnf

fix

lp

mps opb

ppm

rlp

sol

sos

zpl

Pricer

Separator

clique

cmir

flowcover

gomory

impliedbounds intobj

mcf

oddcycle

rapidlearn

redcost

strongcg

zerohalf

Propagator

pseudoobj

rootredcost

vbound

Relax

27

Page 90: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

SCIP's Modular, Plugin-based Structure

SCIP PrimalHeuristic

actconsdiving

coefdiving

crossover dins

feaspump

fixandinfer

fracdiving

guideddiving

intdiving

intshifting

linesearchdiving

localbranching

mutation

subnlp

objpscostdiving

octane

oneopt

pscostdiving

rensrins

rootsoldiving

rounding

shifting

shift&prop

simplerounding

trivial

trysol

twooptundercover

veclendiving

default

Variable

Event

default

Branch

allfullstrong

fullstrong

inference

leastinf

mostinf

pscostrandom

relpscost

Conflict

ConstraintHandler

and

bounddisjunc.

countsols cumu

lative

indicator

integral

knapsack

linear

linking

logicor

ororbitope

quadratic

setppc

soc

sos1

sos2

varbound

default

Cutpool

LP

clp

cpxmsk

none

qso

spx

default

Dialog

default

Display

default

Nodeselector

bfs

dfs

estimate

hybridestim

default

· · ·

Presolver

boundshift

dualfix

implics

inttobinary

probing

default

Implications

Tree

Reader

ccg

cip

cnf

fix

lp

mps opb

ppm

rlp

sol

sos

default

Pricer

Separator

clique

cmir

flowcover

gomory

impliedbounds intobj

mcf

oddcycle

rapidlearn

redcost

strongcgdefault

Propagator

pseudoobj

rootredcost

default

Relax

27

Page 91: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

SCIP's Modular, Plugin-based Structure

SCIP PrimalHeuristic

actconsdiving

coefdiving

crossover dins

feaspump

fixandinfer

fracdiving

guideddiving

intdiving

intshifting

linesearchdiving

localbranching

mutation

subnlp

objpscostdiving

octane

oneopt

pscostdiving

rensrins

rootsoldiving

rounding

shifting

shift&prop

simplerounding

trivial

trysol

twooptundercover

veclendiving

zi round

Variable

Event

default

Branch

allfullstrong

fullstrong

inference

leastinf

mostinf

pscostrandom

relpscost

Conflict

ConstraintHandler

and

bounddisjunc.

countsols cumu

lative

indicator

integral

knapsack

linear

linking

logicor

ororbitope

quadratic

setppc

soc

sos1

sos2

varbound

xor

Cutpool

LP

clp

cpxmsk

none

qso

spx

xprs

Dialog

default

Display

default

Nodeselector

bfs

dfs

estimate

hybridestim

restartdfs

· · ·

Presolver

boundshift

dualfix

implics

inttobinary

probing

trivial

Implications

Tree

Reader

ccg

cip

cnf

fix

lp

mps opb

ppm

rlp

sol

sos

zpl

Pricer

Separator

clique

cmir

flowcover

gomory

impliedbounds intobj

mcf

oddcycle

rapidlearn

redcost

strongcg

zerohalf

Propagator

pseudoobj

rootredcost

vbound

Relax

27

Page 92: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

SCIP's Solving Loop

Start Init Presolving

Stop

Node selection

Processing

Branching

Con�ict analysis

Primal heuristics

Relax. inf.

Relax. feas.CIP inf.

CIP feas.

Domain propagation

Solve Relaxation

Pricing

Cuts

Enforce constraints

28

Page 93: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Outline

Constraint Integer Programming

MIP + CP = CIP

Solving Constraint Integer Programs

The SCIP Optimization Suite

Using SCIP

29

Page 94: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

What is SCIP?

SCIP (Solving Constraint Integer Programs) . . .

I provides a full-scale MIP and MINLP solver,

I incorporatesI CP features (domain propagation),I MIP features (cutting planes, LP relaxation), andI SAT-solving features (con�ict analysis, restarts),

I has an modular structure,

I can be extended via plugins,

I is a branch-cut-and-price framework,

I is free for academic purposes,

I and is available in source-code under http://scip.zib.de !

30

Page 95: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

SCIP Optimization Suite = SCIP + SoPlex + ZIMPL

Toolbox for generating and solving constraint integer programs

ZIMPL

I Zuse Institute Mathematical Programming Language

I model and generate LPs, MIPs, and MINLPs

SCIP

I MIP, MINLP and CIP solver, branch-cut-and-price framework

I ZIMPL models can directly be loaded into SCIP

SoPlex

I default LP solver within SCIP

I revised primal and dual simplex algorithm

I special support for rational LP solving

31

Page 96: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

. . . + GCG + UG

ZIMPL

. modeling language

SCIP

. MIP, MINLP and CIP solver, branch-cut-and-price framework

SoPlex

. LP solver

GCG

. generic branch-cut-and-price solver

. based on Dantzig-Wolfe decomposition

UG

. framework for parallelization of MIP and MINLP solvers

. shared and distributed memory capabilities

32

Page 97: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Performance

. one of the fastest non-commercial MIP solvers

. one of the fastest MINLP solvers

0

50

100

150

200

250

timein

seconds

1.00x

1.82x2.05x

2.40x

solved(of 208 instances)

163 140 137 138

SCIP 3.0.0 � CPLEX 12.4.0

BARON 11.3

Couenne 0.4

LindoAPI 7.0.1.497

results on MINLPLIB (August 2012)(all instances that can be handled by all solvers)

33

Page 98: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

History of SCIP and Friends

1996 SoPlex � Sequential obj. simPlex (R. Wunderling [now IBM Cplex])

1998 SIP � Solving Integer Programs (A. Martin [now Univ. Erlangen])

2002 Start of SCIP development (T. Achterberg [now Gurobi])

2003 Chipdesign veri�cation ⇒ constraint programming

2005 First public version 0.80

2007 Start of exact integer programming development

2007 SCIP 1.0

2008 Pseudo-Boolean optimization and Generic Column Generation

2009 Mixed-integer nonlinear programming

2009 Beale-Orchard-Hays Prize (T. Achterberg)

2012 UG framework for parallelization

2014 SoPlex 2.0 with support for rational LP solving

34

Page 99: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Developers at ZIB

I Thorsten Koch

I Marc Pfetsch @ TU Darmstadt

I Gerald Gamrath

I Ambros Gleixner

I Matthias Miltenberger

I Felipe Serrano

I Yuji Shinano

I Kati Wolter

I Students: Gregor Hendel, EvaRamlow, Michael Winkler, BenjaminMüller, Leif Naundorf, Luca Fabbri

Former developersI Tobias Achterberg @ Gurobi

I Stefan Vigerske @ GAMS

I Timo Berthold @ FICO XPRESS

I Stefan Heinz @ FICO XPRESS

∗35

Page 100: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Developers at ZIB

I Thorsten Koch

I Marc Pfetsch @ TU Darmstadt

I Gerald Gamrath

I Ambros Gleixner

I Matthias Miltenberger

I Felipe Serrano

I Yuji Shinano

I Kati Wolter

I Students: Gregor Hendel, EvaRamlow, Michael Winkler, BenjaminMüller, Leif Naundorf, Luca Fabbri

Former developersI Tobias Achterberg @ Gurobi

I Stefan Vigerske @ GAMS

I Timo Berthold @ FICO XPRESS

I Stefan Heinz @ FICO XPRESS

∗35

Page 101: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

SCIP Facts

I more than 500 000 lines of C code, 25% documentation→ 28 000 assertions, 4 000 debug messages

I 10 examples illustrating the use of SCIP

I HowTos: each plugin type, debugging, automatic testing, . . .

I C++ wrapper classes, python interface, Java

I supports 10+ di�erent input formats

I 7 interfaces to external LP solvers→ CLP, CPLEX, Gurobi, Mosek, QSopt, SoPlex, XPRESS

I more than 1000 parameters, 15 �emphasis� settings

I active mailing list (200+ members)

I 8000+ downloads per year from 100+ countries

I free for academics, available in source code: http://scip.zib.de

I runs on Linux, Windows, Mac (Darwin+PPC), SunOS, . . .

36

Page 102: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

(Some) Universities and Institutes using SCIP. RWTH Aaachen. Universität Bayreuth. FU Berlin. TU Berlin. HU Berlin. WIAS Berlin. TU Braunschweig. TU Chemnitz. TU Darmstadt. TU Dortmund. TU Dresden. Universität

Erlangen-Nürnberg. Leibniz Universität Hannover. Universität Heidelberg. Fraunhofer ITWM

Kaiserslautern. Universität Karlsruhe. Christian-Albrechts-

Universität zuKiel

. Hochschule Lausitz

. OvGU Magdeburg

. TU München

. Universität Osnabrück

. Universität Stuttgart

. Aarhus Universitet

. The University of Adelaide

. Università dell'Aquila

. Arizona State University

. University of Assiut

. National Technical Universityof Athens

. Georgia Institute ofTechnology

. Indian Institute of Science

. Tsinghua University

. UC Berkeley

. Lehigh University

. University of Bristol

. Eötvös Loránd Tudományegyetem

. Universidad de Buenos Aires

. Institut Français de MécaniqueAvancée

. Chuo University

. Clemson University

. University College Cork

. Danmarks Tekniske Universitet

. Syddansk Universitet

. Fuzhou University

. Jinan University

. Rijksuniversiteit Groningen

. Hanoi Institute of Mathematics

. The Hong Kong PolytechnicUniversity

. University of Hyogo

. The Irkutsk Scienti�c Center

. University of the Witwatersrand

. Københavens Universitet

. Kunming Botany Institute

. École Poly. Fédérale de Lausanne

. Linköpings universitet

. Université catholique de Louvain

. Universidad Rey Juan Carlos

. Université de la MediterranéeAix-Marseille

. University of Melbourne

. UNAM

. Politecnico di Milano

. Università degli Studi di Milano

. Monash University

. Ikerlan

. Université de Montréal

. NIISI RAS

. Université de Nantes

. The University of Newcastle

. University of Nottingham

. Universitetet i Oslo

. Università degli Studi di Padova

. L'Université Sud de Paris

. Brown University

. The University of Queensland

. IASI CNR

. Erasmus Universiteit Rotterdam

. Carnegie Mellon University

. Universidad Diego Portales

. University of Balochistan

. Universidad San Francisco de Quito

. Universidade Federal do Rio deJaneiro

. Universidade de São Paulo

. Fudan University

. University of New South Wales

. Tel Aviv University

. The University of Tokyo

. Politecnico di Torino

. University of Toronto

. NTNU i Trondheim

. The University of York

. University of Washington

. University of Waterloo

. Massey University

. Austrian Institute of Technology

. TU Wien

. Universität Wien

. Wirtschaftsuniversität Wien

. ETH Zürich

37

Page 103: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

(Some) Universities and Institutes using SCIP

38

Page 104: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

SCIP to go!

39

Page 105: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Outline

Constraint Integer Programming

MIP + CP = CIP

Solving Constraint Integer Programs

The SCIP Optimization Suite

Using SCIP

40

Page 106: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Install SCIP

I download SCIP Optimization Suite from http://scip.zib.de

I extract tarball

I compile the SCIP Optimization Suite with make

I test binary with make test

I download precompiled binaries from http://scip.zib.de

I start SCIP ./scip-3.1.0/bin/scip

I SCIP>

41

Page 107: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Interactive Shell � Solve Problem

./scip-3.1.0/bin/scip

SCIP> read check/instances/MINLP/circle.cip

SCIP> optimize

SCIP> display solution

SCIP> display statistics

SCIP> help

SCIP> quit

42

Page 108: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Interactive Shell � Settings/Parameters

I SCIP comes with a bunch of prede�ned settingsI cuts, heuristics, and presolving

I aggressiveI fastI o�

I emphasisI counterI cpsolverI easymipI feasibilityI hardlpI optimality

I in the interactive shell you can modify parameters, for example,I each parameters is shown with a description and value range

SCIP> set {heuristics|...} emphasis {fast| ...}

SCIP> set emphasis {feasibility|...}

SCIP> set heuristics feaspump freq 1

43

Page 109: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Callable Library � Generate a Problem

Using SCIP within another code

I problem objectSCIPcreate()

SCIPcreateProb()

I problem variablesSCIPcreateVar()

SCIPaddVar()

SCIPreleaseVar()

I problem constraintsSCIPcreateConsLinear(), SCIPcreateConsQuadratic(), . . .SCIPaddCoefLinear()

SCIPaddCons()

SCIPreleaseCons()

See: scip.h, pub_*.h, <plugin>.h (e.g., cons_linear.h)

44

Page 110: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Callable Library � Solve a Problem

I setting parametersSCIPsetBoolParam()

SCIPsetIntParam()

SCIPsetRealParam()

I solve problemSCIPpresolve()

SCIPsolve()

I get solutionSCIPgetBestSol()

SCIPgetSolVals()

I free problemSCIPfree()

See: scip.h, pub_*.h, <plugin>.h (e.g. cons_linear.h)

45

Page 111: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

SCIP as a Framework

I extend SCIP by adding plugins in C or C++I branching rule, constraint handler, dialog, display, heuristic, node

selector, presolver, propagator, reader, relaxation, separatorI there are template �les for all plugin types, e.g., cons_xyz.{c,h}

I extended framework can be used viaI interactive shellI as callable library

I the SCIP release comes with 10 examplesI Binpacking � starting branch-and-price exampleI Coloring � elaborated branch-and-price example

I LOP � constraint handler example, branch-and-cutI TSP � C++ branch-and-cut example, primal heuristics

I MIPSolver � starting exampleI Queen � placing n queens on a chessboard, callable libraryI . . .

46

Page 112: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

TSP Plugins

SCIP PrimalHeuristic

actconsdiving

coefdiving

crossover dins

feaspump

fixandinfer

fracdiving

guideddiving

intdiving

intshifting

linesearchdiving

localbranching

mutation

subnlp

objpscostdiving

octane

oneopt

pscostdiving

rensrins

rootsoldiving

rounding

shifting

shift&prop

simplerounding

trivial

trysol

twooptundercover

veclendiving

zi round

Variable

Event

default

Branch

allfullstrong

fullstrong

inference

leastinf

mostinf

pscostrandom

relpscost

Conflict

ConstraintHandler

and

bounddisjunc.

countsols cumu

lative

indicator

integral

knapsack

linear

linking

logicor

ororbitope

quadratic

setppc

soc

sos1

sos2

varbound

xor

Cutpool

LP

clp

cpxmsk

none

qso

spx

xprs

Dialog

default

Display

default

Nodeselector

bfs

dfs

estimate

hybridestim

restartdfs

· · ·

Presolver

boundshift

dualfix

implics

inttobinary

probing

trivial

Implications

Tree

Reader

ccg

cip

cnf

fix

lp

mps opb

ppm

rlp

sol

sos

zpl

Pricer

Separator

clique

cmir

flowcover

gomory

impliedbounds intobj

mcf

oddcycle

rapidlearn

redcost

strongcg

zerohalf

Propagator

pseudoobj

rootredcost

vbound

Relax

47

Page 113: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

TSP Plugins

SCIP PrimalHeuristic

actconsdiving

coefdiving

crossover dins

feaspump

fixandinfer

fracdiving

guideddiving

intdiving

intshifting

linesearchdiving

localbranching

mutation

subnlp

objpscostdiving

octane

oneopt

pscostdiving

rensrins

rootsoldiving

rounding

shifting

shift&prop

simplerounding

trivial

trysol

twooptundercover

veclendiving

default

Variable

Event

default

Branch

allfullstrong

fullstrong

inference

leastinf

mostinf

pscostrandom

relpscost

Conflict

ConstraintHandler

and

bounddisjunc.

countsols cumu

lative

indicator

integral

knapsack

linear

linking

logicor

ororbitope

quadratic

setppc

soc

sos1

sos2

varbound

default

Cutpool

LP

clp

cpxmsk

none

qso

spx

default

Dialog

default

Display

default

Nodeselector

bfs

dfs

estimate

hybridestim

default

· · ·

Presolver

boundshift

dualfix

implics

inttobinary

probing

default

Implications

Tree

Reader

ccg

cip

cnf

fix

lp

mps opb

ppm

rlp

sol

sos

default

Pricer

Separator

clique

cmir

flowcover

gomory

impliedbounds intobj

mcf

oddcycle

rapidlearn

redcost

strongcgdefault

Propagator

pseudoobj

rootredcost

default

Relax

47

Page 114: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

TSP Plugins

SCIP PrimalHeuristic

farthestinsert

coefdiving

2-Optdins

feaspump

fixandinfer

fracdiving

guideddiving

intdiving

intshifting

linesearchdiving

localbranching

mutation

subnlp

objpscostdiving

octane

oneopt

pscostdiving

rensrins

rootsoldiving

rounding

shifting

shift&prop

simplerounding

trivial

trysol

twooptundercover

veclendiving

default

Variable

Event

default

solfound

Branch

allfullstrong

fullstrong

inference

leastinf

mostinf

pscostrandom

relpscost

Conflict

ConstraintHandler

subtour

bounddisjunc.

countsols cumu

lative

indicator

integral

knapsack

linear

linking

logicor

ororbitope

quadratic

setppc

soc

sos1

sos2

varbound

default

Cutpool

LP

clp

cpxmsk

none

qso

spx

default

Dialog

default

Display

default

Nodeselector

bfs

dfs

estimate

hybridestim

default

· · ·

Presolver

boundshift

dualfix

implics

inttobinary

probing

default

Implications

Tree

Reader

tsp

cip

cnf

fix

lp

mps opb

ppm

rlp

sol

sos

default

Pricer

Separator

clique

cmir

flowcover

gomory

impliedbounds intobj

mcf

oddcycle

rapidlearn

redcost

strongcgdefault

Propagator

pseudoobj

rootredcost

default

Relax

47

Page 115: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

TSP Plugins

lines of C++ code in TSP-example

main program: 196 linesgraph structure: 80 linesTSP �le reader: 407 linesnosubtour constraint: 793 linesfarthest insert heuristic: 354 lines2-Opt heuristic: 304 linesGomory-Hu algo: 658 lines

altogether: 2134 lines

48

Page 116: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Cutting circles from area-minimizing rectangles

Task

Given n circles of radii r1, . . . , rn > 0, �nd a rectangle of width w andheight h such that all circles �t into the rectangle without overlap and thearea hw is minimized.

area = 12.66

Download

. http://www.zib.de/gleixner/download/exercise-circlecut.pdf

. SCIP binary from http://scip.zib.de

→ hands-o

nsession

tomorrow

49

Page 117: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Cutting circles from area-minimizing rectangles

Task

Given n circles of radii r1, . . . , rn > 0, �nd a rectangle of width w andheight h such that all circles �t into the rectangle without overlap and thearea hw is minimized.

area = 12.66

Download

. http://www.zib.de/gleixner/download/exercise-circlecut.pdf

. SCIP binary from http://scip.zib.de

→ hands-o

nsession

tomorrow

49

Page 118: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Take-away messages

I MIP solving is a bag of tricks

I you can add your own ones (framework)

I there are various interesting extensions of MIP

I you can add your own ones (framework)

I SCIP is a fast, stable, non-commercial MIP solver

I SCIP is not only a MIP solver

Thank you very much for your attention!

Muito obrigado!

50

Page 119: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Take-away messages

I MIP solving is a bag of tricks

I you can add your own ones (framework)

I there are various interesting extensions of MIP

I you can add your own ones (framework)

I SCIP is a fast, stable, non-commercial MIP solver

I SCIP is not only a MIP solver

Thank you very much for your attention!

Muito obrigado!

50

Page 120: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Take-away messages

I MIP solving is a bag of tricks

I you can add your own ones (framework)

I there are various interesting extensions of MIP

I you can add your own ones (framework)

I SCIP is a fast, stable, non-commercial MIP solver

I SCIP is not only a MIP solver

Thank you very much for your attention!

Muito obrigado!

50

Page 121: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Take-away messages

I MIP solving is a bag of tricks

I you can add your own ones (framework)

I there are various interesting extensions of MIP

I you can add your own ones (framework)

I SCIP is a fast, stable, non-commercial MIP solver

I SCIP is not only a MIP solver

Thank you very much for your attention!

Muito obrigado!

50

Page 122: Ambros M. Gleixner - ZIB · Introduction to Constraint Integer Programming Ambros M. Gleixner Zuse Institute Berlin M THEONA Berlin Mathematical School 5th Porto Meeting on Mathematics

Introduction to Constraint Integer Programming

Ambros M. Gleixner

Zuse Institute Berlin · MATHEON · Berlin Mathematical School

5th Porto Meeting on Mathematics for Industry, April 10�11, 2014, Porto

51