Unsatisfiable Cores for Constraint Programming

Nicholas Downing, Thibaut Feydy, Peter J. StuckeyarXiv 2013

Abstract: Constraint Programming (CP) excels at handling complex structural constraints but often struggles with soft-constraint optimization where traditional branch-and-bound methods suffer from weak propagation. This paper presents a novel approach that integrates unsatisfiable core (UC) algorithms from the Boolean Satisfiability (SAT) domain into CP solvers using Lazy Clause Generation (LCG). By identifying minimal subsets of conflicting constraints, the proposed method avoids the "thrashing" search common in branch-and-bound. Experimental results on resource-constrained scheduling problems demonstrate that UC-based CP solvers can outperform traditional CP, SAT, and Mixed Integer Programming (MIP) solvers by orders of magnitude.

Introduction

In Constraint Programming, constraints are typically "hard," meaning they must be satisfied for a solution to be valid. Real-world applications, however, often require "soft" constraints representing preferences or goals that should be met if possible. Standard CP solvers handle these using a Branch-and-Bound (B&B) strategy: finding a feasible solution and then iteratively searching for a better one.

The primary drawback of B&B in CP is that soft constraints provide poor pruning power (propagation), leading to an inefficient "thrashing" search. This work bridges the gap between CP and SAT by leveraging Unsatisfiable Cores to drive optimization, focusing on the reasons for failure rather than the enumeration of suboptimal successes.

Methods

The core of the approach is Lazy Clause Generation (LCG). In an LCG-enabled solver, the CP engine generates Boolean clauses to explain why a specific search path failed. These clauses allow the solver to function like a SAT solver under the hood, enabling the extraction of an unsatisfiable core—a subset of constraints that are mutually inconsistent.

Resolution proof showing the derivation of an unsatisfiable core from a set of constraints.

The authors implement two primary MAXSAT-derived algorithms within the CP context:

  1. WPM1: An aggressive approach that identifies a core, relaxes it by allowing one constraint to be violated, and repeats the process.
  2. MSU3: A hybrid approach that uses cores to identify which constraints should be "softened" and then switches to branch-and-bound to optimize them.

To facilitate this, soft constraints are modeled using half-reification ($i_j \rightarrow I_j$), where Boolean indicator variables $i_j$ control whether a constraint $I_j$ is enforced.

Experimental Results

The researchers evaluated their approach on modified Resource Constrained Project Scheduling Problems (RCPSP) from PSPLib. In these benchmarks, precedence requirements were treated as soft constraints to be maximized under tight deadlines.

Performance comparison of CPX (core-based) vs. traditional B&B, SAT, and MIP solvers across various datasets.

As shown in the performance data, the core-based CPX solver (specifically the MSU1/WPM1 and MSU3 variants) significantly outperformed standard B&B. For instance, on the ubo50 dataset (cardinality version), the MSU1 variant reduced average solve time from 16.5 seconds to just 0.77 seconds.

Furthermore, the hybrid CP approach maintained the structural advantages of CP—such as handling complex cumulative resource constraints—while gaining the optimization efficiency of SAT solvers. This allowed it to outperform both pure SAT solvers and industrial MIP solvers like CPLEX and SCIP, which often struggled with the large number of variables generated by decomposing scheduling constraints.

Conclusion

Integrating unsatisfiable core algorithms into CP solvers via LCG provides a powerful framework for soft-constraint optimization. By focusing on the "bottlenecks" of a problem, these solvers achieve superior performance and robustness on complex scheduling and planning tasks that were previously difficult for traditional CP or MIP methods to solve efficiently.

Summary updated

BibTeX
@misc{downing2013unsatisfiable,
  author = {Nicholas Downing and Thibaut Feydy and Peter J. Stuckey},
  title = {{Unsatisfiable Cores for Constraint Programming}},
  year = {2013},
  eprint = {1305.1690},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1305.1690},
}
Figure