1 Chapter 4: Integer and Mixed-Integer Linear Programming Problems 4.1 Introduction to Integer and Mixed-Integer Linear Programming 4.2 Solving Integer.

Slides:



Advertisements
Similar presentations
Integer Optimization Basic Concepts Integer Linear Program(ILP): A linear program except that some or all of the decision variables must have integer.
Advertisements

Branch-and-Bound Technique for Solving Integer Programs
BU Decision Models Integer_LP1 Integer Optimization Summer 2013.
Lesson 08 Linear Programming
1 Chapter 11 Here we see cases where the basic LP model can not be used.
DMOR Branch and bound. Integer programming Modelling logical constraints and making them linear: – Conjuction – Disjunction – Implication – Logical constraints.
Linear Programming Models & Case Studies
Water Resources Development and Management Optimization (Linear Programming) CVEN 5393 Feb 18, 2013.
EE 553 Integer Programming
Progress in Linear Programming Based Branch-and-Bound Algorithms
Water Resources Development and Management Optimization (Integer Programming) CVEN 5393 Mar 11, 2013.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Slides by JOHN LOUCKS St. Edward’s University.
Kerimcan OzcanMNGT 379 Operations Research1 Integer Linear Programming Chapter 8.
Chapter 2 Linear Programming Models: Graphical and Computer Methods © 2007 Pearson Education.
Computational Methods for Management and Economics Carla Gomes
Optimization for Network Planning Includes slide materials developed by Wayne D. Grover, John Doucette, Dave Morley © Wayne D. Grover 2002, 2003 E E 681.
Linear Programming Integer Linear Models. When Variables Have To Be Integers Example – one time production decisions –Fractional values make no sense.
Branch and Bound Algorithm for Solving Integer Linear Programming
D Nagesh Kumar, IIScOptimization Methods: M7L1 1 Integer Programming All Integer Linear Programming.
LP formulation of Economic Dispatch
Chapter 3 Introduction to optimization models. Linear Programming The PCTech company makes and sells two models for computers, Basic and XP. Profits for.
Daniel Kroening and Ofer Strichman Decision Procedures An Algorithmic Point of View Deciding ILPs with Branch & Bound ILP References: ‘Integer Programming’
(Not in text).  An LP with additional constraints requiring that all the variables be integers is called an all-integer linear program (IP).  The LP.
Integer programming Branch & bound algorithm ( B&B )
Linear programming Lecture (4) and lecture (5). Recall An optimization problem is a decision problem in which we are choosing among several decisions.
Decision Procedures An Algorithmic Point of View
Chapter 11: Hillier and Lieberman Dr. Hurley’s AGB 328 Course
1 1 Slide © 2005 Thomson/South-Western Chapter 8 Integer Linear Programming n Types of Integer Linear Programming Models n Graphical and Computer Solutions.
1 1 Slide Integer Linear Programming Professor Ahmadi.
1 1 Slide Integer Linear Programming Professor Ahmadi.
Operations Research Assistant Professor Dr. Sana’a Wafa Al-Sayegh 2 nd Semester ITGD4207 University of Palestine.
Types of IP Models All-integer linear programs Mixed integer linear programs (MILP) Binary integer linear programs, mixed or all integer: some or all of.
Integer Programming Key characteristic of an Integer Program (IP) or Mixed Integer Linear Program (MILP): One or more of the decision variable must be.
MILP algorithms: branch-and-bound and branch-and-cut
To accompany Quantitative Analysis for Management, 8e by Render/Stair/Hanna 11-1 © 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Chapter 11.
1 3.1 Basic Control Flow and Operators in the OPTMODEL Procedure 3.2 Model Updates in the OPTMODEL Procedure 3.3 Sensitivity Analysis and Parametric Programming.
To accompany Quantitative Analysis for Management, 9e by Render/Stair/Hanna 11-1 © 2006 by Prentice Hall, Inc. Upper Saddle River, NJ Chapter 11.
1 Chapter 1: Introduction to Mathematical Optimization 1.1 Introduction 1.2 Simple Examples 1.3 The OPTMODEL Procedure.
15.053Tuesday, April 9 Branch and Bound Handouts: Lecture Notes.
Gomory Cuts Updated 25 March Example ILP Example taken from “Operations Research: An Introduction” by Hamdy A. Taha (8 th Edition)“Operations Research:
Branch-and-Cut Valid inequality: an inequality satisfied by all feasible solutions Cut: a valid inequality that is not part of the current formulation.
Divide and Conquer Optimization problem: z = max{cx : x  S}
D Nagesh Kumar, IIScOptimization Methods: M7L2 1 Integer Programming Mixed Integer Linear Programming.
Branch and Bound Algorithms Present by Tina Yang Qianmei Feng.
Chapter 2. Optimal Trees and Paths Combinatorial Optimization
Chapter 8 Integer Linear Programming n Types of Integer Linear Programming Models n Graphical and Computer Solutions for an All- Integer Linear Program.
EMIS 8373: Integer Programming Column Generation updated 12 April 2005.
5.3 Mixed Integer Nonlinear Programming Models. A Typical MINLP Model.
Integer Programming, Branch & Bound Method
Introduction to Integer Programming Integer programming models Thursday, April 4 Handouts: Lecture Notes.
Chapter 6 Optimization Models with Integer Variables.
1 Chapter 6 Reformulation-Linearization Technique and Applications.
1 Chapter 5 Branch-and-bound Framework and Its Applications.
Linear programming Lecture (4) and lecture (5). Recall An optimization problem is a decision problem in which we are choosing among several decisions.
Discrete Optimization MA2827 Fondements de l’optimisation discrète Material from P. Van Hentenryck’s course.
Chapter 2 Linear Programming Models: Graphical and Computer Methods
Water Resources Development and Management Optimization (Integer and Mixed Integer Programming) CVEN 5393 Mar 28, 2011.
Integer Programming An integer linear program (ILP) is defined exactly as a linear program except that values of variables in a feasible solution have.
Linear Programming – Introduction
Signal processing and Networking for Big Data Applications: Lecture 9 Mix Integer Programming: Benders decomposition And Branch & Bound NOTE: To change.
5.3 Mixed-Integer Nonlinear Programming (MINLP) Models
The CPLEX Library: Mixed Integer Programming
Introduction to Operations Research
Integer Linear Programming
Linear Programming Integer Linear Models.
Linear Programming Integer Linear Models.
Branch-and-Bound Algorithm for Integer Program
Integer LP: Algorithms
Discrete Optimization
Presentation transcript:

