## Abstract

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.

### 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}

## References

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

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

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

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

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

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

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

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

Chu GG Improving combinatorial optimization. Ph.D. thesis, University of Melbourne (2011). http://hdl.handle.net/11343/36679

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

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

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

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

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

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

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

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)

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. http://nbn-resolving.de/urn:nbn:de:0297-zib-69361

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

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

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

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

Lam E (2017) Hybrid optimization of vehicle routing problems. Ph.D. thesis, University of Melbourne. http://hdl.handle.net/11343/220534

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

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

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

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

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

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

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

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

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

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

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

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

## Acknowledgments

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

## Author information

### Authors and Affiliations

### Corresponding author

## 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*

## Appendices

### Appendix:

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 *o*_{f} ∈{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 *x*_{c,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.

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 *l*_{i} 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 *x*_{i,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 *w*_{i} for the total weight delivered after \(i \in \mathcal {N}\) along a route, and define a variable *t*_{i} 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.

### Spot5

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 *x*_{i} be an integer variable storing the instruments that will capture image *i* ∈ *I*. An image *i* can be postponed (*x*_{i} = 0) or captured using a predetermined subset of compatible instruments: left only (*x*_{i} = 1), middle only (*x*_{i} = 2), right only (*x*_{i} = 3), or both left and right (*x*_{i} = 13) for stereoscopic images. Let *D* = {{0, 2},{0, 13},{0, 1, 2, 3}}, and let *D*_{i} ∈ *D* be the set of possible instruments for capturing image *i*, i.e., the domain of *x*_{i}. 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 **p** ∈ *P*. 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 *u*_{a},*v*_{a} ∈ *I* and a compatibility table *T*_{a} ⊂ *D* × *D*. Let \({\mathscr{B}}\) be the set of ternary constraints, where each constraint \(b \in {\mathscr{B}}\) is associated with three images *u*_{b},*v*_{b},*w*_{b} ∈ *I* and a compatibility table *T*_{b} ⊂ *D* × *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.

## Rights and permissions

## About this article

### 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). https://doi.org/10.1007/s43069-020-00023-2

Received:

Accepted:

Published:

DOI: https://doi.org/10.1007/s43069-020-00023-2