Skip to main content
Log in

Nutmeg: a MIP and CP Hybrid Solver Using Branch-and-Check

  • Original Research
  • Published:
SN Operations Research Forum Aims and scope Submit manuscript


This paper describes the implementation of Nutmeg, a solver that hybridizes mixed integer linear programming and constraint programming using the branch-and-cut style of logic-based Benders decomposition known as branch-and-check. Given a high-level constraint programming model, Nutmeg automatically derives a mixed integer programming master problem that omits global constraints with weak linear relaxations, and a constraint programming subproblem identical to the original model. At every node in the branch-and-bound search tree, the linear relaxation computes dual bounds and proposes solutions, which are checked for feasibility of the omitted constraints in the constraint programming subproblem. In the case of infeasibility, conflict analysis generates Benders cuts, which are appended to the linear relaxation to cut off the candidate solution. Experimental results show that Nutmeg’s automatic decomposition outperforms pure constraint programming and pure mixed integer programming on problems known to have successful implementations of logic-based Benders decomposition, but performs poorly on general problems, which lack specific decomposable structure. Nonetheless, Nutmeg outperforms the standalone approaches on one problem with no known decomposable structure, providing preliminary indications that a hand-tailored decomposition for this problem could be worthwhile. On the whole, Nutmeg serves as a valuable tool for novice modelers to try hybrid solving and for expert modelers to quickly compare different logic-based Benders decompositions of their problems.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10

Similar content being viewed by others

Data Availability

All problems and instances are either contained within the source code repository of Nutmeg or available at the MiniZinc Challenge website.Footnote 2





  1. Achterberg T (2007) Conflict analysis in mixed integer programming. Discrete Optim 4(1):4–20

    Article  Google Scholar 

  2. Achterberg T (2009) SCIP: solving constraint integer programs. Math Program Comput 1(1):1–41

    Article  Google Scholar 

  3. Albareda-Sambola M, Fernández E, Laporte G (2009) The capacity and distance constrained plant location problem. Comput Oper Res 36:597–611

    Article  Google Scholar 

  4. Beck JC (2010) Checking-up on branch-and-check. In: Cohen D (ed) Principles and practice of constraint programming – CP 2010, lecture notes in computer science, vol 6308. Springer, Berlin, pp 84–98

  5. Belov G, Stuckey PJ, Tack G, Wallace M (2016) Improved linearization of constraint programming models. In: Rueher M (ed) Principles and practice of constraint programming: 22nd international conference, CP 2016, Toulouse, France, September 5-9, 2016. proceedings. Springer International Publishing, pp 49–65

  6. Benchimol P, van Hoeve WJ, Régin JC, Rousseau LM, Rueher M (2012) Improved filtering for weighted circuit constraints. Constraints 17(3):205–233

    Article  Google Scholar 

  7. Benders JF (1962) Partitioning procedures for solving mixed-variables programming problems. Numerische mathematik 4(1):238–252

    Article  Google Scholar 

  8. Bensana E, Lemaitre M, Verfaillie G (1999) Earth observation satellite management. Constraints 4(3):293–299

    Article  Google Scholar 

  9. Chu GG Improving combinatorial optimization. Ph.D. thesis, University of Melbourne (2011).

  10. Conforti M, Cornuéjols G, Zambelli G (2014) Integer programming, vol 271. Springer, Berlin

    Google Scholar 

  11. Davies TO, Gange G, Stuckey PJ (2017) Automatic logic-based Benders decomposition with MiniZinc. In: AAAI, pp 787–793

  12. Feydy T, Stuckey PJ (2009) Lazy clause generation reengineered. In: Gent IP (ed) Principles and practice of constraint programming – CP 2009: 15th international conference, CP 2009 lisbon, portugal, september 20-24, 2009 proceedings. Springer, Berlin, pp 352–366

  13. Focacci F, Lodi A, Milano M (2002) Optimization-oriented global constraints. Constraints 7(3-4):351–365

    Article  Google Scholar 

  14. Fontaine D, Michel L, Van Hentenryck P (2014) Constraint-based Lagrangian relaxation. In: O’sullivan B (ed) Principles and practice of constraint programming: 20th international conference, CP 2014, Lyon, France, September 8-12, 2014. proceedings. lecture notes in computer science, vol 8656. Springer International Publishing, pp 324–339

  15. Gamrath G (2010) Generic branch-cut-and-price. Ph.D. thesis, Technische Universität Berlin

    Google Scholar 

  16. Gamrath G, Lübbecke ME (2010) Experiments with a generic Dantzig-Wolfe decomposition for integer programs. In: Festa P, Experimental algorithms: 9th international symposium SEA 2010 Ischia Island (eds). Springer, Berlin, pp 239–252

  17. Gange G, Berg J, Demirović E, Stuckey PJ (2020) Core-guided and core-boosted search for CP. In: Proceedings of the 7th international conference on the integration of constraint programming, artificial intelligence, and operations research. (to appear)

  18. Gleixner A, Bastubbe M, Eifler L, Gally T, Gamrath G, Gottwald RL, Hendel G, Hojny C, Koch T, Lübbecke ME, Maher SJ, Miltenberger M, Müller B, Pfetsch ME, Puchert C, Rehfeldt D, Schlösser F, Schubert C, Serrano F, Shinano Y, Viernickel JM, Walter M, Wegscheider F, Witt JT, Witzig J (2018) The SCIP Optimization Suite 6.0. ZIB-Report 18-26, Zuse Institute Berlin.

  19. Hooker JN (2004) A hybrid method for planning and scheduling. In: Wallace M (ed) Principles and practice of constraint programming – CP 2004, lecture notes in computer science, vol 3258. Springer, Berlin, pp 305–316

  20. Hooker JN (2007) Planning and scheduling by logic-based Benders decomposition. Oper Res 55(3):588–602

    Article  Google Scholar 

  21. Hooker JN, Ottosson G (2003) Logic-based Benders decomposition. Math Program 96(1):33–60

    Article  Google Scholar 

  22. Junker U, Karisch SE, Kohl N, Vaaben B, Fahle T, Sellmann M (1999) A framework for constraint programming based column generation. In: Jaffar J (ed) Principles and practice of constraint programming – CP’99: 5th international conference, CP’99, alexandria, VA, USA, October 11-14, 1999. Proceedings. Springer, pp 261–274

  23. Lam E (2017) Hybrid optimization of vehicle routing problems. Ph.D. thesis, University of Melbourne.

  24. Lam E, Van Hentenryck P (2016) A branch-and-price-and-check model for the vehicle routing problem with location congestion. Constraints 21 (3):394–412

    Article  Google Scholar 

  25. Lam E, Van Hentenryck P (2017) Branch-and-check with explanations for the vehicle routing problem with time windows. In: Beck JC (ed) Principles and practice of constraint programming: 23rd international conference, CP 2017, Melbourne, VIC, Australia, August 28 – September 1, 2017, Proceedings. Springer, Cham, pp 579–595

  26. Marques Silva JaP, Sakallah KA (1996) GRASP–a new search algorithm for satisfiability. In: Proceedings of the 1996 IEEE/ACM international conference on computer-aided design, ICCAD ’96. IEEE Computer Society, pp 220–227

  27. Nethercote N, Stuckey PJ, Becket R, Brand S, Duck GJ, Tack G (2007) Minizinc: towards a standard CP modelling language. In: Bessière C (ed) Principles and practice of constraint programming – CP 2007. Springer, Berlin, pp 529–543

  28. Ohrimenko O, Stuckey PJ, Codish M (2009) Propagation via lazy clause generation. Constraints 14(3):357–391

    Article  Google Scholar 

  29. Refalo P (2000) Linear formulation of constraint programming models and hybrid solvers. In: Dechter R (ed) Principles and practice of constraint programming – CP 2000. Springer, Berlin, pp 369–383

  30. Régin JC (2002) Cost-based arc consistency for global cardinality constraints. Constraints 7(3):387–405

    Article  Google Scholar 

  31. Schutt A, Feydy T, Stuckey PJ, Wallace MG (2010) Explaining the cumulative propagator. Constraints 16(3):250–282

    Article  Google Scholar 

  32. Shen K, Schimpf J (2005) Eplex: Harnessing mathematical programming solvers for constraint logic programming. In: Principles and practice of constraint programming: 11th international conference, CP2005, proceedings, LNCS, vol 3709. Springer, pp 622–636

  33. Steiger R, van Hoeve WJ, Szymanek R (2011) An efficient generic network flow constraint. In: Proceedings of the 2011 ACM symposium on applied computing. ACM, pp 893–900

  34. Taşkin ZC (2010) Benders decomposition. In: Wiley encyclopedia of operations research and management science. Wiley

  35. Thorsteinsson E (2001) Branch-and-check: a hybrid framework integrating mixed integer programming and constraint logic programming. In: Walsh T (ed) Principles and practice of constraint programming – CP. lecture notes in computer science, vol 2239. Springer, Berlin, pp 16–30

