Handling first-order linear constraints with SCIP

Similar documents
Outline. Column Generation: Cutting Stock A very applied method. Introduction to Column Generation. Given an LP problem

Column Generation: Cutting Stock

Integer Programming Chapter 9

3 INTEGER LINEAR PROGRAMMING

CS 473: Algorithms. Ruta Mehta. Spring University of Illinois, Urbana-Champaign. Ruta (UIUC) CS473 1 Spring / 36

2. Modeling AEA 2018/2019. Based on Algorithm Engineering: Bridging the Gap Between Algorithm Theory and Practice - ch. 2

Introduction to Mathematical Programming IE406. Lecture 20. Dr. Ted Ralphs

The MIP-Solving-Framework SCIP

Solutions for Operations Research Final Exam

Fundamentals of Integer Programming

February 19, Integer programming. Outline. Problem formulation. Branch-andbound

Algorithms for Integer Programming

Integer Programming! Using linear programming to solve discrete problems

Chapter 10 Part 1: Reduction

Tutorial on Integer Programming for Visual Computing

5.3 Cutting plane methods and Gomory fractional cuts

1 Linear programming relaxation

Introduction to Mathematical Programming IE496. Final Review. Dr. Ted Ralphs

ACO Comprehensive Exam October 12 and 13, Computability, Complexity and Algorithms

Bayesian network model selection using integer programming

Cloud Branching MIP workshop, Ohio State University, 23/Jul/2014

Addressing degeneracy in the dual simplex algorithm using a decompositon approach

Some Advanced Topics in Linear Programming

Unit.9 Integer Programming

Modelling. Christina Burt, Stephen J. Maher, Jakob Witzig. 29th September Zuse Institute Berlin Berlin, Germany

Investigating Mixed-Integer Hulls using a MIP-Solver

3 No-Wait Job Shops with Variable Processing Times

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Integer Programming as Projection

Exact solutions to mixed-integer linear programming problems

MVE165/MMG630, Applied Optimization Lecture 8 Integer linear programming algorithms. Ann-Brith Strömberg

Hybrid Constraint Solvers

Implementing Constraint Handlers in SCIP

Cuts from Proofs: A Complete and Practical Technique for Solving Linear Inequalities over Integers

Experiments On General Disjunctions

Primal Heuristics for Branch-and-Price Algorithms

CS675: Convex and Combinatorial Optimization Spring 2018 Consequences of the Ellipsoid Algorithm. Instructor: Shaddin Dughmi

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

SCIP. 1 Introduction. 2 Model requirements. Contents. Stefan Vigerske, Humboldt University Berlin, Germany

Solving lexicographic multiobjective MIPs with Branch-Cut-Price

Advanced Use of GAMS Solver Links

Linear and Integer Programming :Algorithms in the Real World. Related Optimization Problems. How important is optimization?

The Simplex Algorithm for LP, and an Open Problem

Approximation Algorithms

Modelling of LP-problems (2WO09)

A Generic Separation Algorithm and Its Application to the Vehicle Routing Problem

Optimization Methods in Management Science

Integer Programming Theory

Approximation Algorithms

COMP9334: Capacity Planning of Computer Systems and Networks

Benders Decomposition

Gurobi Guidelines for Numerical Issues February 2017

LP-Modelling. dr.ir. C.A.J. Hurkens Technische Universiteit Eindhoven. January 30, 2008

Primal Heuristics in SCIP

Department of Mathematics Oleg Burdakov of 30 October Consider the following linear programming problem (LP):

The Ascendance of the Dual Simplex Method: A Geometric View

Solving a Challenging Quadratic 3D Assignment Problem

9.4 SOME CHARACTERISTICS OF INTEGER PROGRAMS A SAMPLE PROBLEM

Motivation for Heuristics

The Heuristic (Dark) Side of MIP Solvers. Asja Derviskadic, EPFL Vit Prochazka, NHH Christoph Schaefer, EPFL

Approximation Algorithms

Solving a Challenging Quadratic 3D Assignment Problem

Exact Algorithms for Mixed-Integer Bilevel Linear Programming

Lesson 08 Linear Programming

