67
© 2017 IBM Corporation CPLEX and Benders’ Decomposition <Ed Klotz> <March 20, 2017>

CPLEX and Benders’ Decomposition - Optimization Direct · 2 © 2015 IBM Corporation Objectives Understand the fundamental concepts behind Benders’ Decomposition Learn how to determine

Embed Size (px)

Citation preview

© 2017 IBM Corporation

CPLEX and Benders’ Decomposition

<Ed Klotz>

<March 20, 2017>

© 2015 IBM Corporation2

Objectives

Understand the fundamental concepts behind Benders’ Decomposition

Learn how to determine if a model can potentially benefit from CPLEX’s

automated Benders’ feature

Does not require knowing all the details of the algorithm

Develop some performance tuning and troubleshooting skills

© 2015 IBM Corporation3

Outline

Benders’ Decomposition Fundamentals

When to Use It (or not)

Learn to recognize some specific problem structures that are well

suited to Benders’

Use in CPLEX

Performance Challenges / Troubleshooting

Benders’ Decomposition Details

Summary and Conclusions

© 2015 IBM Corporation4

Benders Overview

origin

al

refo

rmula

tion

maste

r

(rela

xation)

sla

ve

(separa

tion)

© 2015 IBM Corporation5

Fundamentals Lazy Constraints

CPLEX currently supports lazy constraints for MIP

Either add to model before solve or add dynamically via lazy

constraint callback

(feasible solution) (violated lazy constraints)

If a solution violates no lazy constraints, it is feasible. If CPLEX solves

the MIP to optimality, any remaining unviolated lazy constraints are

irrelevant

Binding Constraints

Lazy Constraints against which feasible solutions are

checked (explicitly or implicitly)

© 2015 IBM Corporation6

Fundamentals

Benders’ Decomposition efficiently generates cuts that reflect the lazy

constraints without the individual, explicit checking

Called Benders cuts instead

Solve a subproblem instead of checking each lazy constraint

(feasible solution) (Benders cut)

If subproblem finds no cuts and we have solved the master problem to

optimality, we have optimal solution to the original model of interest

Master Problem (LP or MIP)

Subproblem solve generates cut

© 2015 IBM Corporation7

Fundamentals

Benders’ Decomposition efficiently generates cuts that reflect the lazy

constraints without the individual, explicit checking

Put some constraints of the original MIP in the master problem

Master problem must include all integer variables

Remaining constraints go into the sub problem. Can view as treating

these constraints as lazy, but we don’t want to check them explicitly.

Cuts are actually a linear combination of the lazy constraints

instead of a single violated lazy constraint

For the moment, don’t worry about the details of exactly how we

create the subproblem that generates the Benders’ cuts

We’ll come back and fill in the details of that black box later.

© 2015 IBM Corporation8

Fundamentals

(feasible solution) (Benders cut)

MIP master problem

Benders solves the original MIP to optimality

But must solve a series of MIPs, each with additional row(s)

LP master problem (currently implemented in CPLEX)

Benders solve the original MIP’s root node LP to optimality

Solve a series of LPs, each with dual feasible starting basis

Cuts generated are globally valid for the rest of the MIP solve

Master Problem (LP or MIP)

LP subproblem solve generates cut

© 2015 IBM Corporation9

Fundamentals

Benders’ Decomposition decomposes models of the following form

0

integer ,0

y

x

rQyTx

bAx

ydxcMin TT

0 integer, ,0

yx

bAx

ydxcMin TT

0

ˆ

y

xTrQy

ydMin T

x̂ cut

(MIP)

(LP)

© 2015 IBM Corporation10

Fundamentals

Variant of Benders’ Decomposition

0

integer ,0

y

x

rQyTx

bAx

ydxcMin TT

0 integer, ,0

yx

bAx

ydxcMin TT

0

ˆ

y

xTrQy

ydMin T

x̂ cut

(LP)

(LP)

© 2015 IBM Corporation11

Construct decomposition

Benders cut loop

Solve master LP

Separate cuts

Presolve

CPLEX Benders MIP Solver

Heuristics

Decompose

Benders branch-and-cut

Decomposition

Provided through annotation APIs, or

Automatic

Presolve

Preserves the block structure