1 Chapter 4: Integer and Mixed-Integer Linear Programming Problems 4.1 Introduction to Integer and Mixed-Integer Linear Programming 4.2 Solving Integer and Mixed-Integer Linear Programming Problems Using the OPTMODEL Procedure 4.3 Modeling Using Binary Variables 4.4 Modeling Sudoku as an ILP (Self-Study) 4.5 Mixed-Integer Linear Programming Solver Options (Self-Study)

2 Chapter 4: Integer and Mixed-Integer Linear Programming Problems 4.1 Introduction to Integer and Mixed-Integer Linear Programming 4.2 Solving Integer and Mixed-Integer Linear Programming Problems Using the OPTMODEL Procedure 4.3 Modeling Using Binary Variables 4.4 Modeling Sudoku as an ILP (Self-Study) 4.5 Mixed-Integer Linear Programming Solver Options (Self-Study)

3 Objectives Understand how, conceptually and geometrically, the branch-and-bound method solves integer and mixed-integer linear programming problems. Understand how, geometrically, cutting planes can strengthen the formulation of an integer or mixed- integer linear programming problem. Understand the role and importance of the presolver and cutting planes in solving integer and mixed-integer linear programming problems using the OPTMODEL procedure.

4 Mixed-Integer Linear Programming Problems Each of the linear constraints can be either an inequality or an equation. The bounds can be ±∞, so that x j can be restricted to be non-negative (l j =0 and u j =+∞) or free (l j =-∞ and u j =+∞). S is a non-empty subset of {1,2,…,n}

5 Integer Linear Programming Problems Each of the linear constraints can be either an inequality or an equation. The bounds can be ±∞, so that x j can be restricted to be non-negative (l j =0 and u j =+∞) or free (l j =-∞ and u j =+∞).

6 Two-Dimensional Example The following integer linear programming (ILP) problem has decision variables x and y: maximize6x +5y subject to2x + 3y ≤ 7 2x - y ≤ 2 x ≥ 0, y ≥ 0 x integer, y integer