Implementing a B&C algorithm for Mixed-Integer Bilevel Linear Programming

12.1 Formulation of General Perfect Matching

Approximation Algorithms

Minimum Weight Constrained Forest Problems. Problem Definition

On the Global Solution of Linear Programs with Linear Complementarity Constraints

Lagrangean Relaxation of the Hull-Reformulation of Linear Generalized Disjunctive Programs and its use in Disjunctive Branch and Bound

MVE165/MMG631 Linear and integer optimization with applications Lecture 7 Discrete optimization models and applications; complexity

A Comparison of Mixed-Integer Programming Models for Non-Convex Piecewise Linear Cost Minimization Problems

Advanced Operations Research Techniques IE316. Quiz 2 Review. Dr. Ted Ralphs

Conflict Analysis in Mixed Integer Programming

Lecture 3. Corner Polyhedron, Intersection Cuts, Maximal Lattice-Free Convex Sets. Tepper School of Business Carnegie Mellon University, Pittsburgh

MVE165/MMG631 Linear and integer optimization with applications Lecture 9 Discrete optimization: theory and algorithms

Course Summary! What have we learned and what are we expected to know?

Integer Programming ISE 418. Lecture 7. Dr. Ted Ralphs

How to use your favorite MIP Solver: modeling, solving, cannibalizing. Andrea Lodi University of Bologna, Italy

15.083J Integer Programming and Combinatorial Optimization Fall Enumerative Methods

Outline. Modeling. Outline DMP204 SCHEDULING, TIMETABLING AND ROUTING. 1. Models Lecture 5 Mixed Integer Programming Models and Exercises

Mathematical and Algorithmic Foundations Linear Programming and Matchings

Column Generation Based Primal Heuristics

Section Notes 5. Review of Linear Programming. Applied Math / Engineering Sciences 121. Week of October 15, 2017

On Applying Cutting Planes in DLL-Based Algorithms for Pseudo-Boolean Optimization

Optimality certificates for convex minimization and Helly numbers

DM515 Spring 2011 Weekly Note 7

Computational Integer Programming. Lecture 12: Branch and Cut. Dr. Ted Ralphs

Algorithms for Decision Support. Integer linear programming models

Recursive column generation for the Tactical Berth Allocation Problem

Parallel Branch & Bound

DM545 Linear and Integer Programming. Lecture 2. The Simplex Method. Marco Chiarandini

Part 4. Decomposition Algorithms Dantzig-Wolf Decomposition Algorithm

Improving Dual Bound for Stochastic MILP Models Using Sensitivity Analysis

Lecture 5: Duality Theory

/ Approximation Algorithms Lecturer: Michael Dinitz Topic: Linear Programming Date: 2/24/15 Scribe: Runze Tang

Linear Programming Duality and Algorithms

On the selection of Benders cuts

Bilinear Programming

Advanced Operations Research Techniques IE316. Quiz 1 Review. Dr. Ted Ralphs

Transcription:

Handling first-order linear constraints with SCIP James Cussens, University of York KU Leuven, 2015-02-16 James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 1 / 18

MIP Mixed integer programs We have Variables These can be binary, integer or real-valued Constraints These are linear inequalities (maybe equations) Objective z = c i x i where each variable x i has an objective coefficient c i. Goal is to assign values to the variables which meet all constraints and maximise the objective. If all variables are real-valued we have a linear program (LP) which can be solved in polynomial time. Otherwise the linear relaxation provides a useful upper bound. James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 2 / 18

MIP Mixed integer programs We have Variables These can be binary, integer or real-valued Constraints These are linear inequalities (maybe equations) Objective z = c i x i where each variable x i has an objective coefficient c i. Goal is to assign values to the variables which meet all constraints and maximise the objective. If all variables are real-valued we have a linear program (LP) which can be solved in polynomial time. Otherwise the linear relaxation provides a useful upper bound. Can extend to constraint integer program (SCIP approach). James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 2 / 18

