Constraint Integer Programming Leon Eifler, eifler@zib.de CO@Work, - - PowerPoint PPT Presentation

constraint integer programming
SMART_READER_LITE
LIVE PREVIEW

Constraint Integer Programming Leon Eifler, eifler@zib.de CO@Work, - - PowerPoint PPT Presentation

Constraint Integer Programming Leon Eifler, eifler@zib.de CO@Work, 2020 Outline Constraint Integer Programming SCIPs Design The Solving Process of SCIP http://scipopt.org Leon Eifler (ZIB): Constraint Integer Programming 1 / 50 Outline


slide-1
SLIDE 1

Constraint Integer Programming

Leon Eifler, eifler@zib.de CO@Work, 2020

slide-2
SLIDE 2

Outline

Constraint Integer Programming SCIP’s Design The Solving Process of SCIP http://scipopt.org

Leon Eifler (ZIB): Constraint Integer Programming 1 / 50

slide-3
SLIDE 3

Outline

Constraint Integer Programming SCIP’s Design The Solving Process of SCIP http://scipopt.org

Leon Eifler (ZIB): Constraint Integer Programming 2 / 50

slide-4
SLIDE 4

What is a Constraint Integer Program?

Constraint Integer Program

Objective function: ⊲ linear function Feasible set: ⊲ described by arbitrary constraints Variable domains: ⊲ real or integer values Restriction: ⊲ When all integer variables are fixed, remaining subproblem is LP or NLP

min cT x s.t. x ∈ F (xI , xC ) ∈ ❩I × ❘C

Remark:

◮ arbitrary objective or variables modeled by constraints

Leon Eifler (ZIB): Constraint Integer Programming 3 / 50

slide-5
SLIDE 5

An Example: the Traveling Salesman Problem

Definition (TSP)

Given a complete graph G = (V , E) and distances de for all e ∈ E: Find a Hamiltonian cycle (cycle containing all nodes, tour) of minimum length. K8

Leon Eifler (ZIB): Constraint Integer Programming 4 / 50

slide-6
SLIDE 6

An Example: the Traveling Salesman Problem

Definition (TSP)

Given a complete graph G = (V , E) and distances de for all e ∈ E: Find a Hamiltonian cycle (cycle containing all nodes, tour) of minimum length. K8

Leon Eifler (ZIB): Constraint Integer Programming 4 / 50

slide-7
SLIDE 7

TSP – Integer Programming Formulation

Given ◮ complete graph G = (V , E) ◮ distances de > 0 for all e ∈ E Binary variables ◮ xe = 1 if edge e is used xe K8

Leon Eifler (ZIB): Constraint Integer Programming 5 / 50

slide-8
SLIDE 8

TSP – Integer Programming Formulation

Given ◮ complete graph G = (V , E) ◮ distances de > 0 for all e ∈ E Binary variables ◮ xe = 1 if edge e is used xe K8 min

  • e∈E

de xe subject to

  • e∈δ(v)

xe = 2 ∀v ∈ V

  • e∈δ(S)

xe ≥ 2 ∀S ⊂ V , S = ∅ xe ∈ {0, 1} ∀e ∈ E

Leon Eifler (ZIB): Constraint Integer Programming 5 / 50

slide-9
SLIDE 9

TSP – Integer Programming Formulation

Given ◮ complete graph G = (V , E) ◮ distances de > 0 for all e ∈ E Binary variables ◮ xe = 1 if edge e is used xe K8 min

  • e∈E

de xe subject to

  • e∈δ(v)

xe = 2 ∀v ∈ V

  • e∈δ(S)

xe ≥ 2 ∀S ⊂ V , S = ∅ xe ∈ {0, 1} ∀e ∈ E node degree

Leon Eifler (ZIB): Constraint Integer Programming 5 / 50

slide-10
SLIDE 10

TSP – Integer Programming Formulation

Given ◮ complete graph G = (V , E) ◮ distances de > 0 for all e ∈ E Binary variables ◮ xe = 1 if edge e is used xe K8 min

  • e∈E

de xe subject to

  • e∈δ(v)

xe = 2 ∀v ∈ V

  • e∈δ(S)

xe ≥ 2 ∀S ⊂ V , S = ∅ xe ∈ {0, 1} ∀e ∈ E subtour elimination

Leon Eifler (ZIB): Constraint Integer Programming 5 / 50

slide-11
SLIDE 11

TSP – Integer Programming Formulation

Given ◮ complete graph G = (V , E) ◮ distances de > 0 for all e ∈ E Binary variables ◮ xe = 1 if edge e is used xe K8 min

  • e∈E

de xe subject to

  • e∈δ(v)

xe = 2 ∀v ∈ V

  • e∈δ(S)

xe ≥ 2 ∀S ⊂ V , S = ∅ xe ∈ {0, 1} ∀e ∈ E distance

Leon Eifler (ZIB): Constraint Integer Programming 5 / 50

slide-12
SLIDE 12

What is a Constraint Integer Program?

Constraint Integer Program

Objective function: ⊲ linear function Feasible set: ⊲ described by arbitrary constraints Variable domains: ⊲ real or integer values Restriction: ⊲ When all integer variables are fixed, remaining subproblem is LP or NLP

min

  • e∈E

de xe s.t.

  • e∈δ(v)

xe = 2 ∀ v ∈ V nosubtour(x) xe ∈ {0, 1} ∀ e ∈ E (CIP formulation of TSP)

Single nosubtour constraint rules out subtours (e.g. by domain propagation). It may also separate subtour elimination inequalities.

Leon Eifler (ZIB): Constraint Integer Programming 6 / 50

slide-13
SLIDE 13

Mixed-Integer Nonlinear Programs (MINLPs)

min cTx s.t. gk(x) ≤ 0 ∀k ∈ [m] xi ∈ Z ∀i ∈ I ⊆ [n] xi ∈ [ℓi, ui] ∀i ∈ [n] The functions gk ∈ C 1([ℓ, u], R) can be

−1 1 −1 1 5 10

convex or

100 200 300 200 −200 200

nonconvex

Leon Eifler (ZIB): Constraint Integer Programming 7 / 50

slide-14
SLIDE 14

Constraint Integer Programming

◮ Mixed Integer Programs MIP

Leon Eifler (ZIB): Constraint Integer Programming 8 / 50

slide-15
SLIDE 15

Constraint Integer Programming

◮ Mixed Integer Programs ◮ SATisfiability problems MIP SAT

Leon Eifler (ZIB): Constraint Integer Programming 8 / 50

slide-16
SLIDE 16

Constraint Integer Programming

◮ Mixed Integer Programs ◮ SATisfiability problems ◮ Mixed Integer Nonlinear Programs MINLP MIP SAT

Leon Eifler (ZIB): Constraint Integer Programming 8 / 50

slide-17
SLIDE 17

Constraint Integer Programming

◮ Mixed Integer Programs ◮ SATisfiability problems ◮ Mixed Integer Nonlinear Programs ◮ Constraint Programming CP MINLP MIP SAT

Leon Eifler (ZIB): Constraint Integer Programming 8 / 50

slide-18
SLIDE 18

Constraint Integer Programming

◮ Mixed Integer Programs ◮ SATisfiability problems ◮ Mixed Integer Nonlinear Programs ◮ Constraint Programming ◮ Constraint Integer Programming CP CIP MINLP MIP SAT

Leon Eifler (ZIB): Constraint Integer Programming 8 / 50

slide-19
SLIDE 19

Quiz - Part I

◮ What is the key restriction that defines a CIP and why is it necessary? ◮ Think of a different problem that could benefit from a formulation as a CIP

Leon Eifler (ZIB): Constraint Integer Programming 9 / 50

slide-20
SLIDE 20

Quiz - Part I

◮ What is the key restriction that defines a CIP and why is it necessary? When all integer variables are fixed, remaining problem is LP or NLP ◮ Think of a different problem that could benefit from a formulation as a CIP

Leon Eifler (ZIB): Constraint Integer Programming 9 / 50

slide-21
SLIDE 21

Quiz - Part I

◮ What is the key restriction that defines a CIP and why is it necessary? When all integer variables are fixed, remaining problem is LP or NLP ◮ Think of a different problem that could benefit from a formulation as a CIP Possibilities: Linear ordering problem, Steiner tree problem, scheduling, ...

Leon Eifler (ZIB): Constraint Integer Programming 9 / 50

slide-22
SLIDE 22

Outline

Constraint Integer Programming SCIP’s Design The Solving Process of SCIP http://scipopt.org

Leon Eifler (ZIB): Constraint Integer Programming 10 / 50

slide-23
SLIDE 23

Different Tasks – Different Plugins

Different plugin classes are responsible of the following tasks.

  • 1. Presolving and node propagation

◮ Constraint handlers ◮ Presolvers ◮ Propagators

  • 2. Separation

◮ Constraint handlers ◮ Separators

  • 3. Improving solutions

◮ Primal heuristics

  • 4. Branching

◮ Constraint handlers ◮ Branching rules

  • 5. Node selection

◮ Node selectors

Leon Eifler (ZIB): Constraint Integer Programming 11 / 50

slide-24
SLIDE 24

Structure of SCIP SCIP

Primal Heuristic actcons diving coef diving cross

  • ver

dins feaspump fixand infer fracdiving guided diving intdiving int shifting linesearch diving local branching mutation subnlp

  • bjpscost

diving

  • ctane
  • neopt

pscost diving rens rins rootsol diving rounding shifting shift& prop simple rounding trivial trysol twoopt under cover veclen diving zi round Variable Event default Branch allfull strong full strong infer ence leastinf mostinf pscost random relps cost Conflict Constraint Handler and bound disjunc. count sols cumu lative indi cator integral knap sack linear linking logicor

  • r
  • rbi

tope quadr atic setppc soc sos1 sos2 var bound xor Cutpool LP clp cpx msk none qso spx xprs Dialog default Display default Node selector bfs dfs estimate hybrid estim restart dfs · · · Presolver bound shift dualfix implics intto binary probing trivial Impli cations Tree Reader ccg cip cnf fix lp mps

  • pb

ppm rlp sol sos zpl Pricer Separator clique cmir flow cover gomory implied bounds intobj mcf

  • dd

cycle rapid learn redcost strong cg zero half Propa gator pseudo

  • bj

root redcost vbound Relax

Leon Eifler (ZIB): Constraint Integer Programming 12 / 50

slide-25
SLIDE 25

Plugin based design

SCIP core ◮ branching tree ◮ variables ◮ conflict analysis ◮ solution pool ◮ cut pool ◮ statistics ◮ clique table ◮ implication graph ◮ . . .

Leon Eifler (ZIB): Constraint Integer Programming 13 / 50

slide-26
SLIDE 26

Plugin based design

SCIP core ◮ branching tree ◮ variables ◮ conflict analysis ◮ solution pool ◮ cut pool ◮ statistics ◮ clique table ◮ implication graph ◮ . . . Plugins ◮ external callback objects ◮ interact with the framework through a very detailed interface

Leon Eifler (ZIB): Constraint Integer Programming 13 / 50

slide-27
SLIDE 27

Plugin based design

SCIP core ◮ branching tree ◮ variables ◮ conflict analysis ◮ solution pool ◮ cut pool ◮ statistics ◮ clique table ◮ implication graph ◮ . . . Plugins ◮ external callback objects ◮ interact with the framework through a very detailed interface ◮ SCIP knows for each plugin type:

◮ the number of available plugins ◮ priority defining the calling order (usually)

◮ SCIP does not know any structure behind a plugin ⇒ plugins are black boxes for the SCIP core

Leon Eifler (ZIB): Constraint Integer Programming 13 / 50

slide-28
SLIDE 28

Plugin based design

SCIP core ◮ branching tree ◮ variables ◮ conflict analysis ◮ solution pool ◮ cut pool ◮ statistics ◮ clique table ◮ implication graph ◮ . . . Plugins ◮ external callback objects ◮ interact with the framework through a very detailed interface ◮ SCIP knows for each plugin type:

◮ the number of available plugins ◮ priority defining the calling order (usually)

◮ SCIP does not know any structure behind a plugin ⇒ plugins are black boxes for the SCIP core ⇒ Very flexible branch-and-bound based search algorithm

Leon Eifler (ZIB): Constraint Integer Programming 13 / 50

slide-29
SLIDE 29

Constraint Handlers

Constraint handlers ◮ most powerful plugins in SCIP ◮ define the feasible region ◮ a single constraint may represent a whole set of inequalities Functions ◮ check and enforce feasibility of solutions ◮ can add linear representation to LP relaxation ◮ constraint-specific presolving, domain propagation, separation Result ◮ SCIP is constraint based

◮ Advantage: flexibility ◮ Disadvantage: limited global view: A constraint knows its variables but a variable does not know the constraints it appears in. ◮ LP relaxation is an add-in and handled by external software via LP interface.

Leon Eifler (ZIB): Constraint Integer Programming 14 / 50

slide-30
SLIDE 30

Types of Plugins

◮ Constraint handler: assures feasibility, strengthens formulation ◮ Separator: adds cuts, improves dual bound ◮ Pricer: allows dynamic generation of variables ◮ Heuristic: searches solutions, improves primal bound ◮ Branching rule: how to divide the problem? ◮ Node selection: which subproblem should be regarded next? ◮ Presolver: simplifies the problem in advance, strengthens structure ◮ Propagator: simplifies problem, improves dual bound locally ◮ Reader: reads problems from different formats ◮ Event handler: catches events (e.g., bound changes, new solutions) ◮ Display: allows modification of output ◮ Relaxation handlers: custom relaxations ◮ . . .

Leon Eifler (ZIB): Constraint Integer Programming 15 / 50

slide-31
SLIDE 31

What does SCIP know about plugins?

◮ interactive shell shows the information SCIP has for a plugin type

SCIP > display {branching | conshdlrs | heuristics | ...}

Leon Eifler (ZIB): Constraint Integer Programming 16 / 50

slide-32
SLIDE 32

What does SCIP know about plugins?

◮ interactive shell shows the information SCIP has for a plugin type

SCIP > display {branching | conshdlrs | heuristics | ...} SCIP > display branching branching rule priority maxdepth maxbddist description

  • ------------- -------- -------- --------- -----------

relpscost 10000

  • 1

100.0% reliability branching

  • n pseudo

cost values pscost 2000

  • 1

100.0% branching

  • n pseudo

cost values inference 1000

  • 1

100.0% inference history branching mostinf 100

  • 1

100.0% most infeasible branching leastinf 50

  • 1

100.0% least infeasible branching distribution

  • 1

100.0% branching rule based on variable influence

  • n

cumu fullstrong

  • 1

100.0% full strong branching cloud

  • 1

100.0% branching rule that considers several alternative allfullstrong

  • 1000
  • 1

100.0% all variables full strong branching random

  • 100000
  • 1

100.0% random variable branching

Leon Eifler (ZIB): Constraint Integer Programming 16 / 50

slide-33
SLIDE 33

Extending SCIP SCIP

Primal Heuristic actcons diving coef diving cross

  • ver

dins feaspump fixand infer fracdiving guided diving intdiving int shifting linesearch diving local branching mutation subnlp

  • bjpscost

diving

  • ctane
  • neopt

pscost diving rens rins rootsol diving rounding shifting shift& prop simple rounding trivial trysol twoopt under cover veclen diving zi round Variable Event default Branch allfull strong full strong infer ence leastinf mostinf pscost random relps cost Conflict Constraint Handler and bound disjunc. count sols cumu lative indi cator integral knap sack linear linking logicor

  • r
  • rbi

tope quadr atic setppc soc sos1 sos2 var bound xor Cutpool LP clp cpx msk none qso spx xprs Dialog default Display default Node selector bfs dfs estimate hybrid estim restart dfs · · · Presolver bound shift dualfix implics intto binary probing trivial Impli cations Tree Reader ccg cip cnf fix lp mps

  • pb

ppm rlp sol sos zpl Pricer Separator clique cmir flow cover gomory implied bounds intobj mcf

  • dd

cycle rapid learn redcost strong cg zero half Propa gator pseudo

  • bj

root redcost vbound Relax

Leon Eifler (ZIB): Constraint Integer Programming 17 / 50

slide-34
SLIDE 34

Extending SCIP SCIP

Primal Heuristic actcons diving coef diving cross

  • ver

dins feaspump fixand infer fracdiving guided diving intdiving int shifting linesearch diving local branching mutation subnlp

  • bjpscost

diving

  • ctane
  • neopt

pscost diving rens rins rootsol diving rounding shifting shift& prop simple rounding trivial trysol twoopt under cover veclen diving default Variable Event default Branch allfull strong full strong infer ence leastinf mostinf pscost random relps cost Conflict Constraint Handler and bound disjunc. count sols cumu lative indi cator integral knap sack linear linking logicor

  • r
  • rbi

tope quadr atic setppc soc sos1 sos2 var bound default Cutpool LP clp cpx msk none qso spx default Dialog default Display default Node selector bfs dfs estimate hybrid estim default · · · Presolver bound shift dualfix implics intto binary probing default Impli cations Tree Reader ccg cip cnf fix lp mps

  • pb

ppm rlp sol sos default Pricer Separator clique cmir flow cover gomory implied bounds intobj mcf

  • dd

cycle rapid learn redcost strong cg default Propa gator pseudo

  • bj

root redcost default Relax

Leon Eifler (ZIB): Constraint Integer Programming 17 / 50

slide-35
SLIDE 35

Extending SCIP: TSP SCIP

Primal Heuristic farthest insert coef diving 2-Opt dins feaspump fixand infer fracdiving guided diving intdiving int shifting linesearch diving local branching mutation subnlp

  • bjpscost

diving

  • ctane
  • neopt

pscost diving rens rins rootsol diving rounding shifting shift& prop simple rounding trivial trysol twoopt under cover veclen diving default Variable Event default sol found Branch allfull strong full strong infer ence leastinf mostinf pscost random relps cost Conflict Constraint Handler subtour bound disjunc. count sols cumu lative indi cator integral knap sack linear linking logicor

  • r
  • rbi

tope quadr atic setppc soc sos1 sos2 var bound default Cutpool LP clp cpx msk none qso spx default Dialog default Display default Node selector bfs dfs estimate hybrid estim default · · · Presolver bound shift dualfix implics intto binary probing default Impli cations Tree Reader tsp cip cnf fix lp mps

  • pb

ppm rlp sol sos default Pricer Separator clique cmir flow cover gomory implied bounds intobj mcf

  • dd

cycle rapid learn redcost strong cg default Propa gator pseudo

  • bj

root redcost default Relax

Leon Eifler (ZIB): Constraint Integer Programming 17 / 50

slide-36
SLIDE 36

Summary

Plugins for the SCIP core ◮ are black boxes for SCIP ◮ perform all problem specific actions ◮ interact through a very detailed interface Plugins ◮ can have private data ◮ can access global information of the SCIP core ◮ should not access data of other plugins Result ◮ SCIP is constraint based ◮ new types of constraints can easily be defined ◮ easy to add problem specific algorithms

Leon Eifler (ZIB): Constraint Integer Programming 18 / 50

slide-37
SLIDE 37

Advantages and Disadvantages of SCIP

Advantages

◮ Can be used as a black box MIP solver

Leon Eifler (ZIB): Constraint Integer Programming 19 / 50

slide-38
SLIDE 38

Advantages and Disadvantages of SCIP

Advantages

◮ Can be used as a black box MIP solver ◮ Hundreds of parameters to play with

Leon Eifler (ZIB): Constraint Integer Programming 19 / 50

slide-39
SLIDE 39

Advantages and Disadvantages of SCIP

Advantages

◮ Can be used as a black box MIP solver ◮ Hundreds of parameters to play with ◮ Robust, fast, and well documented

Leon Eifler (ZIB): Constraint Integer Programming 19 / 50

slide-40
SLIDE 40

Advantages and Disadvantages of SCIP

Advantages

◮ Can be used as a black box MIP solver ◮ Hundreds of parameters to play with ◮ Robust, fast, and well documented ◮ Extendable in any direction since constraint based

◮ Adding global constraints ◮ Adding problem specific plugins

Leon Eifler (ZIB): Constraint Integer Programming 19 / 50