Download references


We would like to thank the two anonymous reviewers whose comments have substantially improved this paper.

Author information

Authors and Affiliations


Corresponding author

Correspondence to Edward Lam.

Ethics declarations

Conflict of Interest

The authors declare that they have no conflict of interest.

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Code Availability

The source code of Nutmeg is made available at the first author’s website.Footnote 1

This article is part of the Topical Collection on Decomposition at 70​



This appendix presents several models used in the experiments.

Capacity- and Distance-Constrained Plant Location Problem

The Capacity- and Distance-constrained Plant Location Problem (CDCPLP) is proposed in [3]. This problem considers a set \(\mathcal {F}\) of facilities. Every facility \(f \in \mathcal {F}\) is initially closed but can be opened at a cost \(w^{\text {open}}_{f} \in \mathbb {Z}_{+}\). Let of ∈{0, 1} be a binary variable indicating whether facility \(f \in \mathcal {F}\) is opened.

Let \(\mathcal {C}\) be the set of customers, each of which must be assigned to an opened facility. Assigning customer \(c \in \mathcal {C}\) to facility \(f \in \mathcal {F}\) incurs a cost \(w^{\text {assign}}_{c,f} \in \mathbb {Z}_{+}\). Let xc,f ∈{0, 1} be a binary variable indicating whether customer \(c \in \mathcal {C}\) is assigned to facility \(f \in \mathcal {F}\). Every customer \(c \in \mathcal {C}\) requires \(d_{c} \in \mathbb {Z}_{+}\) of demand. Each facility \(f \in \mathcal {F}\) can support up to \(D_{f} \in \mathbb {Z}_{+}\) of demand.

Customers assigned to a facility receive deliveries from trucks stationed at the facility. Allow up to \(T \in \mathbb {Z}_{+}\) trucks to be stationed at a facility, and let \(\mathcal {T} = \{ 1,\ldots ,T \}\) be the set of trucks. Let \(t_{c} \in \mathcal {T}\) be an integer variable for the number of the truck assigned to customer \(c \in \mathcal {C}\). Define \(q_{c,f} \in \mathbb {Z}_{+}\) as the distance from facility \(f \in \mathcal {F}\) to customer \(c \in \mathcal {C}\) and back. Each truck can carry the goods of only one customer at a time, and can travel up to \(Q \in \mathbb {Z}_{+}\) in total distance. Let \(n_{f} \in \mathcal {T}\) be an integer variable for the total number of trucks required at facility \(f \in \mathcal {F}\). Every truck kept at facility \(f \in \mathcal {F}\) incurs a cost \(w^{\text {truck}}_{f} \in \mathbb {Z}_{+}\).

The model is shown in Fig. 11. Objective Function (7a) minimizes the total cost of (1) opening facilities, (2) assigning customers to facilities, and (3) keeping trucks at facilities. Constraint (7b) opens a facility if it is assigned customers. This constraint also limits the number of customers assigned to a facility according to its maximum demand. Constraint (7c) assigns customers to trucks stationed at a facility while considering the total travel distance of each truck. Constraint (7d) calculates the number of trucks used at a facility.

Fig. 11
figure 11

The high-level model of the CDCPLP

Constraints (7e) and (7f) are redundant constraints, which improve the propagation. Constraint (7e) bounds the number of trucks required at a facility. Constraint (7f) limits the number of customers assigned to a facility. Constraints (7g) to (7j) give the variable domains.

Vehicle Routing Problem with Location Congestion

The Vehicle Routing Problem with Location Congestion (VRPLC) is introduced in [24]. The problem tasks a set of vehicles to deliver goods from a central depot to various locations subject to vehicle constraints and location constraints.