MIP Facility location in ZIMPL set PLANTS := { "A", "B", "C", "D" }; set STORES := { 1.. 9 }; set PS := PLANTS * STORES; var x[ps] binary; # Is plant p suppling store s? var z[plants] binary; # Is plant p build? minimize cost: sum <p> in PLANTS : building[p] * z[p] + sum <p,s> in PS : transport[p,s] * x[p,s]; subto assign: forall <s> in STORES : sum <p> in PLANTS : x[p,s] == 1; subto build: forall <p,s> in PS : x[p,s] <= z[p]; subto limit: forall <p> in PLANTS : sum <s> in STORES : demand[s] * x[p,s] <= capacity[p]; James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 3 / 18

MIP First-order representations for convenience A good modelling language makes it easy to define large mixed integer programs. Here s how to define a Markov logic network in the modelling language ZIMPL. Show univ.mln and univ.zpl James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 4 / 18

MIP Grounding the first-order representation The ZIMPL description can be translated to a standard MIP format (e.g..lp), or sent directly to SCIP. In either case the compact representation is grounded before solving begins Show univ.lp Demo solving of univ.zpl James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 5 / 18

Motivation What s wrong with grounding? If there are not too many variables and constraints in the ground MIP then grounding is a good option. But what to do if there are too many? James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 6 / 18

Motivation The obvious solution Compact MIPs are often reformulated (typically by a human) to have very many linear constraints and/or very many variables. This is to end up with a MIP whose LP relaxation is tight (possibly even integer). The (typically correct) assumption is that most constraints are not tight and most variables have value zero. James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 7 / 18

Motivation The obvious solution Compact MIPs are often reformulated (typically by a human) to have very many linear constraints and/or very many variables. This is to end up with a MIP whose LP relaxation is tight (possibly even integer). The (typically correct) assumption is that most constraints are not tight and most variables have value zero. Most linear constraints are added only when/if useful during the course of solving (cutting planes). Most variables are created only when/if useful during the course of solving (column generation). Not-yet-existing variables implicitly have their value clamped to zero. James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 7 / 18

Motivation The obvious solution Instead of grounding a first-order linear constraint prior to solving, useful ground instances can be generated as cutting planes. Instead of creating all variables prior to solving, useful variables can be created using column generation. James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 8 / 18

First steps I have an initial implementation of this approach called foilp. It accepts input in a language ( FOZ ) virtually identical to ZIMPL. Show smoke.zpl and smoke.foz A Python script converts the FOZ file to a ZIMPL file with special fake variables and constraints (Show smoke fo.zpl). foilp uses that information to create first-order clausal constraints. Show solving with smoke.zpl and smoke fo.zpl. James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 9 / 18

Using SCIP foilp is just SCIP extended with two new constraint handlers: foclause and folinear. A SCIP constraint handler must do (at least) the following: CONSCHECK Decide whether an arbitrary candidate solution satisfies all the constraints ( of the constraint handler) CONSENFOLP Decide whether an LP solution satisfies all the constraints ( of the constraint handler) CONSENFOPS Decide whether a pseudo-solution satisfies all the constraints ( of the constraint handler) CONSLOCK Specify whether the constraints lock variables up or down (or both). James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 10 / 18

When to add cutting planes foilp implements the CONSSEPALP method to generate cutting planes Recall that at the beginning no ground instances of a first-order constraint have been posted. So we have an initial under-constrained problem which may still be tough to solve if there are other constraints. We do not wait until this problem is solved before adding ground constraints this could take a while. We add ground instances (cutting planes) as soon as the LP relaxation of the under-constrained problem is solved. The LP relaxation removes the constraint that variables have to take integer values, and can be solved quickly (polynomial time). Once the cutting planes are added we solve the new LP and so on... James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 11 / 18

The separation problem for first-order clauses Recall that literals are binary variables in the MIP which may have fractional values in the LP solution. Suppose the LP solution includes the following values: p(a) = 0.2, q(a, b) = 0.7, r(b) = 0. And our problem has the following first-order clause: x, y : p(x) q(x, y) r(y) x, y : p(x) + 1 q(x, y) + r(y) 1 Then p(a) + 1 q(a, b) + r(b) 1 is a cutting plane worth adding it separates the current LP solution, since 0.2 + 1 0.7 + 0 < 1 James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 12 / 18