slide-41
SLIDE 41

Advantages and Disadvantages of SCIP

Advantages

◮ Can be used as a black box MIP solver ◮ Hundreds of parameters to play with ◮ Robust, fast, and well documented ◮ Extendable in any direction since constraint based

◮ Adding global constraints ◮ Adding problem specific plugins

Disadvantages

◮ Hundreds of parameters to play with ◮ In general variables do not know in which constraint they appear since constraint based

Leon Eifler (ZIB): Constraint Integer Programming 19 / 50

slide-42
SLIDE 42

Quiz - Part II

◮ Think of 3 different types of plugins within SCIP ◮ Why can’t plugins directly communicate with each other? ◮ Recall your own CIP formulation from Quiz - Part I. What plugin types would you need for it?

Leon Eifler (ZIB): Constraint Integer Programming 20 / 50

slide-43
SLIDE 43

Quiz - Part II

◮ Think of 3 different types of plugins within SCIP Constraint handler, event handler, separator, reader, ... ◮ Why can’t plugins directly communicate with each other? ◮ Recall your own CIP formulation from Quiz - Part I. What plugin types would you need for it?

Leon Eifler (ZIB): Constraint Integer Programming 20 / 50

slide-44
SLIDE 44

Quiz - Part II

◮ Think of 3 different types of plugins within SCIP Constraint handler, event handler, separator, reader, ... ◮ Why can’t plugins directly communicate with each other? Keep the framework as flexible as possible, no interdependencies ◮ Recall your own CIP formulation from Quiz - Part I. What plugin types would you need for it?

Leon Eifler (ZIB): Constraint Integer Programming 20 / 50

slide-45
SLIDE 45

Quiz - Part II

◮ Think of 3 different types of plugins within SCIP Constraint handler, event handler, separator, reader, ... ◮ Why can’t plugins directly communicate with each other? Keep the framework as flexible as possible, no interdependencies ◮ Recall your own CIP formulation from Quiz - Part I. What plugin types would you need for it? Very likely: Constraint handler, reader, heuristic

Leon Eifler (ZIB): Constraint Integer Programming 20 / 50

slide-46
SLIDE 46

Outline

Constraint Integer Programming SCIP’s Design The Solving Process of SCIP http://scipopt.org

Leon Eifler (ZIB): Constraint Integer Programming 21 / 50

slide-47
SLIDE 47

SCIP Interactive Shell Basics

Basic Workflow

read . . / check / i n s t a n c e s /MIP/ b e l l 5 . mps

  • ptimize

w r i t e s o l u t i o n mysolution . s o l q u i t

Displaying information

Use the display ... command to enter the menu and ◮ obtain solution information ◮ print the current transproblem to the console ◮ display plugin information, e.g., list all available branching rules

Changing Settings

Use the set ... command to list the settings menu.

Leon Eifler (ZIB): Constraint Integer Programming 22 / 50

slide-48
SLIDE 48

Important Parameters

Numerical parameters

These must be set before reading a problem. ◮ numerics/feastol, default 10−6 ◮ numerics/epsilon, default 10−9 ◮ numerics/infinity, default 1020

Limits

◮ limits/time ◮ limits/nodes ◮ limits/gap ◮ . . .

Randomization

◮ randomization/randomseedshift ◮ randomization/lpseed ◮ randomization/permutationseed

Leon Eifler (ZIB): Constraint Integer Programming 23 / 50

slide-49
SLIDE 49

Interfaces to SCIP

◮ interactive shell supports 11 different input formats → cip, cnf, flatzinc, rlp, lp, mps, opb, pip, wbo, zimpl, smps ◮ C API/callable library ◮ C++ wrapper classes ◮ Python interface

◮ New Dockerized SCIP ◮ conda integration coming soon