Simple Heuristics

On the complete MIP

No LP relaxation solves

May run in parallel to the Benders cut loop

Benders cut loop

Tries to solve the LP relaxation of projected

MIP to optimality

Benders branch-and-cut

Benders cuts must be separated as lazy

constraints, to cut integer solutions

Also separated for fractional solutions

© 2015 IBM Corporation12

When to use it Model needs to decompose in this way

Master and subproblem need to be reasonably

easy to solve

Check for special structure in A or Q that makes

master or sub problem easy to solve

Perhaps need some tuning to get faster solves

Certain problem types have been solved effectively

Network design

Facility location

Use annotations to identify the decomposition

Or let CPLEX try to figure it out automatically

If you are not sure, try it without any annotations

See what CPLEX can find

It will stop the Benders’ run immediately if

there’s nothing to decompose

0

[integer] ,0

y

x

bAx

ydxcMin TT

0

ˆ

y

xTrQy

ydMin T

x̂ cut

© 2015 IBM Corporation13

When to use it

Examples

Don’t bother:

Problem name : neos-578379.mps.gz

Objective sense : Minimize

Variables : 17010 [Binary: 17010]

Objective nonzeros : 0

Linear constraints : 21703 [Less: 10720, Equal: 10983]

Nonzeros : 101560

RHS nonzeros : 10983

No continuous variables

• Master is the whole MIP

• Subproblem is empty

• Benders’ cut loop doesn’t exist

• Benders’ will just solve the whole MIP

0

[integer] ,0

y

x

bAx

ydxcMin TT

0

ˆ

y

xTrQy

ydMin T

x̂ cut

© 2015 IBM Corporation14

When to use it

Examples

This one has a chance:

Problem name : liu.lp

Objective sense : Minimize

Variables : 1156 [Nneg: 67, Binary: 1089]

Objective nonzeros : 1

Linear constraints : 2178 [Less: 1122, Greater: 1056]

Nonzeros : 10626

RHS nonzeros : 2178

Yes, it has some continuous variables

But, examination of the model reveals that

they are actually implied integer

Let’s try it anyway.

0

[integer] ,0

y

x

bAx

ydxcMin TT

0

ˆ

y

xTrQy

ydMin T

x̂ cut

© 2015 IBM Corporation15

When to use it Examples

Node log for MIPLIB model liu

Nodes Cuts/

Node Left Objective IInf Best Integer Best Bound ItCnt Gap

0 0 210.0000 Benders: 1 0

0 0 210.0000 Benders: 1 7

0 0 210.0000 Benders: 1 8

0 0 210.0000 Benders: 1 349

0 0 210.0000 Benders: 1 350

0 0 210.0000 Benders: 1 351

Root relaxation solution time = 0.01 sec. (3.42 ticks) // Start regular mipopt

* 0+ 0 6328.0000 210.0000 96.68%

0 0 385.0000 1 6328.0000 210.0000 583 96.68%

0 0 560.0000 1 6328.0000 Cuts: 2 585 91.15%

Numerous

rounds of

Benders cuts

But no progress in the dual bound

Bound

much

worse than

initial

mipopt

bound

© 2015 IBM Corporation16

Node log for MIPLIB model janos-us-DDM

CPLEX with defaults and parameter tuning can’t (quite) solve to optimality

When to use it

Nodes Cuts/

Node Left Objective IInf Best Integer Best Bound ItCnt Gap

0 0 0.0000 Benders: 1 0

0 0 31923.1875 Benders: 1 1

0 0 63846.3750 Benders: 1 2

0 0 1488124.2094 Benders: 1 1272

0 0 1488125.2884 Benders: 1 1274

0 0 1488134.7500 Benders: 1 1277

Tried aggregator 1 time.

MIP Presolve modified 240 coefficients.

Reduced MIP has 208 rows, 84 columns, and 2441 nonzeros.

… <Regular MIP optimization continues from where Benders’ left off>

MIP - Integer optimal solution: Objective = 1.4927070000e+06

Solution time = 7.29 sec. Iterations = 3145 Nodes = 29 (1)

Deterministic time = 2386.61 ticks (327.16 ticks/sec)

Master problem apparently empty at the start

Good