7 Two-Dimensional Example The following integer linear programming (ILP) problem has decision variables x and y: maximize6x +5y subject to2x + 3y ≤ 7 2x - y ≤ 2 x ≥ 0, y ≥ 0 x integer, y integer The linear constraints and bounds of the ILP determine a feasible region in two dimensions: the feasible region of the linear programming (LP) relaxation. linear constraints and bounds

8 Feasible Region y axis x axis feasible solutions

9 The Branch-and-Bound Method y axis x axis feasible solutions optimal solution to LP relaxation

10 Feasible Region y axis x axis feasible solutions

11 Feasible Region y axis x axis feasible solutions optimal solution to LP relaxation

12 Feasible Region y axis x axis feasible solutions

13 Feasible Region: Branch y ≥ 2 y axis x axis feasible solutions

14 Feasible Region: Branch y ≤ 1 y axis x axis feasible solutions

15 Feasible Region: Branch y ≤ 1 y axis x axis feasible solutions optimal solution to LP relaxation

16 Feasible Region: Branch y ≥ 2 y axis x axis feasible solutions optimal solution to LP relaxation

17 Feasible Region: Branch y ≥ 2 y axis x axis feasible solutions

18 Feasible Region: Branch y ≥ 2 y axis x axis feasible solutions optimal solution to LP relaxation

19 Feasible Region y axis x axis feasible solutions

20 The Branch-and-Bound Method y axis x axis feasible solutions optimal solution to LP relaxation

21 Feasible Region y axis x axis feasible solutions

22 Feasible Region y axis x axis feasible solutions optimal solution to LP relaxation

23 Feasible Region y axis x axis feasible solutions

24 Feasible Region: Branch y ≥ 2 y axis x axis feasible solutions

25 Feasible Region: Branch y ≤ 1 y axis x axis feasible solutions

26 Feasible Region: Branch y ≤ 1 y axis x axis feasible solutions optimal solution to LP relaxation

27 Feasible Region: Branch y ≥ 2 y axis x axis feasible solutions optimal solution to LP relaxation

28 Feasible Region: Branch y ≥ 2 y axis x axis feasible solutions

29 Feasible Region: Branch y ≥ 2 y axis x axis feasible solutions optimal solution to LP relaxation

30 The Branch-and-Bound Tree (LP 0): z* = 16 x*=1⅝, y*=1¼ (LP 2): z* = 14⅓ x*=1, y*=1⅔ (LP 3): z* = 11 x*=1, y*=1 (LP 4): z* = 13 x*=½, y*=2 (LP 5): infeasible (LP 6): z* = 11⅔ x*=0, y*=2⅓ (LP 1): infeasible x ≤ 1 x ≥ 2 y ≤ 1 y ≥ 2 x ≥ 1 x ≤ 0

31 How Branch-and-Bound Works If the LP relaxation of a subproblem has an optimal solution that is feasible to the MILP, no branching is required. The branching variable can be any integral variable that has a fractional value in the optimal solution to the LP relaxation. An infeasible subproblem can be pruned. A subproblem whose bound is no better than BestInteger (the objective value of a known feasible solution to the MILP) can be pruned (or fathomed). The MILP is solved as soon as all active subproblems (or active nodes of the branch-and-bound tree) have been solved.

32 Branch-and-Bound Flow Chart Choose a branching variable Update BestInteger Choose an active node Solve LP Infeasible? Integral? Fathom? Create new active nodes yes no yes

33 The OPTMILP Presolver Before solving a mixed-integer linear programming problem, the MILP presolver does the following: identifies and removes redundant constraints and variables substitutes some variables that are defined by equations modifies constraint coefficients to strengthen the formulation of the problem

34 Cutting Planes for ILPs and MILPs Suppose that you solve the LP relaxation of an MILP and find a fractional optimal solution. Cutting planes are inequalities that cut off (are not satisfied by) the optimal solution to the LP relaxation are satisfied by all feasible solutions to the MILP. Cutting planes strengthen the LP relaxation of an MILP and make it easier to solve by the branch-and-bound method.

35 Cutting Planes: Example (ILP) y axis x axis feasible solutions optimal solution to LP relaxation x+2y ≤ 4

36 How Cutting Planes Are Generated Cutting planes can be generated from the following: individual inequalities together with the variable bounds from the MILP the inequalities satisfied by the optimal solution to the LP relaxation of the MILP stronger relaxations involving all of the inequalities from the MILP logical relations between 0–1 variables in the MILP

