scip introduction sep 26 2018
play

SCIP Introduction Sep. 26, 2018 Time Schedule 9:3011:00 - PowerPoint PPT Presentation

SCIP Introduction Sep. 26, 2018 Time Schedule 9:3011:00 Introduction & Overview (1) 11:0011:30 Break 11:3012:30 Introduction & Overview (2) 12:3014:00 Lunch Break 14:0015:30 Programming Exercises with PySCIPOpt


  1. Constraint Integer Programming CIP • M ixed I nteger P rograms • SAT isfiability problems MIP • P seudo- B oolean O ptimization • M ixed I nteger N on l inear P rograms SAT PBO MINLP CP • C onstraint P rogramming • C onstraint I nteger P rogramming Relation to CP and MIP • Every MIP is a CIP. “MIP � CIP” • Every CP over a finite domain space is a CIP. “FD � CIP” Gregor Hendel, hendel@zib.de – SCIP Introduction 13/71

  2. Outline SCIP – Solving Constraint Integer Programs Constraint Integer Programming The Solving Process of SCIP Extending SCIP by Plugins The SCIP Optimization Suite http://scip.zib.de Gregor Hendel, hendel@zib.de – SCIP Introduction 14/71

  3. Branch-and-bound Gregor Hendel, hendel@zib.de – SCIP Introduction 15/71

  4. SCIP Interactive Shell Basics Basic Workflow read . . / check / i n s t a n c e s /MIP/ b e l l 5 . mps optimize 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. Gregor Hendel, hendel@zib.de – SCIP Introduction 16/71

  5. 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 10 20 Limits • limits/time • limits/nodes • limits/gap Randomization • randomization/randomseedshift • randomization/lpseed • randomization/permutationseed Gregor Hendel, hendel@zib.de – SCIP Introduction 17/71

  6. 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 Gregor Hendel, hendel@zib.de – SCIP Introduction 18/71

  7. Operational Stages Init Init Solve Transforming Presolving Solving Problem Free Transform Free Solve Gregor Hendel, hendel@zib.de – SCIP Introduction 19/71

  8. Operational Stages Init Init Solve Transforming Presolving Solving Problem Free Transform Free Solve • Basic data structures are allocated and initialized. • User includes required plugins (or just takes default plugins). Gregor Hendel, hendel@zib.de – SCIP Introduction 19/71

  9. Problem Specification Init Init Solve Transforming Presolving Solving Problem Free Transform Free Solve • User creates and modifies the original problem instance. • Problem creation is usually done in file readers. Gregor Hendel, hendel@zib.de – SCIP Introduction 20/71

  10. Define Variables (LOP Example) SCIP_VAR* var; SCIP_CALL( // return value macro SCIPcreateVar ( scip , // SCIP pointer &var , // save in variable "varname", // pass variable name 0.0, // lower bound 1.0, // upper bound length , // obj. value SCIP_VARTYPE_BINARY , // type TRUE , // initial FALSE , // removable NULL , NULL , NULL , // no callback functions NULL // no variable data ) ); SCIP_CALL( SCIPaddVar(scip , var) ); // add var. Gregor Hendel, hendel@zib.de – SCIP Introduction 21/71

  11. TSP: Define Degree Constraints SCIP_CALL( SCIPcreateConsLinear ( scip , // SCIP pointer &cons , // save in cons "consname", // name nvar , // number of variables vars , // array of variables vals , // array of values 2.0, // left hand side 2.0, // right hand side (equation) TRUE , // initial? FALSE , // separate? TRUE , // enforce? TRUE , // check? TRUE , // propagate? FALSE , // local? FALSE , // modifable? FALSE , // dynamic? FALSE , // removable? FALSE // stick at node? )); SCIP_CALL( SCIPaddCons (scip , cons) ); // add constraint SCIP_CALL( SCIPreleaseCons (scip , &cons) ); // free cons. space MIPs are specified using linear constraints only (may be “upgraded”). Gregor Hendel, hendel@zib.de – SCIP Introduction 22/71

  12. Transformation Init Init Solve Transforming Presolving Solving Problem Free Transform Free Solve • Creates a working copy of the original problem. Gregor Hendel, hendel@zib.de – SCIP Introduction 23/71

  13. Original and Transformed Problem Original CIP Transformed CIP Original variables Transformed variables Original constraints 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 Gregor Hendel, hendel@zib.de – SCIP Introduction 24/71

  14. Presolving Init Init Solve Transforming Presolving Solving Problem Free Transform Free Solve Gregor Hendel, hendel@zib.de – SCIP Introduction 25/71

  15. Presolving Task • reduce size of model by removing irrelevant information • strengthen LP relaxation by exploiting integrality information • make the LP relaxation numerically more stable • extract useful information Primal Reductions: • based on feasibility reasoning • no feasible solution is cut off Dual Reductions: • consider objective function • at least one optimal solution remains Gregor Hendel, hendel@zib.de – SCIP Introduction 26/71

  16. 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 o 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. Gregor Hendel, hendel@zib.de – SCIP Introduction 27/71

  17. Solving Init Init Solve Transforming Presolving Solving Problem Free Transform Free Solve Gregor Hendel, hendel@zib.de – SCIP Introduction 28/71

  18. Flow Chart SCIP Presolving Stop Domain propagation Node selection Solve LP Pricing Conflict analysis Cuts Processing Processing Enforce constraints Primal heuristics Branching Gregor Hendel, hendel@zib.de – SCIP Introduction 29/71

  19. Flow Chart SCIP Presolving Stop Domain propagation Node selection Node selection Solve LP Pricing Conflict analysis Cuts Processing Processing Enforce constraints Primal heuristics Branching Gregor Hendel, hendel@zib.de – SCIP Introduction 29/71

  20. Node Selection Techniques • basic rules • depth first search (DFS) → early feasible solutions • best bound search (BBS) → improve dual bound • best estimate search (BES) → improve primal bound Task • combinations • BBS or BES with plunging • improve primal bound • hybrid BES/BBS • keep comp. effort small • interleaved BES/BBS • improve global dual bound Gregor Hendel, hendel@zib.de – SCIP Introduction 30/71

  21. 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 0 best f i r s t s e a r c h . . . d f s 0 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. Gregor Hendel, hendel@zib.de – SCIP Introduction 31/71

  22. Flow Chart SCIP Presolving Stop Domain propagation Node selection Solve LP Pricing Conflict analysis Cuts Processing Processing Processing Enforce constraints Primal heuristics Branching Gregor Hendel, hendel@zib.de – SCIP Introduction 32/71

  23. Flow Chart SCIP Presolving Stop Domain propagation Domain propagation Node selection Solve LP Pricing Conflict analysis Cuts Processing Processing Processing Enforce constraints Primal heuristics Branching Gregor Hendel, hendel@zib.de – SCIP Introduction 32/71

  24. Domain Propagation x 1 x 1 Techniques x 2 x 2 • constraint specific ⇒ • each cons handler may provide a x 3 x 3 propagation routine • reduced presolving (usually) x 4 x 4 • dual propagation • root reduced cost strengthening Task • objective function • simplify model locally • special structures • variable bounds • improve local dual bound • detect infeasibility Gregor Hendel, hendel@zib.de – SCIP Introduction 33/71

  25. Flow Chart SCIP Presolving Stop Domain propagation Node selection Solve LP Solve LP Pricing Conflict analysis Cuts Processing Processing Processing Enforce constraints Primal heuristics Branching Gregor Hendel, hendel@zib.de – SCIP Introduction 34/71

  26. LP Solving • LP solver is a black box • interface to different LP solvers: SoPlex, CPLEX, XPress, Gurobi, CLP, . . . • primal/dual simplex • barrier with/without crossover • feasibility double-checked by SCIP • condition number check • resolution by changing parameters: scaling, tolerances, solving from scratch, other simplex Gregor Hendel, hendel@zib.de – SCIP Introduction 35/71

  27. 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. Gregor Hendel, hendel@zib.de – SCIP Introduction 36/71

  28. Flow Chart SCIP Presolving Stop Domain propagation Node selection Solve LP Pricing Pricing Conflict analysis Cuts Processing Processing Processing Enforce constraints Primal heuristics Branching Gregor Hendel, hendel@zib.de – SCIP Introduction 37/71

  29. Pricing Pricing • find variable with negative reduced costs • or prove that there exists none • typically problem specific • dynamic aging of variables Branch-and-Price • problem variable pricer to add them again • huge number of variables • early branching possible • start with subset • lazy variable bounds • add others, when needed Gregor Hendel, hendel@zib.de – SCIP Introduction 38/71

  30. Flow Chart SCIP Presolving Stop Domain propagation Node selection Solve LP Pricing Conflict analysis Cuts Cuts Processing Processing Processing Enforce constraints Primal heuristics Branching Gregor Hendel, hendel@zib.de – SCIP Introduction 39/71

  31. Cutting Plane Separation Techniques • general cuts • complemented MIR cuts • Gomory mixed integer cuts • strong Chv´ atal-Gomory cuts • implied bound cuts • reduced cost strengthening • problem specific cuts Task • 0-1 knapsack problem • stable set problem • strengthen relaxation • 0-1 single node flow problem • add valid constraints • generate on demand Gregor Hendel, hendel@zib.de – SCIP Introduction 40/71

  32. Cuts for the 0-1 Knapsack Problem Feasible region: ( b ∈ ❩ + , a j ∈ ❩ + ∀ j ∈ N ) X BK := { x ∈ { 0 , 1 } n : � a j x j ≤ b } j ∈ N Minimal Cover: C ⊆ N 5 x 1 + 6 x 2 + 2 x 3 + 2 x 4 ≤ 8 • � a j > b j ∈ C • � j ∈ C \{ i } a j ≤ b ∀ i ∈ C Minimal cover: C = { 2 , 3 , 4 } Minimal cover inequality: Minimal Cover Inequality x 2 + x 3 + x 4 ≤ 2 � x j ≤ | C | − 1 j ∈ C Gregor Hendel, hendel@zib.de – SCIP Introduction 41/71

  33. Separation Tips and Parameters Disable/Speed up/Emphasize All Separation s e t s e p a r a t i n g emphasis o 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 Gregor Hendel, hendel@zib.de – SCIP Introduction 42/71

  34. Flow Chart SCIP Presolving Stop Domain propagation Node selection Solve LP Pricing Conflict analysis Cuts Processing Processing Processing Enforce constraints Enforce constraints Primal heuristics Branching Gregor Hendel, hendel@zib.de – SCIP Introduction 43/71

  35. 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”. Gregor Hendel, hendel@zib.de – SCIP Introduction 44/71

  36. Constraint Enforcement Presolving Stop Domain propagation Node selection Solve LP Pricing Conflict analysis Cuts Processing Processing Enforce constraints Enforce constraints Primal heuristics Branching • Reduced domain • Added cut • Cutoff • Infeasible • Added constraint • Branched • Feasible Gregor Hendel, hendel@zib.de – SCIP Introduction 45/71

  37. Constraint Enforcement Presolving Stop Domain propagation Node selection Solve LP Pricing Conflict analysis Cuts Processing Processing Enforce constraints Enforce constraints Primal heuristics Branching • Reduced domain • Added cut • Cutoff • Infeasible • Added constraint • Branched • Feasible Gregor Hendel, hendel@zib.de – SCIP Introduction 45/71

  38. Constraint Enforcement Presolving Stop Domain propagation Node selection Solve LP Pricing Conflict analysis Cuts Processing Processing Enforce constraints Enforce constraints Primal heuristics Branching • Reduced domain • Added cut • Cutoff • Infeasible • Added constraint • Branched • Feasible Gregor Hendel, hendel@zib.de – SCIP Introduction 45/71

  39. Constraint Enforcement Presolving Stop Domain propagation Node selection Solve LP Pricing Conflict analysis Cuts Processing Processing Enforce constraints Enforce constraints Primal heuristics Branching • Reduced domain • Added cut • Cutoff • Infeasible • Added constraint • Branched • Feasible Gregor Hendel, hendel@zib.de – SCIP Introduction 45/71

  40. Constraint Enforcement Presolving Stop Domain propagation Node selection Solve LP Pricing Conflict analysis Cuts Processing Processing Enforce constraints Enforce constraints Primal heuristics Branching • Reduced domain • Added cut • Cutoff • Infeasible • Added constraint • Branched • Feasible Gregor Hendel, hendel@zib.de – SCIP Introduction 45/71

  41. Constraint Enforcement Presolving Stop Domain propagation Node selection Solve LP Pricing Conflict analysis Cuts Processing Processing Enforce constraints Enforce constraints Enforce constraints Primal heuristics Branching • Reduced domain • Added cut • Cutoff • Infeasible • Added constraint • Branched • Feasible Gregor Hendel, hendel@zib.de – SCIP Introduction 45/71

  42. Constraint Enforcement Presolving Stop Domain propagation Node selection Solve LP Pricing Conflict analysis Cuts Processing Processing Enforce constraints Enforce constraints Primal heuristics Branching • Reduced domain • Added cut • Cutoff • Infeasible • Added constraint • Branched • Feasible Gregor Hendel, hendel@zib.de – SCIP Introduction 45/71

  43. Constraint Enforcement Presolving Stop Domain propagation Node selection Solve LP Pricing Conflict analysis Cuts Processing Processing Enforce constraints Enforce constraints Primal heuristics Branching • Reduced domain • Added cut • Cutoff • Infeasible • Added constraint • Branched • Feasible Gregor Hendel, hendel@zib.de – SCIP Introduction 45/71

  44. Flow Chart SCIP Presolving Stop Domain propagation Node selection Solve LP Pricing Conflict analysis Cuts Processing Processing Enforce constraints Primal heuristics Branching Branching Gregor Hendel, hendel@zib.de – SCIP Introduction 46/71

  45. Branching Rules Techniques • branching on variables • most infeasible • least infeasible • random branching • strong branching • pseudocost • reliability • VSIDS • hybrid reliability/inference Task • branching on constraints • divide into (disjoint) • SOS1 subproblems • SOS2 • improve local bounds Gregor Hendel, hendel@zib.de – SCIP Introduction 47/71

  46. 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 Gregor Hendel, hendel@zib.de – SCIP Introduction 48/71

  47. Flow Chart SCIP Presolving Stop Domain propagation Node selection Solve LP Pricing Conflict analysis Cuts Processing Processing Enforce constraints Primal heuristics Primal heuristics Branching Gregor Hendel, hendel@zib.de – SCIP Introduction 49/71

  48. Primal Heuristics Techniques • structure-based • clique • variable bounds • rounding • possibly solve final LP • diving • least infeasible • guided • objective diving Task • objective feasibility pump • Large Neighborhood Search • improve primal bound • RINS, local branching • effective on average • RENS • Adaptive LNS • guide remaining search • Completion of partial solutions Gregor Hendel, hendel@zib.de – SCIP Introduction 50/71

  49. Primal Heuristics Tips and Parameters Disable/Speed Up/Emphasize Heuristics s e t h e u r i s t i c s emphasis o 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. Gregor Hendel, hendel@zib.de – SCIP Introduction 51/71

  50. Flow Chart SCIP Presolving Stop Domain propagation Node selection Solve LP Pricing Conflict analysis Conflict analysis Cuts Processing Processing Enforce constraints Primal heuristics Branching Gregor Hendel, hendel@zib.de – SCIP Introduction 52/71

  51. Conflict Analysis Techniques • Analyze: • Propagation conflicts • Infeasible LPs • Bound-exceeding LPs • Strong branching conflicts • Detection: • Cut in conflict graph Task • LP: Dual ray heuristic • Analyze infeasibility • Use conflicts: • Derive valid constraints • Only for propagation • As cutting planes • Help to prune other nodes Gregor Hendel, hendel@zib.de – SCIP Introduction 53/71

  52. Operational Stages Init Init Solve Transforming Presolving Solving Problem Free Transform Free Solve Gregor Hendel, hendel@zib.de – SCIP Introduction 54/71

  53. Outline SCIP – Solving Constraint Integer Programs Constraint Integer Programming The Solving Process of SCIP Extending SCIP by Plugins The SCIP Optimization Suite http://scip.zib.de Gregor Hendel, hendel@zib.de – SCIP Introduction 55/71

  54. The SCIP C API • C code and documentation • more than 800 000 lines of C code, 20% documentation • over 50 000 assertions and 5 000 debug messages • HowTos: plugins types, debugging, automatic testing • 10 examples illustrating the use of SCIP • 5 problem specific SCIP applications to solve Coloring, Steiner Tree, or Multiobjective problems. • Interface and usability • Cross-platform availability due to CMake • user-friendly interactive shell • C++ wrapper classes • LP solvers: SoPlex, CPLEX, Gurobi, Xpress, CLP, MOSEK, QSopt • NLP solvers: IPOPT, FilterSQP, WORHP • over 2 300 parameters and 15 emphasis settings Gregor Hendel, hendel@zib.de – SCIP Introduction 56/71

  55. Interfaces to SCIP • interactive shell supports 10 different input formats → cip, cnf, flatzinc, rlp, lp, mps, opb, pip, wbo, zimpl • C API/callable library • C++ wrapper classes • Python interface • Java JNI interface • AMPL • GAMS • Matlab (see also OPTI toolbox, http://www.i2c2.aut.ac.nz/Wiki/OPTI/ ) Gregor Hendel, hendel@zib.de – SCIP Introduction 57/71

  56. Getting help If you should ever get stuck, you can . . . 1. type help in the interactive shell 2. read the documentation http://scip.zib.de/doc/html → FAQ, HowTos for each plugin type, debugging, automatic testing, . . . 3. 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 4. search or post on Stack Overflow using the tag scip (more than 100 questions already answered) Gregor Hendel, hendel@zib.de – SCIP Introduction 58/71

  57. Structure of SCIP mps opb implied bounds intobj gomory ppm lp flow mcf cover rlp fix odd cycle Reader cmir Separator cnf sol rapid learn clique probing sos cip intto trivial binary redcost ccg zpl zero strong implics cg half dualfix Presolver pseudo fracdiving intdiving Tree Pricer obj linesearch Impli bound feaspump diving cations root guided shift redcost fixand diving int shifting infer Propa cross gator local mutation vbound over dins branching restart dfs · · · Relax coef subnlp hybrid diving objpscost estim actcons diving diving SCIP Node Primal octane estimate selector Heuristic oneopt zi round dfs pscost veclen Display Variable diving diving bfs under twoopt rins rens cover Dialog Event default trivial rounding shift& prop rootsol trysol default diving default Cutpool Conflict simple shifting rounding allfull bound strong var xprs bound disjunc. full xor and strong count spx sos2 sols infer cumu sos1 ence lative LP Branch qso Constraint indi soc cator leastinf Handler relps none clp integral cost setppc mostinf quadr knap msk cpx atic sack random pscost or linking orbi linear tope logicor Gregor Hendel, hendel@zib.de – SCIP Introduction 59/71

  58. Structure of SCIP mps opb implied bounds intobj gomory ppm lp flow mcf cover rlp fix odd cycle Reader cmir Separator cnf sol rapid learn clique probing sos cip intto trivial binary redcost ccg zpl zero strong implics cg half dualfix Presolver pseudo fracdiving intdiving Tree Pricer obj linesearch Impli bound feaspump diving cations root guided shift redcost fixand diving int shifting infer Propa cross gator local mutation vbound over dins branching restart dfs · · · Relax coef subnlp hybrid diving objpscost estim actcons diving diving SCIP Node Primal octane estimate selector Heuristic oneopt zi round dfs pscost veclen Display Variable diving diving bfs under twoopt rins rens cover Dialog Event default trivial rounding shift& prop rootsol trysol default diving default Cutpool Conflict simple shifting rounding allfull bound strong var xprs bound disjunc. full xor and strong count spx sos2 sols infer cumu sos1 ence lative LP Branch qso Constraint indi soc cator leastinf Handler relps none clp integral cost setppc mostinf quadr knap msk cpx atic sack random pscost or linking orbi linear tope logicor Gregor Hendel, hendel@zib.de – SCIP Introduction 59/71

  59. Structure of SCIP mps opb implied bounds intobj gomory ppm lp flow mcf cover rlp fix odd cycle Reader cmir Separator cnf sol rapid learn clique probing sos cip intto trivial binary redcost ccg zpl zero strong implics cg half dualfix Presolver pseudo fracdiving intdiving Tree Pricer obj linesearch Impli bound feaspump diving cations root guided shift redcost fixand diving int shifting infer Propa cross gator local mutation vbound over dins branching restart dfs · · · Relax coef subnlp hybrid diving objpscost estim actcons diving diving SCIP Node Primal octane estimate selector Heuristic oneopt zi round dfs pscost veclen Display Variable diving diving bfs under twoopt rins rens cover Dialog Event default trivial rounding shift& prop rootsol trysol default diving default Cutpool Conflict simple shifting rounding allfull bound strong var xprs bound disjunc. full xor and strong count spx sos2 sols infer cumu sos1 ence lative LP Branch qso Constraint indi soc cator leastinf Handler relps none clp integral cost setppc mostinf quadr knap msk cpx atic sack random pscost or linking orbi linear tope logicor Gregor Hendel, hendel@zib.de – SCIP Introduction 59/71

  60. Plugin based design SCIP core • branching tree • solution pool • clique table • variables • cut pool • implication graph • conflict analysis • statistics • . . . Gregor Hendel, hendel@zib.de – SCIP Introduction 60/71

  61. Plugin based design SCIP core • branching tree • solution pool • clique table • variables • cut pool • implication graph • conflict analysis • statistics • . . . Plugins • external callback objects • interact with the framework through a very detailed interface Gregor Hendel, hendel@zib.de – SCIP Introduction 60/71

  62. Plugin based design SCIP core • branching tree • solution pool • clique table • variables • cut pool • implication graph • conflict analysis • statistics • . . . 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 Gregor Hendel, hendel@zib.de – SCIP Introduction 60/71

  63. Plugin based design SCIP core • branching tree • solution pool • clique table • variables • cut pool • implication graph • conflict analysis • statistics • . . . 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 Gregor Hendel, hendel@zib.de – SCIP Introduction 60/71

  64. 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 • . . . Gregor Hendel, hendel@zib.de – SCIP Introduction 61/71

  65. A closer look: branching rules mps opb implied bounds intobj gomory ppm lp flow mcf cover rlp fix odd cycle Reader cmir Separator cnf sol rapid learn clique probing sos cip intto trivial binary redcost ccg zpl zero strong implics cg half dualfix Presolver pseudo fracdiving intdiving Tree Pricer obj linesearch Impli bound feaspump diving cations root guided shift redcost fixand diving int shifting infer Propa cross gator local mutation vbound over dins branching restart dfs · · · Relax coef subnlp hybrid diving objpscost estim actcons diving diving SCIP Node Primal octane estimate selector Heuristic oneopt zi round dfs pscost veclen Display Variable diving diving bfs under twoopt rins rens cover Dialog Event default trivial rounding shift& prop rootsol trysol default diving default Cutpool Conflict simple shifting rounding allfull bound strong var xprs bound disjunc. full xor and strong count spx sos2 sols infer cumu sos1 ence lative LP Branch qso Constraint indi soc cator leastinf Handler relps none clp integral cost setppc mostinf quadr knap msk cpx atic sack random pscost or linking orbi linear tope logicor Gregor Hendel, hendel@zib.de – SCIP Introduction 62/71

  66. A closer look: branching rules allfull strong full strong infer u ence lative Branch leastinf relps cost tegral mostinf random pscost Gregor Hendel, hendel@zib.de – SCIP Introduction 62/71

  67. What does SCIP know about branching rules? • SCIP knows the number of available branching rules • each branching rule has a priority • SCIP calls the branching rule in decreasing order of priority • the interface defines the possible results of a call: • branched • reduced domains • added constraints • detected cutoff • did not run Gregor Hendel, hendel@zib.de – SCIP Introduction 63/71

  68. How does SCIP call a branching rule? /* start timing */ SCIPclockStart (branchrule ->branchclock , set ); /* call external method */ SCIP_CALL( branchrule -> branchexeclp (set ->scip , branchrule , allowaddcons , result) ); /* stop timing */ SCIPclockStop (branchrule ->branchclock , set ); /* evaluate result */ if( *result != SCIP_CUTOFF && *result != SCIP_CONSADDED && *result != SCIP_REDUCEDDOM && *result != SCIP_SEPARATED && *result != SCIP_BRANCHED && *result != SCIP_DIDNOTRUN ) { SCIPerrorMessage ( "branching�rule� <%s>�returned�invalid�result�code� <%d>�from�LP�\ �������solution�branching\n", branchrule ->name , *result ); return SCIP_INVALIDRESULT ; } Gregor Hendel, hendel@zib.de – SCIP Introduction 64/71

  69. What can a plugin access? Plugins are allowed to access all global (core) information • branching tree • solution pool • clique table • variables • cut pool • implication graph • conflict analysis • statistics • . . . Gregor Hendel, hendel@zib.de – SCIP Introduction 65/71

  70. What can a plugin access? Plugins are allowed to access all global (core) information • branching tree • solution pool • clique table • variables • cut pool • implication graph • conflict analysis • statistics • . . . Ideally, plugins should not access data of other plugins!!! Gregor Hendel, hendel@zib.de – SCIP Introduction 65/71

  71. What can a plugin access? Plugins are allowed to access all global (core) information • branching tree • solution pool • clique table • variables • cut pool • implication graph • conflict analysis • statistics • . . . Ideally, plugins should not access data of other plugins!!! Branching Rules • LP solution • variables • statistics Gregor Hendel, hendel@zib.de – SCIP Introduction 65/71

  72. 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 Gregor Hendel, hendel@zib.de – SCIP Introduction 66/71

  73. Default Plugins mps opb implied bounds gomory intobj ppm lp flow mcf rlp cover fix odd cycle Reader cmir Separator cnf sol rapid learn clique probing sos cip intto trivial binary redcost ccg zpl zero strong implics half cg dualfix Presolver pseudo fracdiving intdiving Tree Pricer obj linesearch Impli bound feaspump diving root shift cations guided redcost fixand diving int shifting infer Propa gator cross local mutation vbound over dins branching restart dfs · · · Relax coef subnlp hybrid diving objpscost estim actcons diving diving SCIP Node Primal estimate octane selector Heuristic zi round oneopt dfs pscost veclen Display Variable diving diving bfs under twoopt rins rens Dialog Event cover default trivial rounding shift& prop rootsol trysol default diving default Cutpool Conflict simple shifting rounding allfull strong var bound xprs bound disjunc. full xor and strong count spx sos2 sols infer cumu ence sos1 lative LP Branch qso Constraint indi soc leastinf Handler cator relps none clp integral cost setppc mostinf quadr knap msk cpx atic sack random pscost or linking orbi linear tope logicor Gregor Hendel, hendel@zib.de – SCIP Introduction 67/71

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend