Learn to Relax:
Integrating Integer Linear
Programming with
ConflictDriven Search
Jo Devriendt †, Ambros Gleixner ‡, Jakob Nordström *
Acknowledgement: Jan Elffers †
† Lund University, Sweden
‡ Zuse Institut Berlin, Germany
* University of Copenhagen, Denmark
jo.devriendt@cs.lth.se
Conflictdriven search for 01 ILP
an exampledriven intro
Conflictdriven Search Loop
Unit propagation
 Given 01 ILP program φ and current assignment α, if a constraint c ∈ φ would be falsified by assuming x=0 (resp. x=1), extend α with x=1 (resp. x=0)
 propagate until fixpoint
currently no unit propagation
Conflictdriven Search Loop
Unit propagation
Conflict?
 Conflict: some constraint in φ falsified by α
Conflictdriven Search Loop
Unit propagation
Conflict?
Decide unassigned variable
no
 Only if unit propagation did not lead to a conflict
 if no unassigned variable left, return SAT
 Resume unit propagation
Conflictdriven Search Loop
Unit propagation
Conflict?
Decide unassigned variable
no
 Only if unit propagation did not lead to a conflict
 if no unassigned variable left, return SAT
 Resume unit propagation
Conflictdriven Search Loop
Unit propagation
Conflict?
Decide unassigned variable
no
Conflictdriven Search Loop
Unit propagation
Conflict?
Decide unassigned variable
no
Conflictdriven Search Loop
Unit propagation
Conflict?
Decide unassigned variable
no
Conflictdriven Search Loop
Unit propagation
Conflict?
Decide unassigned variable
no
Conflictdriven Search Loop
Unit propagation
Conflict?
Decide unassigned variable
no
Conflictdriven Search Loop
Unit propagation
Conflict?
Decide unassigned variable
no
Conflictdriven Search Loop
Unit propagation
Conflict?
Decide unassigned variable
no
 Conflict: some constraint in φ falsified by α
Conflictdriven Search Loop
Unit propagation
Conflict?
Learn constraint
Decide unassigned variable
yes
no
 From falsified constraint and reasons leading up to conflict, construct learned constraint
 implied by φ, should prevent same conflict
 Add learned constraint to φ
 → learned constraint database
Conflictdriven Search Loop
Unit propagation
Conflict?
Learn constraint
Decide unassigned variable
yes
no
 From falsified constraint and reasons leading up to conflict, construct learned constraint
 implied by φ, should prevent same conflict
 Add learned constraint to φ
 → learned constraint database
Conflictdriven Search Loop
Unit propagation
Conflict?
Learn constraint
Backjump
Decide unassigned variable
yes
no
 Backtrack based on learned constraint
 Resume unit propagation
Conflictdriven Search Loop
Unit propagation
Conflict?
Learn constraint
Backjump
Decide unassigned variable
yes
no
 Backtrack based on learned constraint
 Resume unit propagation
Conflictdriven Search Loop
Unit propagation
Conflict?
Learn constraint
Backjump
Decide unassigned variable
yes
no
Conflictdriven Search Loop
Unit propagation
Conflict?
Learn constraint
Backjump
Decide unassigned variable
yes
no
Conflictdriven Search Loop
Unit propagation
Conflict?
Learn constraint
Backjump
Decide unassigned variable
yes
no
Conflictdriven Search Loop
Unit propagation
Conflict?
Learn constraint
Backjump
Decide unassigned variable
yes
no
Conflictdriven Search Loop
Unit propagation
Conflict?
Learn constraint
Backjump
Decide unassigned variable
yes
no
Conflictdriven Search Loop
Unit propagation
Conflict?
Learn constraint
Backjump
Decide unassigned variable
yes
no
Conflictdriven Search Loop
Unit propagation
Conflict?
Learn constraint
Backjump
Decide unassigned variable
yes
no
UNSAT!
Conflictdriven Search Loop
Unit propagation
Conflict?
Learn constraint
Backjump
Decide unassigned variable
yes
no
 Learning constraints pushes search forward
 Thousands of conflicts per second
 Highly optimized unit propagation
 First proposed for Boolean satisfiability [MS96,BS97,MMZZ01]
 Generalized to pseudoBoolean solving [CK05,SS06,LP10,EN18]
 many variations possible