37 These exercises reinforce the concepts discussed previously. Exercises 1–4

38 Chapter 4: Integer and Mixed-Integer Linear Programming Problems 4.1 Introduction to Integer and Mixed-Integer Linear Programming 4.2 Solving Integer and Mixed-Integer Linear Programming Problems Using the OPTMODEL Procedure 4.3 Modeling Using Binary Variables 4.4 Modeling Sudoku as an ILP (Self-Study) 4.5 Mixed-Integer Linear Programming Solver Options (Self-Study)

39 Objectives Be able to solve integer and mixed-integer linear programming problems using the OPTMODEL procedure. Learn which information is written to the SAS log file during the solution of an integer or mixed-integer programming problem.

40 Declaring Integer Variables in PROC OPTMODEL Variables can be declared to be either integer variables or binary (0–1) variables: var x >= 0 <= 2 integer; var y{Arcs} >= 0 integer; var z{Nodes} binary;

41 Declaring Integer Variables in PROC OPTMODEL Variables can be declared to be either integer variables or binary (0–1) variables: The integrality of a variable can be relaxed using a nonzero, nonmissing value of the.relax suffix: x.relax = 1; y['New York','Paris'].relax = 1; for {k in Nodes} z[k].relax = 1; var x >= 0 <= 2 integer; var y{Arcs} >= 0 integer; var z{Nodes} binary;

42 Termination Criteria for MILPs The MILP solver will usually terminate when the relative objective gap falls below a certain value: BestInteger = BestBound = Active Nodes objective value of the best feasible solution found “best” bound at an active node of the branching tree

43 Termination Criteria for MILPs The MILP solver has other termination criteria that can be set using OPTMILP solver options: Solver OptionDescription ABSOBJGAP=Absolute difference between BestBound and BestInteger values (default 1E-6) CUTOFF=Cut off all nodes with a worse bound MAXNODES=Maximum number of nodes in the tree MAXSOLS=Maximum number of solutions found MAXTIME=Maximum real time (seconds) allowed RELOBJGAP=Relative difference (default 1E-4) TARGET=Target value for BestInteger

44 This demonstration illustrates the solution of an integer linear programming problem using PROC OPTMODEL. Solving the Integer Linear McDonald’s Diet Problem Using PROC OPTMODEL mcdonalds_int.sas

45 MILP Solver Options The MILP solver has a number of options in addition to termination criteria: Solver OptionDescription PRINTFREQ=Frequency of printing node log (default 100 = print to log every 100 nodes) PRIMALINCurrent values input a feasible solution PRESOLVER=Similar to other presolver options HEURISTICS=This level controls both the frequency and number of iterations allowed in searching for feasible solutions

46 Global Cutting Plane Option Cutting planes are added automatically at the root node and subsequent nodes of the tree. The ALLCUTS= option sets the level for all classes of cutting planes, but it can be overwritten by setting cut options for individual families. ALLCUTS=#Description AUTOMATICStrategy determined by solver (default) NONE0Disable cutting plane generation MODERATE1Moderate cut strategy AGGRESSIVE2Aggressive cut strategy

47 These exercises reinforce the concepts discussed previously. Exercises 5–9

48 Chapter 4: Integer and Mixed-Integer Linear Programming Problems 4.1 Introduction to Integer and Mixed-Integer Linear Programming 4.2 Solving Integer and Mixed-Integer Linear Programming Problems Using the OPTMODEL Procedure 4.3 Modeling Using Binary Variables 4.4 Modeling Sudoku as an ILP (Self-Study) 4.5 Mixed-Integer Linear Programming Solver Options (Self-Study)

49 Objectives Learn how to model logical constraints using binary (0-1) variables. Learn how to use binary variables with continuous variables to model fixed costs.

50 Modeling Fixed Costs For a continuous variable x with 0 ≤ x ≤ u, you can use a binary variable z to model a fixed cost. cost = m * x + b if x>0 0 if x=0 x axis cost = m * x+b * z 0 ≤ x ≤ u x ≤ u * z z binary

51 This demonstration illustrates the solution of an mixed-integer linear programming problem with set-up costs in PROC OPTMODEL. Solving the Furniture-Making Problem with Set-Up Costs in PROC OPTMODEL furniture_setup.sas