Efficient (?) separating In general deciding whether a first-order clause is satisfied by an interpretation is NP-complete (since we can encode any graph colouring problem like this). If the interpretation may be fractional then it will not get any easier! Current implementation of foilp does the sensible thing on clauses where the literals do not share variables. Otherwise just enumerates ground instances it would not be hard to do better! James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 13 / 18

Proposal: Use a sub-ip to find a cutting plane # Each first-order variable has exactly one grounding I(x=a) + I(x=b) +...+ I(x=c) == 1; #Groundings of literals must be # consistent with that of variables I(x=a) = I(p(a,a)) + I(p(a,b)) +... + I(p(a,c)); # Want grounding to violate first-order clause minimize sum <x,y>: LPval(p[x])*I(p[x]) + 1-LPval(q[x,y])*I(q[x,y]) + LPval(r[y])*I(r[y]) Solution must be below 1 for there to be an associated cutting plane James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 14 / 18

What about variable creation? There are two reasons to create a new variable: 1. If there is no feasible solution to the LP relaxation. 2. If there is a better solution where the new variable has a positive value. James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 15 / 18

Creating variables (column generation) Here we follow the presentation given be Gamrath [Gam10]. Let the current LP be min cx subject to Ax a, where x is the vector of currently-existing variables. Suppose there is a feasible solution to this LP. The LP solver will provide us with π, the optimal solution to the dual of this LP. Each component of π corresponds to a row of A (a linear constraint) James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 16 / 18

Creating variables (column generation) Here we follow the presentation given be Gamrath [Gam10]. Let the current LP be min cx subject to Ax a, where x is the vector of currently-existing variables. Suppose there is a feasible solution to this LP. The LP solver will provide us with π, the optimal solution to the dual of this LP. Each component of π corresponds to a row of A (a linear constraint) Let c i be the objective coefficient for a potential new variable x i. Let A.,i be the vector of its coefficients in the current set of linear constraints. The pricing problem is to find a new variable x i with minimal reduced cost: c = min{c i A.,i π } James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 16 / 18

Recovering from infeasibility If we have the clausal constraint: p(x) + q(x, y) 1 and, say, the MIP binary variables p(a) and p(a, b) do not exist yet then the constraint handler may generate the following cutting plane: We need to create p(a) or p(a, b). 0 1 If the LP is infeasible, the LP solver will provide Farkas multipliers u T. Pricing problem is then c = min{ A.,i u}. In practice typically better to create variables to ensure feasibility at the beginning. James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 17 / 18

Future work, etc James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 18 / 18

Future work, etc Implementation! James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 18 / 18

Future work, etc Implementation! Dealing with symmetries: The most successful approach to date is to ensure that only one isomorphic copy of each node is kept in the enumeration tree [CCZ14] James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 18 / 18

Future work, etc Implementation! Dealing with symmetries: The most successful approach to date is to ensure that only one isomorphic copy of each node is kept in the enumeration tree [CCZ14] Generate cuts using resolution as done by Chandru and Hooker [CH99]. James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 18 / 18

Future work, etc Implementation! Dealing with symmetries: The most successful approach to date is to ensure that only one isomorphic copy of each node is kept in the enumeration tree [CCZ14] Generate cuts using resolution as done by Chandru and Hooker [CH99]. Result: derived clauses can only be facets if they are prime implicants of the original set of clauses. James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 18 / 18

Future work, etc Implementation! Dealing with symmetries: The most successful approach to date is to ensure that only one isomorphic copy of each node is kept in the enumeration tree [CCZ14] Generate cuts using resolution as done by Chandru and Hooker [CH99]. Result: derived clauses can only be facets if they are prime implicants of the original set of clauses. Generate new (useful!) first-order constraints from existing ones using first-order resolution. James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 18 / 18

Michele Conforti, Gérard Cornuéjols, and Giacomo Zambelli. Integer Programming. Springer, 2014. Vijay Chandru and John Hooker. Optimization methods for Logical Inference. Wiley, 1999. Gerald Gamrath. Generic Branch-Cut-and-Price. PhD thesis, TU Berlin, 2010. Diploma Thesis. James Cussens, University of York FO with SCIP KU Leuven, 2015-02-16 18 / 18