INTEGER PROGRAMMING. Integer Programming. Prototype example. BIP model. BIP models



Similar documents
Chapter 13: Binary and Mixed-Integer Programming

5 INTEGER LINEAR PROGRAMMING (ILP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1

24. The Branch and Bound Method

A Constraint Programming based Column Generation Approach to Nurse Rostering Problems

A Branch and Bound Algorithm for Solving the Binary Bi-level Linear Programming Problem

Scheduling Home Health Care with Separating Benders Cuts in Decision Diagrams

Discrete Optimization

Integer Programming. subject to: (i = 1, 2,..., m),

Linear Programming for Optimization. Mark A. Schulze, Ph.D. Perceptive Scientific Instruments, Inc.

Approximation Algorithms

MODELS AND ALGORITHMS FOR WORKFORCE ALLOCATION AND UTILIZATION

at which branching takes place, a "middleman," if you will. See the transship model panel. ABSTRACT

Lecture 10 Scheduling 1

Branch-and-Price Approach to the Vehicle Routing Problem with Time Windows

A Column-Generation and Branch-and-Cut Approach to the Bandwidth-Packing Problem

Multi-layer MPLS Network Design: the Impact of Statistical Multiplexing

Applied Algorithm Design Lecture 5

Cost Models for Vehicle Routing Problems Stanford Boulevard, Suite 260 R. H. Smith School of Business

1 Introduction. Linear Programming. Questions. A general optimization problem is of the form: choose x to. max f(x) subject to x S. where.

Models in Transportation. Tim Nieberg

Route optimization applied to school transports A method combining column generation with greedy heuristics

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.

Network Models 8.1 THE GENERAL NETWORK-FLOW PROBLEM

Chapter 3 INTEGER PROGRAMMING 3.1 INTRODUCTION. Robert Bosch. Michael Trick

OPRE 6201 : 2. Simplex Method

3 Introduction to Linear Programming

Strategic planning in LTL logistics increasing the capacity utilization of trucks

Integrating Benders decomposition within Constraint Programming

Linear Programming. Solving LP Models Using MS Excel, 18

Chapter Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling

Optimization with Big Data: Network Flows

Scheduling of Mixed Batch-Continuous Production Lines

Lecture 3. Linear Programming. 3B1B Optimization Michaelmas 2015 A. Zisserman. Extreme solutions. Simplex method. Interior point method

An Implementation of a Constraint Branching Algorithm for Optimally Solving Airline Crew Pairing Problems

How to speed-up hard problem resolution using GLPK?

Discuss the size of the instance for the minimum spanning tree problem.

Charles Fleurent Director - Optimization algorithms

An optimization model for aircraft maintenance scheduling and re-assignment

Planning and Scheduling in the Digital Factory

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.

Multiple Spanning Tree Protocol (MSTP), Multi Spreading And Network Optimization Model

Optimization Modeling for Mining Engineers

A Column Generation Model for Truck Routing in the Chilean Forest Industry

Two objective functions for a real life Split Delivery Vehicle Routing Problem

Recovery of primal solutions from dual subgradient methods for mixed binary linear programming; a branch-and-bound approach

USING EXCEL SOLVER IN OPTIMIZATION PROBLEMS

Noncommercial Software for Mixed-Integer Linear Programming

Practical Guide to the Simplex Method of Linear Programming

Scheduling Algorithm with Optimization of Employee Satisfaction

Optimal Scheduling for Dependent Details Processing Using MS Excel Solver

Minimizing costs for transport buyers using integer programming and column generation. Eser Esirgen

2.3 Convex Constrained Optimization Problems

Special Session on Integrating Constraint Programming and Operations Research ISAIM 2016

Optimization Theory for Large Systems

Dynamic programming formulation

A scenario aggregation based approach for determining a robust airline fleet composition

JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS. Received December May 12, 2003; revised February 5, 2004

Classification - Examples

Nonlinear Optimization: Algorithms 3: Interior-point methods

Scheduling Shop Scheduling. Tim Nieberg

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay

Measuring the Performance of an Agent

Routing in Line Planning for Public Transport


In this paper we present a branch-and-cut algorithm for

A Decision Support System for Crew Planning in Passenger Transportation using a Flexible Branch-and-Price Algorithm

Introduction: Models, Model Building and Mathematical Optimization The Importance of Modeling Langauges for Solving Real World Problems

Nonlinear Programming Methods.S2 Quadratic Programming

Branch, Cut, and Price: Sequential and Parallel

Linear Programming Supplement E

Optimization of Supply Chain Networks

Introduction & Overview

Motivated by a problem faced by a large manufacturer of a consumer product, we

CHAPTER 9. Integer Programming

Workforce scheduling with logical constraints: theory and applications in call centers

Decision Mathematics D1 Advanced/Advanced Subsidiary. Tuesday 5 June 2007 Afternoon Time: 1 hour 30 minutes

Discrete Optimization Introduction & applications

Chapter 6. Linear Programming: The Simplex Method. Introduction to the Big M Method. Section 4 Maximization and Minimization with Problem Constraints

Modeling and Solving the Capacitated Vehicle Routing Problem on Trees

Efficient and Robust Allocation Algorithms in Clouds under Memory Constraints

Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits

A MODEL TO SOLVE EN ROUTE AIR TRAFFIC FLOW MANAGEMENT PROBLEM:

Final Report. to the. Center for Multimodal Solutions for Congestion Mitigation (CMS) CMS Project Number:

The Problem of Scheduling Technicians and Interventions in a Telecommunications Company

Social Media Mining. Data Mining Essentials

npsolver A SAT Based Solver for Optimization Problems

COORDINATION PRODUCTION AND TRANSPORTATION SCHEDULING IN THE SUPPLY CHAIN ABSTRACT

2007/26. A tighter continuous time formulation for the cyclic scheduling of a mixed plant

HYBRID GENETIC ALGORITHMS FOR SCHEDULING ADVERTISEMENTS ON A WEB PAGE

Integer Programming Formulation

Adaptive Linear Programming Decoding

VEHICLE ROUTING PROBLEM

Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar

Algebra 2 Chapter 1 Vocabulary. identity - A statement that equates two equivalent expressions.

. P. 4.3 Basic feasible solutions and vertices of polyhedra. x 1. x 2

Het inplannen van besteld ambulancevervoer (Engelse titel: Scheduling elected ambulance transportation)

The Multi-Item Capacitated Lot-Sizing Problem With Safety Stocks In Closed-Loop Supply Chain

Multiple Linear Regression in Data Mining

Clustering and scheduling maintenance tasks over time

Transcription:

Integer Programming INTEGER PROGRAMMING In many problems the decision variables must have integer values. Example: assign people, machines, and vehicles to activities in integer quantities. If this is the only deviation from linear programming, it is called an integer programming (IP) problem. If only some variables are required to be integer, the model is called a mixed integer programming (MIP) San Francisco Police Dep. problem is an IP problem. Wyndor Glass Co. problem could be an IP problem; how? João Miguel da Costa Sousa / Alexandra Moutinho 26 Integer Programming In integer programming the divisibility assumption must be dropped. Another area of application relates to problems involving yes or no decisions, which have binary variables. These IP problems are called binary integer programming (BIP) problems. A small example of a typical BIP problem is given in the following. Prototype example California Manufacturing Company is considering expansion, building a factory in Los Angeles, San Francisco or in both cities. One new warehouse can also be considered in a city where a new factory is being built. Maximum $0 million to invest. Obective: find feasible combination of alternatives that maximizes the total net present value. Decision number Yes or no question Decision variable Net present value Capital required Build factory in Los Angeles? x $9 million $6 million 2 Build factory in San Francisco? x 2 $5 million $3 million 3 Build warehouse in Los Angeles? x 3 $6 million $5 million 4 Build warehouse in San Francisco? x 4 $4 million $2 million João Miguel da Costa Sousa / Alexandra Moutinho 262 João Miguel da Costa Sousa / Alexandra Moutinho 263 BIP model All decision variables have the binary form: if decision is yes, x = =,2,3,4 0 if decision is no, Z = total net present value of these decisions. Maximize Z = 9x + 5x 2 + 6x 3 + 4x 4. Constraints: 6x + 3x 2 + 5x 3 + 2x 4 0 x 3 + x 4 Mutually exclusive alternatives x 3 x and x 4 x 2 Contingent decisions x is binary, for =,2,3,4. João Miguel da Costa Sousa / Alexandra Moutinho 264 BIP models Groups of yes or no decisions often constitute groups of mutually exclusive alternatives: only one decision in the group can be yes. Occasionally, decisions of the yes or no type are contingent decisions: decision that depends upon previous ones. Software options for solving BIP, IP or MIP models: Excel MatLab LINGO/LINDO MPL/CPLEX João Miguel da Costa Sousa / Alexandra Moutinho 265

BIP applications Formulation examples Investment analysis, such as the California Man. Co. Site selection, of factories, warehouses, etc. Designing a production and distribution network, or more generally the entire global supply chain. Dispatching shipments, scheduling routes, vehicles and time period for departure and arrivals. Airline applications, as e.g. fleet assignment and crew scheduling. Scheduling interrelated activities, asset divestures, etc. Example : making choices when decision variables are continuous. R&D Division of Good Products Co. has developed three possible new products. Requirement : from the three, at most two can be chosen to be produced. Each product can be produced in either of two plants. However, management has imposed another restriction: Requirement 2: ust one of the two plants can be chosen as the producer of the new products. João Miguel da Costa Sousa / Alexandra Moutinho 266 João Miguel da Costa Sousa / Alexandra Moutinho 267 Example Production time used for each unit produced Production time available per week Product Product 2 Product 3 Plant 3 hours 4 hours 2 hours 30 hours Plant 2 4 hours 6 hours 2 hours 40 hours Unit profit 5 7 3 (0 3 $) Sales potential 7 5 9 (units per week) Obectives: choose the products, the plant and the production rates of the chosen products to maximize total profit. João Miguel da Costa Sousa / Alexandra Moutinho 268 Formulation of the problem Similar to a standard product mix problem, such as the Wyndor Glass Co. if we drop the two restrictions and require each product to use production hours in both plants. Let x, x 2, x 3 be the production rates of the respective products: Maximize Z= 5x + 7x2+ 3x 3 subect to 3x + 4x2+ 2x3 30 4x + 6x2+ 2x3 40 x 7 x2 5 x3 9 x, x, x 0 2 3 João Miguel da Costa Sousa / Alexandra Moutinho 269 Formulation of the problem For real problem, restriction adds the constraint: Number of strictly positive variables (x, x 2, x 3 ) must be 2 This must be converted to an IP problem. It needs the introduction of auxiliary binary variables. Restriction 2 requires replacing the first two functional constraints by: Either 3x + 4x2+ 2x3 30 or 4x + 6x + 2x 40 must hold. 2 3 This again requires an auxiliary binary variable. João Miguel da Costa Sousa / Alexandra Moutinho 270 Auxiliary binary variables For requirement, three auxiliary binary variables (y, y 2, y 3 )are introduced: if x > 0 can hold (can produce product ) y = 0 if x = 0 must hold (cannot produce product ) This is introduced in the model with the help of an extremely large positive number M, adding the constraints: x My x2 My2 x3 My3 y+ y2+ y3 2 y is binary, for =,2,3. João Miguel da Costa Sousa / Alexandra Moutinho 27 2

Auxiliary binary variables For requirement 2, another auxiliary binary variable y 4 is introduced: if 4x+ 6x2+ 2x3 40 must hold (choose Plant 2) y4 = 0 if 3x+ 4x2+ 2x3 30 must hold (choose Plant ) This adds the constraints: 3x+ 4x2+ 2x3 30+ My4 4x+ 6x2+ 2x3 40 + M( y4) y is binary 4 João Miguel da Costa Sousa / Alexandra Moutinho 272 Complete model (MIP) Maximize Z= 5x + 7x + 3x 2 3 subect to x 7 2 3 x 5 x 9 x My 0 x My 0 2 2 x My 0 3 3 y + y + y 2 2 3 3x + 4x + 2x My 30 2 3 4 4x + 6x + 2x + My 40+ M 2 3 4 and x 0, for i=,2,3 i y is binary, for =,2,3,4 João Miguel da Costa Sousa / Alexandra Moutinho 273 Solution MIP problem with 3 continuous and four binary variables. Optimal solution: y =, y 2 = 0, y 3 =, y 4 =, x = 5.5, x 2 = 0, x 3 = 9. That is, produce products and 3 with production rates 5.5 units per week and 9 units per week respectively, and choose Plant 2 for production. Resulting total profit is $54,500 per week. João Miguel da Costa Sousa / Alexandra Moutinho 274 Example: Southwestern Airways Southwestern Airways needs to assign three crews to cover all the upcoming flights. Table shows the flights in the first column. Other 2 columns show the 2 feasible sequences of flights for a crew. Numbers in each column indicate the order of the flights. Exactly three sequences must be chosen (one per crew). More than one crew can be assigned to a flight, but it must be paid as if it was working. Last row shows the cost of assigning a crew to a particular sequence of flights. João Miguel da Costa Sousa / Alexandra Moutinho 275 Data for Southwestern Airways Formulation of the problem Feasible sequence of flights Flight 2 3 4 5 6 7 8 9 0 2. San Francisco to Los Angeles 2. San Francisco to Denver 3. San Francisco to Seattle 4. Los Angeles to Chicago 2 2 3 2 3 5. Los Angeles to San Francisco 2 3 5 5 6. Chicago to Denver 3 3 4 7. Chicago to Seattle 3 3 3 3 4 8. Denver to San Francisco 2 4 4 5 9. Denver to Chicago 2 2 2 0. Seattle to San Francisco 2 4 4 5. Seattle to Los Angeles 2 2 4 4 2 Cost (000 ) 2 3 4 6 7 5 7 8 9 9 8 9 João Miguel da Costa Sousa / Alexandra Moutinho 276 Obective: minimize the total cost for the three crew assignments that cover all flights. 2 feasible sequences of flights: 2 yes or no decisions: Should sequence be assigned to a crew? The 2 binary variables to represent the decisions are: if sequence is assigned to a crew x = 0 otherwise João Miguel da Costa Sousa / Alexandra Moutinho 277 3

Formulation of the problem Minimize Z= 2x + 3x + 4x + 6x + 7x + 5x + 7x + 8x + 9x + 9x + 8x + 9x 2 3 4 5 6 7 8 9 0 2 subect to x + x4+ x7 + x (SF to LA) 0 x2+ x5+ x8+ x x + x + x9+ x 3 6 2 x4 + x7 + x 9 + x + x 0 2 x + + + and x is binary, x6 x0 x x4+ x5+ x9 for =,2,,2 x7 + x8 + x + x + x 0 2 x2+ x4+ x5+ x9 x5+ x8+ x x3+ x7+ x8+ x 2 x + x + x + x + x 6 9 0 2 2 x = 3 (assign three crews) João Miguel da Costa Sousa / Alexandra Moutinho 278 = Solution One optimal solution is: x 3 = (assign sequence 3 to a crew) x 4 = (assign sequence 4 to a crew) x = (assign sequence to a crew) And all other x = 0. Total cost is $8,000. Another optimal solution is: x = x 5 = x 2 =. João Miguel da Costa Sousa / Alexandra Moutinho 279 Discussion This example belongs to a class called set covering problems, with a number of potential activities (e.g. flight sequences) and characteristics (e.g. flights). Obective: determine the least costly combination of activities that collectively possess each characteristic at least once. S i is the set of all activities that possess characteristic i. A constraint is included for each characteristic i: x Si In set partitioning problems the constraint is x = S João Miguel da Costa Sousa / Alexandra Moutinho 280 Solving IP problems Are integer problems easy to solve? Difference to LP is that IP have far fewer solutions. IP problems have a finite number of feasible solutions. However: Finite it numbers can be astronomically large! With n variables a BIP problem has 2 n solutions, having exponential growth. LP assures that a CPF solution can be optimal, guaranteeing the remarkable efficiency of the simplex method. LP problems are much easier to solve than IP problems! João Miguel da Costa Sousa / Alexandra Moutinho 28 Solving IP problems Solving IP problems Consequently, most IP algorithms incorporate the simplex method. This is called the LP relaxation. Sometimes, the solution of the LP problem is the solution of the IP problem, such as : Minimum cost flow problem, including transportation problem, assignment problem, shortest path problem and maximum flow problem. Special structures (see examples 2 and 3): mutually exclusive alternatives, contingent decisions or setcovering constraints can also simplify the problem. João Miguel da Costa Sousa / Alexandra Moutinho 282 Primary determinants of computational complexity:. number of integer variables, 2. these variables are binary or general integer variables, 3. any special structure in the problem. This is in contrast to LP, where number of constraints is much more important than the number of variables. As IP problems are much more difficult than LP, we could apply LP and round the obtained solution... Yes? João Miguel da Costa Sousa / Alexandra Moutinho 283 4

Example Example 2 Minimize Z= x subect to x + x 0.5 2 2 x + x 3.5 2 and x, x 0, 2 x, x integers. 2 Minimize Z= x + 5x2 subect to x+ 0x2 20 x 2 and x, x 0, integers. 2 João Miguel da Costa Sousa / Alexandra Moutinho 284 João Miguel da Costa Sousa / Alexandra Moutinho 285 Solving IP problems Branch and bound applied to BIP Thus, a better approach to deal with IP problems that are too large to be solved exactly are heuristic algorithms. Heuristics and metaheuristics are extremely efficient for very large problems, but do not guarantee to find an optimal solution. These algorithms will be discussed later. Most popular traditional method for solving IP problems is the branch and bound technique. Pure IP problems can consider some type of enumeration procedure. This should be done in a clever way such that only a tiny fraction of the feasible solutions is examined. Branch and bound with a divide to conquer technique can be used. dividing (branching) the problem into smaller and smaller subproblems until it can be conquered conquering (fathoming) by bounding how good the best solution can be. If no optimal solution in subset: discard it. João Miguel da Costa Sousa / Alexandra Moutinho 286 João Miguel da Costa Sousa / Alexandra Moutinho 287 Example: California Manuf, Co. Branching Recall prototype example: Maximize Z = 9x + 5x 2 + 6x 3 + 4x 4 subect to () 6x + 3x 2 + 5x 3 + 2x 4 0 (2) x 3 + x 4 (3) x + x 3 0 (4) x 2 + x 4 0 and (5) x is binary, for =, 2, 3, 4. João Miguel da Costa Sousa / Alexandra Moutinho 288 Most straightforward way to divide the problem: fix the value of a variable: e.g. x = 0 for one subset and x = for another subset. Subproblemp (fix x =0): Subproblem 2 (fix x = ): Maximize Z =5x 2 +6x 3 +4x 4 subect to () 3x 2 +5x 3 +2x 4 0 (2) x 3 + x 4 (3) x 3 0 (4) x 2 + x 4 0 (5) x is binary, for =2,3,4. Maximize Z =9+5x 2 +6x 3 +4x 4 subect to () 3x 2 +5x 3 +2x 4 4 (2) x 3 + x 4 (3) x 3 (4) x 2 + x 4 0 (5) x is binary, for =2,3,4. João Miguel da Costa Sousa / Alexandra Moutinho 289 5

Branching Bounding Dividing (branching) into suproblems creates a tree with branches (arcs) for the All node. This is the solution tree or enumeration tree. Branching variable is the one used for branching. The branching continues or not after evaluating the subproblem. Other IP problems usually creates as many branches as needed. A bound is needed for the best feasible solution of each of the subproblems. Standard way is to perform a relaxation of the problem, e.g. by deleting one set of constraints that makes the problem difficult to solve. Most common is to require integer variables, so LP relaxation is the most widely used. João Miguel da Costa Sousa / Alexandra Moutinho 290 João Miguel da Costa Sousa / Alexandra Moutinho 29 Bounding in example Example: for the whole problem, (5) is replaced by x and x 0 for =,2,3,4. Using simplex: (x, x 2, x 3, x 4 ) = (5/6,, 0, ), with Z = 6.5 Thus, Z 6.5 for all feasible solutions for BIP problem. Can be rounded to Z 6 (why?) LP relaxation for subproblem (x =0): (x, x 2, x 3, x 4 ) = (0,, 0, ), with Z = 9 LP relaxation for subproblem 2 (x =): (x, x 2, x 3, x 4 ) = (, 4/5, 0, 4/5), with Z = 6.5 João Miguel da Costa Sousa / Alexandra Moutinho 292 Fathoming A subproblem can be conquered (fathomed, i.e. search tree is pruned) in three ways:. When the optimal solution for the LP relaxation of a subproblem is integer, it must be optimal. Example: for x =0, (x, x 2, x 3, x 4 ) = (0,, 0, ), is integer. It must be stored as first incumbent (best feasible solution found so far) for the whole problem, along with value of Z: Z * = value of Z for first incumbent In the example Z * = 9. Subproblem is solved, so it is fathomed (dismissed). João Miguel da Costa Sousa / Alexandra Moutinho 293 Fathoming Summary of fathoming tests 2. As Z * = 9, we should not consider subproblems with bound 9. Thus, a problem is fathomed when Bound Z * In Subproblem 2 that does not occur, the bound of 6 is larger than 9. However, it can occur for descendants. As new incumbents with larger values of Z * are found, it becomes easier to fathom in this way. 3. If the simplex method finds that a subproblem s LP relaxation has no feasible solution, the subproblem has no feasible solution and can be dismissed. João Miguel da Costa Sousa / Alexandra Moutinho 294 A subproblem is fathomed (dismissed) if Test : Its bound Z * or Test 2: Its LP relaxation has no feasible solutions or Test 3: Optimal solution for its LP relaxation is integer. If better, this solution becomes new incumbent, and Test is reapplied for all unfathomed subproblems. João Miguel da Costa Sousa / Alexandra Moutinho 295 6

Fathoming in example Result of applying the three tests is in figure below. Subproblem is fathomed by test 3. João Miguel da Costa Sousa / Alexandra Moutinho 296 BIP branch and bound algorithm Initialization: Set Z * =. Apply bounding, fathoming and optimization steps described below to the whole problem. If not fathomed, perform iteration. Steps for each iteration:. Branching: Among the remaining subproblems, select the one created most recently. Branch from this node by fixing the next variable as either 0 or. 2. Bounding: For each new subproblem, obtain its bound by applying its LP relaxation. Round down Z for resulting optimal solution. João Miguel da Costa Sousa / Alexandra Moutinho 297 BIP branch and bound algorithm Completing example 3. Fathoming: For each new subproblem, apply the three fathoming tests, and discard subproblems that are fathomed by the tests. Optimality test: Stop when there are no remaining subproblems. The current incumbent is optimal. Otherwise, perform another iteration. Iteration 2. Remaining subproblems are for x =. Subproblem 3 (fix x =, x 2 = 0): Maximize Z = 9 + 6x 3 + 4x 4 subect to () 5x 3 + 2x 4 4 (2) x 3 + x 4 (3) x 3 (4) x 4 0 (5) x is binary, for = 3, 4. Subproblem 4 (fix x =, x 2 = ): Maximize Z = 4 + 6x 3 + 4x 4 subect to () 5x 3 + 2x 4 (2) x 3 + x 4 (3) x 3 (4) x 4 (5) x is binary, for = 3, 4. João Miguel da Costa Sousa / Alexandra Moutinho 298 João Miguel da Costa Sousa / Alexandra Moutinho 299 Example LP relaxation is obtained by replacing (5) by 0 x = 3, 4. Optimal solutions are: LP relaxation for subproblem 3: (x, x 2, x 3, x 4 ) = (, 0, 0.8, 0), with Z = 3.8 LP relaxation for subproblem 4: (x, x 2, x 3, x 4 ) = (,, 0, 0.5), with Z = 6 Resulting bounds: Bound for subproblem 3: Z 3 Bound for subproblem 4: Z 6 Example All three fathoming tests fail, so both are unfathomed. João Miguel da Costa Sousa / Alexandra Moutinho 300 João Miguel da Costa Sousa / Alexandra Moutinho 30 7

Iteration 3 Subproblem 4 has the larger bound, so next branching is done from (x, x 2 ) = (, ). Subproblem 5 Subproblem 6 (fix x =, x 2 =, x 3 = 0): (fix x =, x 2 =, x 3 = ): Maximize Z = 4 + 4x 4 Maximize Z = 20 + 4x 4 subect to subect to () 5x 3 + 2x 4 () 2x 4 4 (2), (4) x 4 (2) x 4 0 (5) x 4 is binary (4) x 4 (5) x 4 is binary João Miguel da Costa Sousa / Alexandra Moutinho 302 Iteration 3 (cont.) LP relaxation: replace (5) by 0 x 4. Optimal solutions are: LP relaxation for subproblem 5: (x, x 2, x 3, x 4 ) = (,, 0, 0.5), Z = 6 LP relaxation for subproblem 6: No feasible solutions. Bound for subproblem 5: Z 6 Subproblem 6 is fathomed by test 2, but not subproblem 5. João Miguel da Costa Sousa / Alexandra Moutinho 303 Iteration 3 (concl.) Iteration 4 Node created most recently is selected for branching: x 4 = 0: (x, x 2, x 3, x 4 ) = (,, 0, 0) is feasible, with Z = 4, x 4 = : (x, x 2, x 3, x 4 ) = (,, 0, ) is infeasible. First solution passes test 3 (integer solution) and second passes test 2 (infeasible) for fathoming. First solution is better than incumbent, so it becomes new incumbent, with Z * = 4 Reapplying fathoming test (bound) to remaining branch of Subproblem 3: Bound = 3 Z * = 4 (fathomed). João Miguel da Costa Sousa / Alexandra Moutinho 304 João Miguel da Costa Sousa / Alexandra Moutinho 305 Solution tree after Iteration 4 João Miguel da Costa Sousa / Alexandra Moutinho 306 Other options in Branch and Bound Branching can be done e.g. from the best bound rather than from the most recently created subproblem. Bounding is done by solving a relaxation. Another possible one is e.g. the Lagrangian g relaxation. Fathoming criteria can be generally stated as: Crit. : feasible solutions of subproblem must have Z Z *, Crit. 2: the subproblem has no feasible solutions, or Crit. 3: an optimal solution of subproblem has been found. Some adustments necessary for Branch and bound to find multiple optimal solutions. João Miguel da Costa Sousa / Alexandra Moutinho 307 8

Branch and bound for MIP Branch and bound for MIP General form of the problem: Maximize Z n = = c x subect to ax b, for i=,2,, m, and n i i = x 0, for =,2,, n x is integer, for =,2,, I; I n. Similar to BIP algorithm. Solving LP relaxations are the basis for bounding and fathoming. 4 changes are needed:. Choice of branching variable. Only integer variables that have a noninteger value in the optimal solution for the LP relaxation can be chosen. João Miguel da Costa Sousa / Alexandra Moutinho 308 João Miguel da Costa Sousa / Alexandra Moutinho 309 Branch and bound for MIP Recurring branching variable 2. As integer variables can have a large number of possible values, create ust two new subproblems: x * : noninteger value of optimal solution for LP relaxation. [x * ] = greatest integer x *. Range of variables for two new subproblems: bl x * [x * ] and x * [x * ] +. Each inequality becomes an additional constraint. Example: x * = 3.5, then: x * 3 and x * 4. When changes. and 2. are combined a recurring branching variable can occur, see figure. João Miguel da Costa Sousa / Alexandra Moutinho 30 João Miguel da Costa Sousa / Alexandra Moutinho 3 Branch and bound for MIP Changes needed: 3. Bounding step: value of Z was rounded down in BIP algorithm. Now some variables are not integerrestricted so bound is value of Z without rounding. 4. Fathoming test 3: optimal solution for the subproblem s LP relaxation must only be integer for integer restricted variables. João Miguel da Costa Sousa / Alexandra Moutinho 32 MIP branch and bound algorithm Initialization: Set Z * =. Apply bounding, fathoming and optimization steps described below to the whole problem. If not fathomed, perform iteration. Steps for each iteration:. Branching: Among the remaining subproblems, bl select the one created most recently. From integer variables that have a noninteger value in the optimal solution for the LP relaxation choose the first one. Let x be this variable and x * its value. Branch from this creating two subproblems by adding the respective constraints: x * [x * ] and x * [x * ] +. João Miguel da Costa Sousa / Alexandra Moutinho 33 9

MIP branch and bound algorithm 2. Bounding: For each new subproblem, obtain its bound by applying its LP relaxation. Use Z without rounding for resulting optimal solution. 3. Fathoming: For each new subproblem, apply the three fathoming tests, and discard subproblems that are fathomed by the tests. Test : Its bound Z *, where Z * is value of Z for current incumbent. Test 2: Its LP relaxation has no feasible solutions. João Miguel da Costa Sousa / Alexandra Moutinho 34 MIP branch and bound algorithm 3. Fathoming (cont.): Test 3: Optimal solution for its LP relaxation has integer values for integer restricted variables. (If this solution is better it becomes new incumbent, and test is reapplied for all unfathomed subproblems). Optimality test: Stop when there are no remaining subproblems. The current incumbent is optimal. Otherwise, perform another iteration. See MIP examples in PL#7 and in page 58 of Hillier s book. João Miguel da Costa Sousa / Alexandra Moutinho 35 Branch and cut approach to BIP Branch and bound was develop and refined in the 60 s and early 70 s. Can solve problems up to 00 variables. Branch and cut approach was introduced in the mid 80 s, and can solve problems with thousands of variables. Only solve large problems if they are sparse (less than 5 or even % of nonzero values in functional constraints). Uses a combination of automatic problem processing, generation of cutting planes and B&B techniques. João Miguel da Costa Sousa / Alexandra Moutinho 36 Automatic problem processing for BIP Computer inspection of IP formulation to spot reformulations that make the problem quicker to solve: Fixing variables: identify variables that can be fixed at 0 or, because other value cannot lead to feasible and optimal solution. Eliminating redundant constraints: identify and eliminate constraints that are automatically satisfied by solutions that satisfy all other constraints. Tightening constraints: tighten constraints in a way that reduces feasible region of LP relaxation without eliminating any feasible solutions for the BIP problem. João Miguel da Costa Sousa / Alexandra Moutinho 37 Tightening constraints LP relaxation including feasible region. LP relaxation after tightening constraint. João Miguel da Costa Sousa / Alexandra Moutinho 38 Generating cutting planes for BIP Cutting plane (or cut) is a new functional constraint that reduces feasible region for LP relaxation without eliminating any feasible solutions of IP problem. Procedure for generating cutting planes:. Consider functional constraint in form with only nonnegative coefficients. 2. Find a group of N variables such that a) Constraint is violated if every variable in group = and all other variables = 0. b) It is satisfied if value of any variables changes from to 0. 3. Resulting cutting plane: sum of variables in group N. João Miguel da Costa Sousa / Alexandra Moutinho 39 0

Constraint Programming Combination of artificial intelligence with computer programming languages in the mid 80 s. Flexibility in stating (nonlinear) constraints:. Mathematical constraints, e.g., x + y < z. 2. Disunctive constraints, e.g., times of certain tasks cannot overlap. 3. Relational constraints, e.g., at least three tasks should be assigned to a certain machine. João Miguel da Costa Sousa / Alexandra Moutinho 320 Stating constraints 4. Explicit constraints, e.g., x and y have same domain {,2,3,4,5}, but (x, y) must be (, ), (2, 3) or (4, 5). 5. Unary constraints, e.g. z is integer between 5 and 0. 6. Logical constraints, t e.g., if x = 5, then y [6, 8]. Allows use of standard logical functions such as IF, AND, OR, NOT. Constraint programming applies domain reduction and constraint propagation. The process creates a tree search. João Miguel da Costa Sousa / Alexandra Moutinho 32 Example Constraint Programming Consider: x {,2}, x 2 {,2}, x 3 {,2,3}, x 4 {,2,3,4,5} Constraints:. All variables must have different values; 2. x +x 3 = 4 Apply domain reduction and constraint propagation to obtain feasible solutions: x {}, x 2 {2}, x 3 {3}, x 4 {4,5}. João Miguel da Costa Sousa / Alexandra Moutinho 322 Steps in Constraint Programming:. Formulate a compact model for the problem by using a variety of constraint types (most not of IP type). 2. Efficiently find feasible solutions that satisfy all these constraints. 3. Search among feasible solutions for an optimal one. Strength of constraint programming is in first two steps, whereas the main strength of IP is in step 3. Current research: integrate CP and IP! João Miguel da Costa Sousa / Alexandra Moutinho 323