◮ Java JNI interface ◮ Julia interface ◮ AMPL ◮ GAMS ◮ Matlab (see also OPTI toolbox, http://www.i2c2.aut.ac.nz/Wiki/OPTI/)

Leon Eifler (ZIB): Constraint Integer Programming 24 / 50

slide-50
SLIDE 50

Getting help

If you should ever get stuck, you can . . .

  • 1. type help in the interactive shell
  • 2. read the documentation http://scipopt.org/doc/html

→ FAQ, HowTos for each plugin type, debugging, automatic testing, . . .

  • 3. search or post on Stack Overflow using the tag scip (more than 100 questions

already answered)

  • 4. active mailing list scip@zib.de (350+ members)

◮ search the mailing list archive (append site:listserv/pipermail/scip) ◮ register http://listserv.zib.de/mailman/listinfo/scip/ and post

Leon Eifler (ZIB): Constraint Integer Programming 25 / 50

slide-51
SLIDE 51

Operational Stages

Init Problem Transforming Free Transform Presolving Init Solve Solving Free Solve

Leon Eifler (ZIB): Constraint Integer Programming 26 / 50

slide-52
SLIDE 52

Operational Stages

Init Problem Transforming Free Transform Presolving Init Solve Solving Free Solve

◮ Basic data structures are allocated and initialized. ◮ User includes required plugins (or just takes default plugins).

Leon Eifler (ZIB): Constraint Integer Programming 26 / 50

slide-53
SLIDE 53

Problem Specification

Init Problem Transforming Free Transform Presolving Init Solve Solving Free Solve

◮ User creates and modifies the original problem instance. ◮ Problem creation is usually done in file readers.

Leon Eifler (ZIB): Constraint Integer Programming 27 / 50

slide-54
SLIDE 54

Transformation

Init Problem Transforming Free Transform Presolving Init Solve Solving Free Solve

◮ Creates a working copy of the original problem.

Leon Eifler (ZIB): Constraint Integer Programming 28 / 50

slide-55
SLIDE 55

Original and Transformed Problem

Original CIP

Original variables Original constraints

Transformed CIP

Transformed variables Transformed constraints ◮ data is copied into separate memory area ◮ presolving and solving operate on transformed problem ◮ original data can only be modified in problem modification stage

Leon Eifler (ZIB): Constraint Integer Programming 29 / 50

slide-56
SLIDE 56

Presolving

Init Problem Transforming Free Transform Presolving Init Solve Solving Free Solve

Leon Eifler (ZIB): Constraint Integer Programming 30 / 50

slide-57
SLIDE 57

Presolving Tips and Parameters

Use display presolvers to list all presolvers of SCIP.

Disable Presolving

Disable all presolving for a model s e t p r e s o l v i n g emphasis

  • f f

Deactivate single techniques s e t p r e s o l v i n g tworowbnd maxrounds 0 s e t propagating probing maxprerounds 0 s e t c o n s t r a i n t s components advanced maxprerounds 0

Aggressive Presolving

s e t p r e s o l v i n g emphasis a g g r e s s i v e

General Rule of Thumb

Only deactivate single presolving techniques if you encounter performance problems.

Leon Eifler (ZIB): Constraint Integer Programming 31 / 50

slide-58
SLIDE 58

Solving

Init Problem Transforming Free Transform Presolving Init Solve Solving Free Solve

Leon Eifler (ZIB): Constraint Integer Programming 32 / 50

slide-59
SLIDE 59

Flow Chart SCIP

Processing Presolving Stop Node selection Processing Branching

Conflict analysis Primal heuristics Domain propagation

Solve LP Pricing Cuts

Enforce constraints

Leon Eifler (ZIB): Constraint Integer Programming 33 / 50

slide-60
SLIDE 60

Flow Chart SCIP

Processing Presolving Stop Node selection Processing Branching

Conflict analysis Primal heuristics Domain propagation

Solve LP Pricing Cuts

Enforce constraints

Node selection

Leon Eifler (ZIB): Constraint Integer Programming 33 / 50

slide-61
SLIDE 61

Node Selection Tips and Parameters

Available Node Selectors

d i s p l a y n o d e s e l e c t o r s node s e l e c t o r std p r i o r i t y memsave p r i o d e s c r i p t i o n − − − − − − − − − − − − −− − − − − − − − − − − −− − − − − − − − − − − − − − − − − − − − − − − e s t i m a t e 200000 100 best e s t i m a t e s e a r c h b f s 100000 best f i r s t s e a r c h . . . d f s 100000 depth f i r s t s e a r c h

Switching Node Selectors

Only the node selector with highest standard priority is active. Use s e t n o d e s e l e c t i o n d f s s t d p r i o r i t y 1000000 to activate depth first search also in non-memsave mode.

Leon Eifler (ZIB): Constraint Integer Programming 34 / 50

slide-62
SLIDE 62

Flow Chart SCIP

Processing Presolving Stop Node selection Processing Branching

Conflict analysis Primal heuristics Domain propagation

Solve LP Pricing Cuts

Enforce constraints

Processing

Leon Eifler (ZIB): Constraint Integer Programming 35 / 50

slide-63
SLIDE 63

Flow Chart SCIP

Processing Presolving Stop Node selection Processing Branching

Conflict analysis Primal heuristics Domain propagation

Solve LP Pricing Cuts

Enforce constraints

Processing

Domain propagation

Leon Eifler (ZIB): Constraint Integer Programming 35 / 50

slide-64
SLIDE 64

Domain Propagation

x1 x2 x3 x4

x1 x2 x3 x4

Task

◮ simplify model locally ◮ improve local dual bound ◮ detect infeasibility

Techniques

◮ constraint specific

◮ each cons handler may provide a propagation routine ◮ reduced presolving (usually)

◮ dual propagation

◮ root reduced cost strengthening ◮ objective function

◮ special structures

◮ variable bounds

Leon Eifler (ZIB): Constraint Integer Programming 36 / 50

slide-65
SLIDE 65

Flow Chart SCIP

Processing Presolving Stop Node selection Processing Branching

Conflict analysis Primal heuristics Domain propagation

Solve LP Pricing Cuts

Enforce constraints

Processing Solve LP

Leon Eifler (ZIB): Constraint Integer Programming 37 / 50

slide-66
SLIDE 66

LP Solving Tips and Parameters

Most Important LP Parameters

◮ lp/initalgorithm, lp/resolvealgorithm

◮ Primal/Dual Simplex Algorithm ◮ Barrier w and w/o crossover

◮ lp/pricing

◮ normally LP solver specific default ◮ Devex ◮ Steepest edge ◮ Quick start steepest edge

◮ lp/threads Slow LP performance is a blocker for the solving process and can sometimes be manually tuned significantly.

Leon Eifler (ZIB): Constraint Integer Programming 38 / 50

slide-67
SLIDE 67

Flow Chart SCIP

Processing Presolving Stop Node selection Processing Branching

Conflict analysis Primal heuristics Domain propagation

Solve LP Pricing Cuts

Enforce constraints

Processing Pricing

Leon Eifler (ZIB): Constraint Integer Programming 39 / 50

slide-68
SLIDE 68

Flow Chart SCIP

Processing Presolving Stop Node selection Processing Branching

Conflict analysis Primal heuristics Domain propagation

Solve LP Pricing Cuts

Enforce constraints

Processing Cuts

Leon Eifler (ZIB): Constraint Integer Programming 40 / 50

slide-69
SLIDE 69

Separation Tips and Parameters

Disable/Speed up/Emphasize All Separation

s e t s e p a r a t i n g emphasis

  • f f / f a s t / a g g r e s s i v e

Disable Single Separation Techniques

s e t s e p a r a t i n g c l i q u e f r e q −1 s e t c o n s t r a i n t s c a r d i n a l i t y s e p a f r e q −1

Some Important Parameters

◮ separating/maxcuts, separating/maxcutsroot ◮ separating/maxrounds, separating/maxroundsroot ◮ separating/maxstallrounds, separating/maxstallroundsroot

Leon Eifler (ZIB): Constraint Integer Programming 41 / 50

slide-70
SLIDE 70

Flow Chart SCIP

Processing Presolving Stop Node selection Processing Branching

Conflict analysis Primal heuristics Domain propagation

Solve LP Pricing Cuts

Enforce constraints

Processing

Enforce constraints

Leon Eifler (ZIB): Constraint Integer Programming 42 / 50

slide-71
SLIDE 71

Constraint Enforcement

LP solution may violate a constraint not contained in the relaxation. Enforcing is necessary for a correct implementation! Constraint handler resolves the infeasibility by ... ◮ Reducing a variable’s domain, ◮ Separating a cutting plane (may use integrality), ◮ Adding a (local) constraint, ◮ Creating a branching, ◮ Concluding that the subproblem is infeasible and can be cut off, or ◮ Just saying “solution infeasible”.

Leon Eifler (ZIB): Constraint Integer Programming 43 / 50

slide-72
SLIDE 72

Constraint Enforcement

Processing Presolving Stop Node selection Processing Branching

Conflict analysis Primal heuristics Domain propagation

Solve LP Pricing Cuts

Enforce constraints Enforce constraints

◮ Reduced domain ◮ Added constraint ◮ Added cut ◮ Branched ◮ Cutoff ◮ Infeasible ◮ Feasible

Leon Eifler (ZIB): Constraint Integer Programming 44 / 50

slide-73
SLIDE 73

Constraint Enforcement

Processing Presolving Stop Node selection Processing Branching

Conflict analysis Primal heuristics Domain propagation

Solve LP Pricing Cuts

Enforce constraints Enforce constraints

◮ Reduced domain ◮ Added constraint ◮ Added cut ◮ Branched ◮ Cutoff ◮ Infeasible ◮ Feasible

Leon Eifler (ZIB): Constraint Integer Programming 44 / 50

slide-74
SLIDE 74

Constraint Enforcement

Processing Presolving Stop Node selection Processing Branching

Conflict analysis Primal heuristics Domain propagation

Solve LP Pricing Cuts

Enforce constraints Enforce constraints

◮ Reduced domain ◮ Added constraint ◮ Added cut ◮ Branched ◮ Cutoff ◮ Infeasible ◮ Feasible

Leon Eifler (ZIB): Constraint Integer Programming 44 / 50

slide-75
SLIDE 75

Constraint Enforcement

Processing Presolving Stop Node selection Processing Branching

Conflict analysis Primal heuristics Domain propagation

Solve LP Pricing Cuts

Enforce constraints Enforce constraints

◮ Reduced domain ◮ Added constraint ◮ Added cut ◮ Branched ◮ Cutoff ◮ Infeasible ◮ Feasible

Leon Eifler (ZIB): Constraint Integer Programming 44 / 50

slide-76
SLIDE 76

Constraint Enforcement

Processing Presolving Stop Node selection Processing Branching

Conflict analysis Primal heuristics Domain propagation

Solve LP Pricing Cuts

Enforce constraints Enforce constraints

◮ Reduced domain ◮ Added constraint ◮ Added cut ◮ Branched ◮ Cutoff ◮ Infeasible ◮ Feasible

Leon Eifler (ZIB): Constraint Integer Programming 44 / 50

slide-77
SLIDE 77

Constraint Enforcement

Processing Presolving Stop Node selection Processing Branching

Conflict analysis Primal heuristics Domain propagation

Solve LP Pricing Cuts

Enforce constraints Enforce constraints Enforce constraints

◮ Reduced domain ◮ Added constraint ◮ Added cut ◮ Branched ◮ Cutoff ◮ Infeasible ◮ Feasible

Leon Eifler (ZIB): Constraint Integer Programming 44 / 50

slide-78
SLIDE 78

Constraint Enforcement

Processing Presolving Stop Node selection Processing Branching

Conflict analysis Primal heuristics Domain propagation

Solve LP Pricing Cuts

Enforce constraints Enforce constraints

◮ Reduced domain ◮ Added constraint ◮ Added cut ◮ Branched ◮ Cutoff ◮ Infeasible ◮ Feasible

Leon Eifler (ZIB): Constraint Integer Programming 44 / 50

slide-79
SLIDE 79

Constraint Enforcement

Processing Presolving Stop Node selection Processing Branching

Conflict analysis Primal heuristics Domain propagation

Solve LP Pricing Cuts

Enforce constraints Enforce constraints

◮ Reduced domain ◮ Added constraint ◮ Added cut ◮ Branched ◮ Cutoff ◮ Infeasible ◮ Feasible

Leon Eifler (ZIB): Constraint Integer Programming 44 / 50

slide-80
SLIDE 80

Flow Chart SCIP

Processing Presolving Stop Node selection Processing Branching

Conflict analysis Primal heuristics Domain propagation

Solve LP Pricing Cuts

Enforce constraints

Branching

Leon Eifler (ZIB): Constraint Integer Programming 45 / 50

slide-81
SLIDE 81

Branching Rule Tips and Parameters

Branching Rule Selection

Branching rules are applied in decreasing order of priority. SCIP> d i s p l a y branching branching r u l e p r i o r i t y maxdepth maxbddist − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − r e l p s c o s t 10000 −1 100.0% pscost 2000 −1 100.0% i n f e r e n c e 1000 −1 100.0% mostinf 100 −1 100.0%

Reliability Branching Parameters

All parameters prefixed with branching/relpscost/ ◮ sbiterquot, sbiterofs to increase the budget for strong branching ◮ minreliable (= 1), maxreliable (= 5) to increase threshold to consider pseudo costs as reliable

Leon Eifler (ZIB): Constraint Integer Programming 46 / 50

slide-82
SLIDE 82

Flow Chart SCIP

Processing Presolving Stop Node selection Processing Branching

Conflict analysis Primal heuristics Domain propagation

Solve LP Pricing Cuts

Enforce constraints Primal heuristics

Leon Eifler (ZIB): Constraint Integer Programming 47 / 50

slide-83
SLIDE 83

Primal Heuristics Tips and Parameters

Disable/Speed Up/Emphasize Heuristics

s e t h e u r i s t i c s emphasis

  • f f / f a s t / a g g r e s s i v e

Disable an individual heuristic via s e t h e u r i s t i c s feaspump f r e q −1

Important Parameters

◮ heuristics/alns/nodesofs, heuristics/alns/nodesquot to increase the computational budget of this LNS technique ◮ heuristics/guideddiving/... lpsolvefreq, maxlpiterofs maxlpiterquot to control the LP solving during this diving technique

Advice

Use emphasis settings. Do not attempt to individually tune heuristics by hand.

Leon Eifler (ZIB): Constraint Integer Programming 48 / 50

slide-84
SLIDE 84

Quiz - Part III

◮ Why does SCIP create the transformed problem? ◮ What is the difference between enforcing and checking a solution? ◮ During which stage do you have to include user-created plugins?

Leon Eifler (ZIB): Constraint Integer Programming 49 / 50

slide-85
SLIDE 85

Quiz - Part III

◮ Why does SCIP create the transformed problem? Preserve original problem, ensure feasibility ◮ What is the difference between enforcing and checking a solution? ◮ During which stage do you have to include user-created plugins?

Leon Eifler (ZIB): Constraint Integer Programming 49 / 50

slide-86
SLIDE 86

Quiz - Part III

◮ Why does SCIP create the transformed problem? Preserve original problem, ensure feasibility ◮ What is the difference between enforcing and checking a solution? Enforcing resolves infeasibility ◮ During which stage do you have to include user-created plugins?

Leon Eifler (ZIB): Constraint Integer Programming 49 / 50

slide-87
SLIDE 87

Quiz - Part III

◮ Why does SCIP create the transformed problem? Preserve original problem, ensure feasibility ◮ What is the difference between enforcing and checking a solution? Enforcing resolves infeasibility ◮ During which stage do you have to include user-created plugins? The init stage

Leon Eifler (ZIB): Constraint Integer Programming 49 / 50

slide-88
SLIDE 88

Advanced Topics And Further Reading

Important SCIP topics not covered in this talk: ◮ more Details in Documentation ◮ branch-and-price: SCIP can be extended to a problem-specific branch-cut-and-price solver

◮ Q&A on youtube channel ◮ see The Bin Packing Example in C ◮ see also GCG

◮ allows for Benders decomposition since version 6.0

◮ Q&A on youtube channel

◮ browse technical reports for details on recently added cutting plane selection, primal heuristics, symmetry breaking, and much more

Leon Eifler (ZIB): Constraint Integer Programming 50 / 50

slide-89
SLIDE 89

Thank you for your attention

Leon Eifler (ZIB): Constraint Integer Programming 50 / 50