progress

in best

node

LP

subproblems

solve quickly

© 2015 IBM Corporation17

Why did Benders’ work well on model janos-us-DDM?

Master problem initially empty

No constraints with only integer variables, hence master empty

Should be easy to solve, at least early on

A1 constraints are GUB constraints in the subproblem:

c3: - 64 x1 + y85 + y93 + y94 + y95 + y96 + y97 + y98 + y99 + y100 + y101

+ y102 + y103 + y104 + y105 + y106 + y107 + y108 + y109 + y110 + y111

+ y112 + y113 + y114 + y115 + y116 <= 0

A2 constraints are network balance of flow constraints in the subproblem:

c1: y85 + y86 - y87 - y88 = -60

No surprise that LP subproblems solve quickly

0

integer ,0

0 d diag(d), D // 0

2

1

y

x

byA

DxyA

xcMin T

When to use it

Q

T

© 2015 IBM Corporation18

CPLEX needs to know the boundary between the master and sub

problem

Let CPLEX decide the decomposition

All constraints involving only integer variables go into master

All constraints involving only continuous or integer and continuous

variables go into the sub problem

SOSs, indicators not currently supported

Controlled by the Benders strategy

parameter

0

integer ,0

y

x

rQyTx

bAx

ydxcMin TT

Benders in CPLEX

© 2015 IBM Corporation19

CPLEX needs to know the boundary between the master and sub

problem

Sometimes a nondefault boundary is

more effective

If you want to include continuous

variables in the master problem

Cannot annotate integer variables

in the subproblems; must be in the master

Use variables, not constraints, to define the

boundary

Variables annotated in master and sub identify

the constraints that belong in master and sub

There is no default boundary for LP models

User must supply the boundary

0

integer ,0

y

x

rQyTx

bAx

ydxcMin TT

Benders in CPLEX

© 2015 IBM Corporation20

Benders in CPLEX Non default boundary between the master and sub problem (examples)

0,

integer ,0

222

111

22

11

zy

x

rzQxT

ryQxT

bxA

bxA

ydxcMin TT

22

11

2

1

0

0

0

QQTT

QT

A

A

A

OK; default boundary; master contains

all constraints with only integer variables

Invalid; constraints with only integer variables belong in

master

OK; continuous y variables annotated into master

© 2015 IBM Corporation21

Benders in CPLEX

CPLEX needs to know the boundary between the master and sub

problem

Want to specify multiple subproblems

instead of just one

0,

integer ,0

21

2222

1111

2211

yy

x

ryQxT

ryQxT

bAx

ydydxcMinTTT

0

0

2

1

2

1

Q

QQ

T

TT

(master)

(subproblem 1)

(subproblem 2)

© 2015 IBM Corporation22

Benders in CPLEX

CPLEX needs to know the boundary between the master and sub

problem

May want to specify multiple subproblems instead of just one

niy

x

ryQxT

ryQxT

ryQxT

bAx

ydydxcMin

i

mmmm

m

T

m

TT

,1,0

integer ,0

2222

1111

11

0

0

0 0

2

1

1

m

m

Q

Q

Q

Q

T

T

T

© 2015 IBM Corporation23

Benders in CPLEX

CPLEX needs to know the boundary between the master and sub

problem

Use annotations to specify non default boundary between master and

sub

Only makes sense to annotate variables.

0 for master problem; 1,…,k for the k subproblems

Default value if not listed

Specify in file or API calls

© 2015 IBM Corporation24

Benders in CPLEX

Annotation examples:

Want to specify m subproblems instead of just one:

x variables get value 0

y1 variables get value 1

y2 variables get value 2

ym variables get value m

Just one subproblem:

x variables get value 0

y1, …,ym variables get

value 1

Or more than 1 but fewer than

m subproblems

niy

x

ryQxT

ryQxT

ryQxT

bAx

ydydxcMin

i

mmmm

TTT

,1,0

integer ,0

2222

1111

2211

© 2015 IBM Corporation25

Benders in CPLEX

Application: Deterministic LP for 2 stage stochastic programming with

recourse

niy

x

ryQxT

ryQxT

ryQxT

bAx

ydydxcMin

i

mmmm

TTT

,1,0