52 Modeling Logical Constraints In the furniture-making problem with set-up costs, suppose that either bedframes or bookcases can be made, but not both. How can you model this?

53 Modeling Logical Constraints In the furniture-making problem with set-up costs, suppose that either bedframes or bookcases can be made, but not both. How can you model this? z['bedframes'] + z['bookcases'] <= 1;

54 Modeling Logical Constraints In the furniture-making problem with set-up costs, suppose that either bedframes or bookcases can be made, but not both. How can you model this? Other logical constraints can also be modeled using binary variables. z['bedframes'] + z['bookcases'] <= 1;

55 Modeling Logical Constraints In the furniture-making problem with set-up costs, suppose that either bedframes or bookcases can be made, but not both. How can you model this? Other logical constraints can also be modeled using binary variables. For example, what restriction does the following constraint model? z['bedframes'] + z['bookcases'] <= 1; z['chairs'] <= z['desks'];

56 Modeling Logical Constraints Suppose that chairs cannot be made if two (or more) of the other products are made. How can you model this?

57 Modeling Logical Constraints Suppose that chairs cannot be made if two (or more) of the other products are made. How can you model this? 2*z['chairs'] + z['bedframes'] + z['bookcases'] + z['desks'] <= 3;

58 Modeling Logical Constraints Suppose that chairs cannot be made if two (or more) of the other products are made. How can you model this? This can also be modeled using three inequalities: 2*z['chairs'] + z['bedframes'] + z['bookcases'] + z['desks'] <= 3; z['chairs'] + z['bedframes'] + z['bookcases'] <= 2; z['chairs'] + z['bedframes'] + z['desks'] <= 2; z['chairs'] + z['bookcases'] + z['desks'] <= 2;

59 Example: Discount Pricing a Product Mix Recall the organic potting soil product mix: Discount Pricing Strategy: [1] x classic_ new mex packs planting prick-out rec  0-50 cubic yards: full price  cubic yards: 10% discount  cubic yards: 20% discount

60 Example: Discount Pricing a Product Mix Recall the organic potting soil product mix: Discount Pricing Strategy: [1] x classic_ new mex packs planting prick-out rec  0-50 cubic yards: full price  cubic yards: 10% discount  cubic yards: 20% discount

61 Example: Discount Pricing a Product Mix Discount Pricing Strategy:  0-50 cubic yards: full price (k=0)  cubic yards: 10% discount (k=1)  cubic yards: 20% discount (k=2) x[p]= total sold y[p,k]= total sold at 10 * k% discount z[p,k]= indicator for 10 * k% discount How can we link these variables?

62 Example: Discount Pricing a Product Mix Discount Pricing Strategy:  0-50 cubic yards: full price (k=0)  cubic yards: 10% discount (k=1)  cubic yards: 20% discount (k=2) x[p]= total sold y[p,k]= total sold at 10 * k% discount z[p,k]= indicator for 10 * k% discount z[p,0]+z[p,1]+z[p,2] = 1; y[p,0]+y[p,1]+y[p,2] = x[p]; 0 <= y[p,0] <= 50*z[p,0]; 50*z[p,1] <= y[p,1] <= 100*z[p,1]; 100*z[p,2] <= y[p,2] <= 200*z[p,2];

63 This demonstration illustrates the solution of an mixed-integer linear programming problem with piecewise-linear pricing in PROC OPTMODEL. Solving the Organic Potting Soils Problem with Discount Pricing in PROC OPTMODEL discount.sas

64 Example: Bank Credit Card Offers A bank has three different credit card offers it can make to customers. For each customer, the bank estimates the expected profit and credit loss for each offer. Each credit card will be offered to at least 50 customers, but at most one credit card can be offered to a customer.

65 Example: Bank Credit Card Offers A bank has three different credit card offers it can make to customers. For each customer, the bank estimates the expected profit and credit loss for each offer. Each credit card will be offered to at least 50 customers, but at most one credit card can be offered to a customer. Memo To: Optimization Department From: Credit Department Maximum credit loss: $10,000. No exceptions. No excuses.

66 This class participation exercise formulates and solves an ILP with binary variables. Solving the Bank Credit Card Offer Problem in PROC OPTMODEL credit_offers.sas

67 These exercises reinforce the concepts discussed previously. Exercises 10–14