Let \(\mathcal {R}\) be the set of requests to be delivered. Let ⊥ denote the depot, and let \(\mathcal {N} = \mathcal {R} \cup \{ \bot \}\). Let \({\mathscr{L}}\) be the set of locations. Every request \(i \in \mathcal {R}\) must be delivered to location \(l_{i} \in {\mathscr{L}}\). Let \(\mathcal {R}_{l} = \{ i \in \mathcal {R} | l_{i} = l \}\) be the requests to be delivered to location \(l \in {\mathscr{L}}\). The key difference to standard Vehicle Routing Problems is the inclusion of location scheduling constraints. Every location l has a limited number \(C_{l} \in \mathbb {Z}_{+}\) of equipment for unloading a vehicle. Therefore, deliveries must be scheduled around the availability of the equipment.

Let \(T \in \mathbb {Z}_{+}\) be the time horizon. All deliveries must be completed and all vehicles must return to the depot before T. The problem also considers the usual vehicle capacity and time window constraints. Every request \(i \in \mathcal {N}\) has weight \(q_{i} \in \mathbb {Z}_{+}\) (q = 0) and every vehicle can carry up to \(Q \in \mathbb {Z}_{+}\) in weight. Delivery \(i \in \mathcal {N}\) must begin after \(a_{i} \in \mathbb {Z}_{+}\) (a = 0) and before \(b_{i} \in \mathbb {Z}_{+}\) (b = T). Performing delivery \(i \in \mathcal {R}\) uses one piece of equipment at li for \(s_{i} \in \mathbb {Z}_{+}\) time.

Let \(\mathcal {A} = \mathcal {N} \times \mathcal {N} \setminus \{ (i,i) | i \in \mathcal {N} \}\) denote the arcs. Define xi,j as a binary variable indicating whether a vehicle travels along arc \((i,j) \in \mathcal {A}\). Traveling along (i,j) consumes \(c_{i,j} \in \mathbb {Z}_{+}\) time. Define a variable wi for the total weight delivered after \(i \in \mathcal {N}\) along a route, and define a variable ti for the time of starting delivery \(i \in \mathcal {N}\). The model is presented in Fig. 12. Objective Function (8a) minimizes the total travel time. Constraints (8b) and (8c) require every request to be delivered. Constraint (8d) limits the total weight on-board a vehicle. Constraint (8e) enforces the travel time between two deliveries. Constraint (8f) schedules the requests at locations. Constraints (8g) to (8i) give the variable domains.

Fig. 12
figure 12

The high-level model of the VRPLC


The Spot5 problem is proposed in [8]. The problem concerns one of the SPOT commercial imaging satellites, specifically, the fifth satellite. Given a set of images purchased by clients, the Spot5 problem decides on a subset of images to capture in the next day, subject to operational constraints, such as the availability of imaging instruments and sufficient transition time between two successive images.

The satellite has three imaging instruments labeled 1, 2, and 3 from left to right. Let I be the set of purchased images, and let xi be an integer variable storing the instruments that will capture image iI. An image i can be postponed (xi = 0) or captured using a predetermined subset of compatible instruments: left only (xi = 1), middle only (xi = 2), right only (xi = 3), or both left and right (xi = 13) for stereoscopic images. Let D = {{0, 2},{0, 13},{0, 1, 2, 3}}, and let DiD be the set of possible instruments for capturing image i, i.e., the domain of xi. Every image i not captured is penalized by a cost \(c_{i} \in \mathbb {Z}_{+}\).

The problem uses the Table global constraint. Given a vector \(\mathbf {p} \in \mathbb {Z}^{n}\) with length n and a set \(P \subset \mathbb {Z}^{n}\) of vectors with length n, the constraint Table(p,P) states that pP. Put simply, the constraint requires p to be equal to a row in a table with rows P.

The problem contains Table constraints that define compatibility between two images, called binary constraints, and constraints stating compatibility between three images, called ternary constraints. Let \(\mathcal {A}\) be the set of binary constraints, where each constraint \(a \in \mathcal {A}\) is associated with two images ua,vaI and a compatibility table TaD × D. Let \({\mathscr{B}}\) be the set of ternary constraints, where each constraint \(b \in {\mathscr{B}}\) is associated with three images ub,vb,wbI and a compatibility table TbD × D × D.

The model is now presented in Fig. 13. Objective Function (9a) penalizes postponed images. Constraints (9b) and (9c) define compatible images. Constraint (9d) gives the variable domains.

Fig. 13
figure 13

The high-level model of the Spot5 problem

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Lam, E., Gange, G., Stuckey, P.J. et al. Nutmeg: a MIP and CP Hybrid Solver Using Branch-and-Check. SN Oper. Res. Forum 1, 22 (2020).

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: