Introduction to Integer Programming. 518: Introduction to Integer Programming

Introduction to Integer Programming Marina A. Epelman Winter 2012 IOE 518: Introduction to IP, Winter 2012 Page 1 c Marina A. Epelman 518: Introd...
Author: Alice Barker
0 downloads 1 Views 308KB Size
Introduction to Integer Programming Marina A. Epelman

Winter 2012

IOE 518: Introduction to IP, Winter 2012

Page 1

c Marina A. Epelman

518: Introduction to Integer Programming

I

Lectures: Mondays and Wednesdays, 10:30 – 12:00, first half-term

I

Instructor: Marina A. Epelman ”[email protected]”, office: 2845 IOE; Office hours: as announced on the website, and by appointment

I

Textbook: “Integer Programming” by Laurence A. Wolsey.

I

See syllabus for other references

I

Other course materials, including assignments, lecture topics and these slides are available on CTools

I

Required background: IOE 510, familiarity with AMPL and/or CPLEX

IOE 518: Introduction to IP, Winter 2012

Introduction

Page 2

c Marina A. Epelman

Course Logistics I

Approximately weekly homeworks (worth a total of 30%); include some computer modeling and programming

I

A midterm exam (worth 30%) in late January or early February

I

Final exam (worth a total of 40%), tentatively on February 22nd

Individual work policy: you are allowed, indeed, encouraged to work in groups on the homework conceptualizing the problems. However, all submitted homework assignments (including computer codes and outputs, if relevant) should represent your own e↵orts. Also you may not acquire, read, or otherwise utilize answers from solutions handed out in previous terms in this, or other, courses. Please read syllabus for complete course policies. IOE 518: Introduction to IP, Winter 2012

Introduction

Page 3

c Marina A. Epelman

Informal (and tentative) course outline

I

Examples of IP formulations

I

Quality of IP formulations

I

Relaxations and bounds: assessing quality of solutions Basic techniques for solving IPs:

I

I I I

Branch and Bound algorithms Cutting plane methods Dynamic programming (?)

I

Lagrangian duality

I

Approximation methods

I

Heuristic Algorithms (?)

IOE 518: Introduction to IP, Winter 2012

Introduction

Page 4

c Marina A. Epelman

From Linear Programs to Integer Programs Formalisms

A Linear programming/optimization Problem (LP): I

A mathematical optimization problem:

I

Optimize a linear objective function...

I

subject to linear constraints on decision variables...

I

and decision variables are continuous, i.e., allowed to take on integer or fractional values

A linear Integer programming/optimization Problem (IP): I

A mathematical optimization problem:

I

Optimize a linear objective function...

I

subject to linear constraints on decision variables...

I

and decision variables are integer, i.e., only allowed to take on integer values

IOE 518: Introduction to IP, Winter 2012

Integer Programs defined

Page 5

c Marina A. Epelman

From LPs to IPs Example: snack attack

I

Almonds (3 oz), Cashews (2 oz), Walnuts (2 oz) available

I

You love almonds, like cashews, walnuts are OK

I

You have room for 4 oz of nuts

I

Goal: fill up to maximize utility

Take all (3 oz) of almonds and 1/2 (1 oz) of cashews IOE 518: Introduction to IP, Winter 2012

Take all (3 oz) of almonds — no room for others, or take cashews and walnuts?

Integer Programs defined

Page 6

c Marina A. Epelman

Some of the application areas for Integer Programming1

I

Aviation I I I

I

Media I

I

Sales of TV ad slots during the upfronts (NBC)

Sports I

I

Crew scheduling and rostering (New Zealand Air) Crew recovery in the face if schedule disruptions (Continental) Flexjet aircraft and crew scheduling

Creation of sport leagues schedules

Supply chain management I

Complex bid-based sourcing strategy (Procter and Gamble)

1

For details, and additional examples, see Success Stories at http://www.scienceofbetter.org/ and articles in INFORMS journal Interfaces IOE 518: Introduction to IP, Winter 2012

Integer Programs defined

Page 7

c Marina A. Epelman

Integer Programming: what do we study? I

Many real life problems involve integer variables or discrete decisions I

I

Methods for solving LPs do not (usually) work to solve IPs I

I

Need to develop solution methods (algorithms) for IPs

Solving IPs requires large amounts of computer memory and time I I I

I

Need to extend our modeling vocabulary beyond LPs

Need to understand what makes IPs hard to solve Identify IPs that have some special features Develop specialized solution methods that exploit these features to save memory and/or time

Challenges for IP researchers and practitioners: I I I

Solve problems we can’t solve today Solve what we already can faster Solve what we already can with better accuracy

IOE 518: Introduction to IP, Winter 2012

Integer Programs defined

Page 8

c Marina A. Epelman

What is an integer program? Matix-vector notation: Vector of variables x 2 Rn , A 2 Rm⇥n with [A]ij = aij , b 2 Rm , with [b]i = bi , c 2 Rn , with [c]j = cj Pn max c j xj max c T x x1 ,...,xn Pj=1 x n (LP) s.t. or s.t. Ax  b j=1 aij xj  bi i = 1, . . . , m x1 , . . . , xn 0 x 0 If all variables are integer: we have a (Linear) Integer Program: (IP) maxn {c T x : Ax  b, x

0 and integer}.

x2R

If each variable is only allowed to take on values 0 or 1, i.e., all variables are binary, we have a 0-1, or Binary, Integer Program: (BIP) maxn {c T x : Ax  b, x 2 {0, 1}n } x2R

IOE 518: Introduction to IP, Winter 2012

Integer Programs defined

Page 9

c Marina A. Epelman

What is an integer program? (Linear) Mixed Integer Program (most general form): a linear programming problem with the added restriction that some of the variables must take integer values.

max

x1 ,...,xn , y1 ,...,yp

(MIP)

s.t.

Pn

j=1 cj xj +

Pn

j=1 aij xj

x1 , . . . , xn y1 , . . . , yp

+

Pp

j=1 hj yj

Pp

j=1 gij yj

 bi

i = 1, . . . , m

0 0 and integer

Or, in matrix-vector form: max

c T x+ hT y

s.t.

Ax+ Gy  b x 0; y 0 and integer

x,y

(MIP)

IOE 518: Introduction to IP, Winter 2012

Integer Programs defined

Page 10

c Marina A. Epelman

In AMPL: mip.mod file # # # #

Generic formulation of a MIP Assumes presence of at least one continuous and at least one integer variable, and at least one inequality constraint

param n>0; # number of continuous variables param p>0; # number of integer variables param m>0; # number of inequality constraints param param param param param

a{1..m,1..n}; b{1..m}; c{1..n}; g{1..m,1..p}; h{1..p};

var x {1..n} >=0; var y {1..p} integer >=0; maximize Objective_Function: sum{j in 1..n}c[j]*x[j]+sum{j in 1..p}h[j]*y[j]; subject to Inequality_Constraint {i in 1..m}: sum{j in 1..n}a[i,j]*x[j]+sum{j in 1..p}g[i,j]*y[j]