[integer] ,0

2222

1111

2211

- Random variable

distribution approximated

with m discrete outcomes

- Ti matrices correspond

to m discrete scenarios

- Qi matrices correspond

to recourse for each

scenario (Qi = Q means

fixed recourse)

© 2015 IBM Corporation26

Benders in CPLEX

Annotations

UFL example that comes with CPLEX 12.7.0 and later

binary

0

0

0

0

1 e

1 e

)1,...,1,1(e // 1 e

),,( //

120

2

1

T

2T

1T

12021

x

y

IxIy

IxIy

IxIy

y

y

y

yyyyxdycMin

n

TT

0

integer ,0

y

x

rQyTx

bAx

ydxcMin TT

© 2015 IBM Corporation27

Benders in CPLEX Annotations

UFL example that comes with CPLEX 12.7.0 and above

Master problem starts out empty; A matrix has dimension 0

Master selects facilities to use; subproblem becomes a network

x variables have annotation 0; they belong in master

yk variables have annotation k = 1,…,120; they belong in

subproblem k, each subproblem having 30 variables

Constraints involving fixed x variables in

subproblems are simple bounds

0

integer ,0

y

x

rQyTx

bAx

ydxcMin TT

120

0

ˆI

Q

I

I

I

T

© 2015 IBM Corporation28

Annotation file

Variables C3601-C3630 are the binaries, default to value 0

30 variables per subproblem

Benders in CPLEX

<?xml version='1.0' encoding='utf-8'?>

<CPLEXAnnotations>

<CPLEXAnnotation name='cpxBendersPartition' type='long' default='0'>

<object type='1'>

<anno name='C0001' index='0' value='1'/>

<anno name='C0002' index='1' value='1'/>

<anno name='C0003' index='2' value='1'/>

<anno name='C0029' index='28' value='1'/>

<anno name='C0030' index='29' value='1'/>

<anno name='C0031' index='30' value='2'/>

<anno name='C0032' index='31' value='2'/>

<anno name='C3598' index='3597' value='120'/>

<anno name='C3599' index='3598' value='120'/>

<anno name='C3600' index='3599' value='120'/>

Object to annotate (1 = variable,

2 = constraint, etc.

© 2015 IBM Corporation29

Benders in CPLEX

Node log UFL example with the annotations provided

Set benders strategy parameter to 1 to instruct CPLEX to use the

provided annotations

Nodes Cuts/

Node Left Objective IInf Best Integer Best Bound ItCnt Gap

0 0 0.0000 Benders: 5 0

0 0 16.0000 Benders: 23 5

0 0 119.0000 Benders: 85 28

0 0 469.3445 Benders: 9 415

0 0 470.5000 Benders: 1 432

0 0 471.0000 471.0000 435

Tried aggregator 1 time.

MIP Presolve eliminated 3 rows and 0 columns.

Reduced MIP has 230 rows, 150 columns, and 1320 nonzeros.

< switch to regular branch and cut>

Objective = 0 since

master is initially empty

Cuts steadily improve

dual bound

© 2015 IBM Corporation30

Benders in CPLEX Benders parameters to set

Strategy

-1 do not use

0 automatic

Run Benders if a decomposition was specified, refining it if possible

Otherwise, run regular Brand-and-Bound

1 use the decomposition specified by the annotations

2 auto-decompose workers specified by annotations

Looks for additional decomposition beyond what’s in the annotation

Example usage: user specifies the variables in the master problem,

lets CPLEX do the rest

Differs from setting 0 in that CPLEX errors out if annotations lacking

© 2015 IBM Corporation31

Benders in CPLEX

Benders parameters to set

Strategy (ctd.)

3 ignore annotation and auto-decompose model (for MIP only)

Integer variables go into the master problem

No continuous variables in the master

Master may consist of objective and no constraints

Continuous variables go into a subproblem, which may be further

decomposed depending on structure

© 2015 IBM Corporation32

Benders in CPLEX

Benders parameters to set (ctd.)

Tolerances

Tolerance for cut violations

2 types of cuts

Feasibility cut

Optimality cut

Default is 1e-6 for both

Will describe cuts in details later

When to change from defaults

Advanced users only

Bad numerics

May want to tighten tolerances to avoid improperly discarding cuts

because their violation is below tolerance

Better to try addressing through global bad numeric parameters

Scaling

Numerical emphasis

Or by improving the model formulation

© 2015 IBM Corporation33

Benders in CPLEX

Benders parameters to set (ctd.)

Worker algorithm

Controls algorithm used to solve subproblem(s)

All of CPLEX’s LP algorithms available

When to change

If current subproblem solve times are slow

Subproblem primarily depends on Q matrix

Consider barrier if QQT is sparse

Or if node log indicates dual and primal simplex

are time consuming

Worker problem modifications

Rhs of primal subproblem changes

Dual feasibility preserved

By default CPLEX uses dual simplex on the

primal LP subproblem

0

[integer] ,0

y

x

bAx

ydxcMin TT

0

ˆ

y

xTrQy

ydMin T

x̂ cut

© 2015 IBM Corporation34

Using Benders with CPLEX interactive

Read decomposition from annotation

read myprob.lp

read myanno.ann

optimize

Let CPLEX decompose the model

read myprob.lp

set benders strategy 3

optimize

OR

Benders in CPLEX

© 2015 IBM Corporation35

Benders in CPLEX

API functions

Annotations file I/O

CPXreadcopyannotations – input annotation file

CPXwritebendersannotation – write annotation file associated with

CPLEX’s automatic decomposition (benders strategy 3)

Annotation creation/management (long or double values)

CPXnewlongannotation

CPXgetlongannotationindex

CPXsetlongannotations

Use to instruct CPLEX whether annotation corresponds to variables,

constraints, etc.

Optimizing

CPXbendersopt

© 2015 IBM Corporation36

Benders in CPLEX

Performance

Examine node log

Assess progress in best node/dual bound resulting from Benders

cuts

Make sure LP subproblems solve quickly

Make sure LP/MIP master problem solves efficiently

Limited control over Benders algorithm

Use regular LP/MIP tuning parameters for master problem

Benders workeralgorithm to change LP algorithm

Then use simplex or barrier algorithm parameters to tune further

Set mipdisplay to 5 to see workeralgorithm performance, assess

potential for improvement

Numerical tuning tactics for the complete model apply.

© 2015 IBM Corporation37

Benders in CPLEX

Performance

Tightening the model formulation to avoid inefficient dialog between

the master and subproblem

Example: In facility location, if demands indicate at least 10

facilities must be open, add a constraint to reflect that

Master problem initially empty (0 facilities open)

Cuts from subproblem increase the number of open facilities

Don’t let the master and sub waste time examining combinations of 2

or 3 facilities

© 2015 IBM Corporation38

Benders in CPLEX A few loose ends

When does Benders’ loop stop?

Lack of progress in the best node

Subproblem does not generate a cut

Original LP/MIP is optimal

Assuming no numerical issues

Currently unsupported model and program characteristics

ranged constraints

semi-vars

global constraints, indicators

SOS

QP, QCP

lazy constraints

user cuts

control callbacks

Results in error CPXERR_NOT_FOR_BENDERS

© 2015 IBM Corporation39

Time to work out the details.

origin

al

refo

rmula

tion

maste

r

(rela

xation)

sla

ve

(separa

tion)

© 2015 IBM Corporation40

Benders details

Background essentials

Duality

Farkas Lemma / other theorems of the alternative

Goldman Resolution Theorem

Extended/Extreme Point formulations

© 2015 IBM Corporation41

Benders details

Background essentials: Duality

Primal (standard form):

Dual:

0

x

bAxtoSubject

xcMinimize T

Free

TT

T

cAtoSubject

bMaximize

© 2015 IBM Corporation42

Benders details

Background essentials: Duality

How do I determine the dual if the primal isn’t a minimization problem

with all equality constraints and zero lower bounds?

Either memorize how different constraint and bound types alter the

dual model

Or translate any different type of LP into minimization with equality

constraints and lower bounds of 0, then take the dual

Good practice for memorization

ux

bAxtoSubject

xcMaximize T

0

© 2015 IBM Corporation43

Benders details Background essentials: Duality

Translate any different type of LP into minimization with equality

constraints and lower bounds of 0, then take the dual and simplify

ux

bAxtoSubject

xcMaximize T

0

0,,

-

wsx

uIwIx

bIsAxtoSubject

xcMinimize T

0 ,

-

TTT

TT

cAtoSubject

ubMaximize

0 ,

TTT

TT

cAtoSubject

ubMinimize

© 2015 IBM Corporation44

Benders details

Background essentials: Duality

Weak duality

For any primal and dual feasible

solutions,

Strong Duality

For an optimal primal and optimal

dual solution,

0

x

bAxtoSubject

xcMinimize T

byxc TT

byxcTT **

Free

xcAxtoSubject

bMaximize

TT

T

© 2015 IBM Corporation45

Benders details

Background essentials: Farkas Lemma, Theorems of the Alternative

Either

or

Can use to show primal unboundedness implies dual infeasibility and

dual unboundedness implies primal infeasibility

solutiona has 0

x

bAx

bothnot but

solutiona has 0

0

b

A

T

T

© 2015 IBM Corporation46

Benders details

Background essentials: Other Theorems of the Alternative

Gordan’s Theorem: Exactly one of

and

has a solution

Others are similar:

Stiemke’s Theorem

Fourier-Motzkin Infeasibility Theorem

Can memorize, but better to just remember Farkas Lemma

Can derive all the others from that in a manner similar to taking the

duals of LPs with different mixtures of inequality and equality

constraints and simple bounds

Transform to Farkas Lemma, apply Farkas Lemma, transform back

0 ,0

0

xx

Ax

free

0

AT

© 2015 IBM Corporation47

Benders details

Background essentials: Goldman Resolution Theorem

Goldman Resolution Theorem: Any polyhedron P = {x: Ax = b, x>= 0}

can be represented as the sum of a bounded polyhedron and a cone.

Equivalently, any point in a P can be represented as a convex

combination of the extreme points in P and a nonnegative linear

combination of the extreme rays of P

Algebraically,

Px

vxx

Pvv

Pxx

L

j

ji

M

i

ij

L

j

j

M

L

any for

0, ,1 , Then

of directions extreme theof all be ,...,

and , of points extreme theof all be ,...,Let

111

1

1

© 2015 IBM Corporation48

Background essentials: Goldman Resolution Theorem

In matrix notation, any feasible solution of P = {x: Ax = b, x>= 0}

can be expressed as

(extreme rays)

(extreme points)

0 ,0

1e

}),,{ V };,,{ (X 11

T

ML vvxxVXx

Benders details

© 2015 IBM Corporation49

Graphically,

Column Generation (Theory)

0

2

Vx

,0

1e

1

T

Xx

Benders details

Background essentials: Goldman Resolution Theorem

,0,

1e

3

T

VXx

© 2015 IBM Corporation50

# of

variables

has

increased

dramatically,

but only one

new

constraint

exists

Benders details

Extended/Extreme Point Formulation

Use Goldman Resolution Theorem to replace

with

0

x

bAxtoSubject

xcMinimize T

0,0

1e

T

TT

bAVAXtoSubject

VcXcMinimize

Only one

more basic

variable

© 2015 IBM Corporation51

Benders details

Alternate Extended/Extreme Point Formulation

If an optimal solution x* exists, extreme points and directions

satisfy

0

x

bAxtoSubject

xcMinimize T

0,

,1 0c

,1 xc xc j

*

vx

Miv

Lj

i

T

TT

Find an extreme

point solution with

minimal objective

Ensure there are no

extreme directions

that improve the

objective (i.e. ensure

boundedness)

© 2015 IBM Corporation52

Benders details

Extended/Extreme Point Formulation

Impractical as an explicit formulation

Too many extreme points and extreme rays

# of columns of AX + AV >> # rows = # rows of A

Optimal basis depends on the number of rows of A

If m = # rows of A, # of extreme points in an optimal solution <= m+1

Start with a small subset of extreme points, solve subproblems to

generate the ones in the optimal solution

Dantzig-Wolfe decomposition

(aka column generation) uses

extended formulation on the

primal problem

Benders decomposition uses

extended formulation on the

dual problem0,0

1e

T

TT

bAVAXtoSubject

VcXcMinimize

© 2015 IBM Corporation53

Benders Overview

origin

al

refo

rmula

tion

maste

r

(rela

xation)

sla

ve

(separa

tion)

© 2015 IBM Corporation54

Fundamentals

Benders’ Decomposition decomposes models of the following form

integer ,0

x

bAx

ydxcMin TT

0

ˆ

y

xTrQy

ydMin T

cut

0

)ˆ(

TT

T

dQ

xTrMax

Extreme pts.

N

K

vvDRAY

DVERT

,,)(

,, )(

1

1

(D)

Extreme rays

dual

© 2015 IBM Corporation55

Fundamentals

Benders’ Decomposition decomposes models of the following form

0

)ˆ(

TT

T

dQ

xTrMax

Extreme pts.

N

K

vvDRAY

DVERT

,,)(

,, )(

1

1

(D)

Extreme rays

0,

,,1 0)ˆ(

,,1 )ˆ(

v

NixTrv

KjxTryd

T

i

T

j

T

duality)by weak ( yd T

At optimality, extreme points and extreme directions satisfy

© 2015 IBM Corporation56

FundamentalsSuppose solving

Is unbounded. Then the solve provides an extreme direction v such that

0

)ˆ(

TT

T

dQ

xTrMax

0)ˆ(

0

xTrv

Qv

T

T

0

ˆ

y

xTrQy

ydMin T

infeasible

0)ˆ(

0)(

xTrv

yQv

T

T

Infeasibility

Proof

problem

master for the infeasible is ˆ that so direction, extreme

unbounded offcut to0)ˆ(cut y feasibilit theAdd

x

xTrvT

© 2015 IBM Corporation57

FundamentalsSuppose solving

yields a feasible, optimal solution. Then the optimal solution is an extreme

point , which provides a tighter lower bound

0

)ˆ(

TT

T

dQ

xTrMax

)ˆ(* xTrydT

j

T

*j

problem.master MIPfor the obtained boundtighter

ereflect th to)ˆ(cut optimality theAdd T xTryd T

© 2015 IBM Corporation58

FundamentalsSuppose solving

Is infeasible Then

is unbounded, and so is

the original problem

0

)ˆ(

TT

T

dQ

xTrMax

0

ˆ

y

xTrQy

ydMin T

0

integer ,0

y

x

rQyTx

bAx

ydxcMin TT

© 2015 IBM Corporation59

Benders Overviewm

aste

r

(rela

xation)

sla

ve

(se

para

tion)

)( yd T

(optimality cut)

(feasibility cut)

(solve the dual of original

subproblem)

Details have been worked out…

© 2015 IBM Corporation60

Computational results

Benders decomposition is not a silver bullet!

Full automatic decomposition, on our MIP library, models solved in 10 sec

or more, threshold of 2x ratio, Benders is better on 5% of the models.

But it can really shine!

Specific benchmark set of 329 models for Benders, some with manual

decomposition

Timeouts: 7 instead of 85

3x on all models

10x on 100 sec or more

© 2015 IBM Corporation61

Summary and Conclusions

First learn to identify problems on which Benders might work

- Master problem a MIP or LP, subproblem an LP with fixed integer

values from master problem

- Specific models on which Benders’ does well

• Facility Location (both capacitated and uncapacitated)

• Network Expansion

• Network Design

• See references that follow for more

- Specific structures that are likely to do well

• Only integer variables are those that control values for the

continuous variables in the model

• Binaries that model fixed costs

• Associated subproblem constraints become simple bounds

• Anything in the A,T and Q matrices that makes the master or

subproblem easy to solve

© 2015 IBM Corporation62

Summary and Conclusions

Next learn to troubleshoot performance problems

- Look at the node log

• But the output for Benders’ is slightly different than regular mipopt

- Use Benders’ parameters

• Can change algorithm used to solve subproblem

- Look individually at the A, T and Q matrices for sources of numerical

problems

Last use the details of Benders’ Decomposition to use it more effectively

- Use annotations to do nonstandard decompositions

- Better performance tuning and troubleshooting

© 2015 IBM Corporation63

References

Originally proposed for MILP by Benders [Benders, 1962]

Generalized to convex MINLP by Geoffrion [Geoffrion, 1972]

One of the methods of choice for large size stochastic LP and MILP

See, e.g., [Van Slyke and Wets, 1969, Carøe and Tind, 1998, Bodur et al., 2016,

Hassanzadeh and Ralphs, 2016]

But also effective on non-stochastic problems, as e.g.,

Network design

• See, e.g., [Costa, 2006] for a survey paper

Linear and quadratic facility location

• [Fischetti et al., 2015, Fischetti et al., 2016]

https://www.cirrelt.ca/DocumentsTravail/CIRRELT-2016-30.pdf (Table 1 lists different types

of models where Benders’ has been successful)

© 2015 IBM Corporation64

Backup

© 2015 IBM Corporation66

Legal Disclaimer

• © IBM Corporation 2015. All Rights Reserved.

• The information contained in this publication is provided for informational purposes only. While efforts were made to verify the completeness and accuracy of the information contained

in this publication, it is provided AS IS without warranty of any kind, express or implied. In addition, this information is based on IBM’s current product plans and strategy, which are

subject to change by IBM without notice. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this publication or any other materials. Nothing

contained in this publication is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and

conditions of the applicable license agreement governing the use of IBM software.

• References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or

capabilities referenced in this presentation may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment

to future product or feature availability in any way. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by

you will result in any specific sales, revenue growth or other results.

• If the text contains performance statistics or references to benchmarks, insert the following language; otherwise delete:

Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will

experience will vary depending upon many factors, including considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage

configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here.

• If the text includes any customer examples, please confirm we have prior written approval from such customer and insert the following language; otherwise delete:

All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual environmental costs

and performance characteristics may vary by customer.

• Please review text for proper trademark attribution of IBM products. At first use, each product name must be the full name and include appropriate trademark symbols (e.g., IBM

Lotus® Sametime® Unyte™). Subsequent references can drop “IBM” but should include the proper branding (e.g., Lotus Sametime Gateway, or WebSphere Application Server).

Please refer to http://www.ibm.com/legal/copytrade.shtml for guidance on which trademarks require the ® or ™ symbol. Do not use abbreviations for IBM product names in your

presentation. All product names must be used as adjectives rather than nouns. Please list all of the trademarks that you use in your presentation as follows; delete any not included in

your presentation. IBM, the IBM logo, Lotus, Lotus Notes, Notes, Domino, Quickr, Sametime, WebSphere, UC2, PartnerWorld and Lotusphere are trademarks of International

Business Machines Corporation in the United States, other countries, or both. Unyte is a trademark of WebDialogs, Inc., in the United States, other countries, or both.

• If you reference Adobe® in the text, please mark the first use and include the following; otherwise delete:

Adobe, the Adobe logo, PostScript, and the PostScript logo are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States, and/or other

countries.

• If you reference Java™ in the text, please mark the first use and include the following; otherwise delete:

Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.

• If you reference Microsoft® and/or Windows® in the text, please mark the first use and include the following, as applicable; otherwise delete:

Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both.

• If you reference Intel® and/or any of the following Intel products in the text, please mark the first use and include those that you use as follows; otherwise delete:

Intel, Intel Centrino, Celeron, Intel Xeon, Intel SpeedStep, Itanium, and Pentium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States

and other countries.

• If you reference UNIX® in the text, please mark the first use and include the following; otherwise delete:

UNIX is a registered trademark of The Open Group in the United States and other countries.

• If you reference Linux® in your presentation, please mark the first use and include the following; otherwise delete:

Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both. Other company, product, or service names may be trademarks or service marks of

others.

• If the text/graphics include screenshots, no actual IBM employee names may be used (even your own), if your screenshots include fictitious company names (e.g., Renovations, Zeta

Bank, Acme) please update and insert the following; otherwise delete: All references to [insert fictitious company name] refer to a fictitious company and are used for illustration

purposes only.

© 2015 IBM Corporation67

Benders in CPLEX

Scenario-based stochastic programming

Each subproblem corresponds to a separate scenario

0,

integer ,0

21

2222

1111

2211

yy

x

ryQxT

ryQxT

bAx

ydydxcMinTTT

0

0

2

1

2

1

Q

QQ

T

TT

(master)

(subproblem 1)

(subproblem 2)