here be dragons
(different from MIP)
Another look at our example...
 It's rationally infeasible!
 Could be solved without search
 In practice: conflictdriven search even reaches timeout on certain rationally infeasible programs
 unit propagation is local
 wrong constraints are learned
How about integrating an LP solver?
our work
Linear Programming (LP) solver
 Input:
 LP relaxation of φ
 variable bounds α
 objective function
 Output: either
 optimal rational solution

Farkas multipliers
 define a positive linear combination of constraints in φ, falsified by α
Conflictdriven search loop
with LP solver call
Unit Propagation
Conflict?
Backjump
Decide unassigned variable
no
Rational infeasibility?
Query LP solver
yes
no
Learn constraint
Extract Farkas multipliers
yes
Learn Farkas constraint
Rational infeasibility example
Farkas multipliers
 LP solvers are slow compared to conflictdriven search loop
 limit calls to LP solver
 limit LP solver running time
 deterministic measure: balance #conflicts in conflictdriven solver to #pivots in LP solver
 LP solver uses inexact floating point arithmetic
 learned constraint must be implied by φ
 recalculate Farkas constraint with exact arithmetic
 verify Farkas constraint is still conflicting
 postprocess Farkas constraint to eliminate noise
Two technical hurdles
 Every once in a while, run LP solver to completion at root
 use (optimal) rational solution as value heuristic
 generate Gomory cuts
 add to both LP solver and learned constraint set
 Generate "deep" Gomory cuts from internal search nodes
 valid at root node, so safe to add as learned constraint
 Add learned constraints as cuts to the LP solver
Further ideas
 PB solver RoundingSat [EN18]
 Strong ILP constraint learning
 Performed well in past PB competitions
 LP solver SoPlex [ZIB]
 SCIP's native LP solver
 Stateoftheart open source
Working implementation
Experiments!
[PBCOMP]
Experiments!
[PBCOMP]
Experiments!
[PBCOMP]
Experiments!
[PBCOMP]
Experiments!
[MIPLIB]
Experiments!
[MIPLIB]
Experiments!
[P04]
Experiments!
[P04]
Summary
Conflictdriven search for 01 ILPs
 Generates cuts from search conflicts
 Does not always find short refutations for rational infeasibility
 Allows sound & efficient integration with LP solver
 Is further improved by value heuristic & Gomory cut generation
Thanks for your attention!
Experiments indicate best of both worlds
 But don't forget to switch off cut generation for decision problems
[MS96] GRASP  a new search algorithm for satisfiability  MarquesSilva, Sakallah
[BS97] Using CSP lookback techniques to solve realworld SAT instances  Bayardo, Schrag
[MMZZ97] Chaff: Engineering an efficient SAT solver  Moskewicz, Madigan, Zhao, Zhang
[P04] Where are the hard knapsack problems?  Pisinger
[CK05] A fast pseudoBoolean constraint solver  Chai, Kuehlmann
[SS06] Pueblo: A hybrid pseudoBoolean SAT solver  Sheini, Sakallah
[LP10] The Sat4j library, release 2.2  Le Berre, Parrain
[EN18] Divide and conquer: Towards faster pseudoboolean solving  Elffers, Nordström
[ZIB] SoPlex  soplex.zib.de
[PBCOMP] Latest PB competition  www.cril.univartois.fr/PB16/
[MIPLIB] The Mixed Integer Programming Library  miplib.zib.de
References
Copy of Learn to Relax: Integrating Integer Linear Programming with ConflictDriven Search  SOAK
By krr
Copy of Learn to Relax: Integrating Integer Linear Programming with ConflictDriven Search  SOAK
 40