Abstract
A promising research line in the optimization community regards the hybridization of exact and heuristics methods. In this chapter we survey the specific integration of two complementary optimization paradigms, namely Constraint Programming, for the exact part, and
Access provided by Autonomous University of Puebla. Download chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
1 Constraint Programming and Metaheuristics
Constraint programming (GlossaryTerm
CP
) [1, 2] is an effective methodology for the solution of combinatorial problems that has been successfully applied in many domains. In a nutshell, GlossaryTermCP
is a declarative programming paradigm based on the idea of describing the relations (i. e., constraints) between variables that must hold in all solutions of the combinatorial problem at hand. For example, in the solution to a Sudoku puzzle, the numbers to be placed must be unique with respect to columns, rows, and blocks of the board.GlossaryTerm
CP
has an interdisciplinary nature, since it relies on contributions and methods from the communities of logic programming (GlossaryTermLP
), artificial intelligence (GlossaryTermAI
), and operations research (GlossaryTermOR
). Indeed, the simple declarative modeling language of GlossaryTermCP
, consisting of variables and constraints, is very similar to those available in classical GlossaryTermLP
languages such as Prolog. The solution method features constraint propagation which, in its essence, is a reasoning or inference procedure typical of GlossaryTermAI
. Finally, especially for optimization problems, the solution process makes use of GlossaryTermOR
inspired branch and bound procedures and/or of dedicated GlossaryTermOR
solvers for specific types of variables/constraints (e. g., the simplex method for real variables and linear ).A GlossaryTerm
CP
model is an encoding of the problem statement using the basic GlossaryTermCP
building blocks, i. e., variables and constraints. Once a GlossaryTermCP
model of the problem under consideration has been stated, a GlossaryTermCP
solver is used to systematically search the solution space by alternating deterministic phases (constraint propagation) and non-deterministic phases (variable assignment, tree search), thus exploring implicitly or explicitly the whole search space. To this respect, GlossaryTermCP
belongs to the family of complete (or exact) solution methods. In other words, GlossaryTermCP
guarantees finding the (optimal) solution of the problem or proving that the problem is notA different approach is usually taken by metaheuristics [3], such as local search [4], evolutionary algorithms [5], and ant colony optimization [6], just to name a few. These methods are incomplete, since they rely on heuristic information to focus on interesting areas of the search space and, in general, do not explore it entirely but are stopped after a given time limit. As a consequence, these algorithms do not guarantee finding the (optimal) solution, trading completeness for a (possibly) greater (empirical) efficiency in the solution process.
Just looking at completeness, it seems that the clear choice for solving combinatorial problems would be to always prefer GlossaryTerm
CP
over metaheuristics as the solution method. However, in practice completeness is hindered by the high computational effort due to the worst case complexity of the problems considered (usually NP-complete or NP-hard). Therefore, for practical purposes, also the execution of GlossaryTermCP
solvers is terminated before the whole search space has been explored and a number of heuristics is used to focus the search in the regions where it is more likely to find the solutions of the problem. Consequently, GlossaryTermCP
and metaheuristics could be seen as complementaryAlthough these two kinds of methods are have been individually studied by separated scientific communities (for historical reasons), in recent years we have witnessed an increasing interest in the integration of the methods. In many cases, indeed, each approach has its own strengths and weaknesses, and the general aim of method integration is to create hybrid algorithms that enhance the strengths of both approaches and (possibly) overcome some of the weaknesses. To this respect, Yunes maintains a web page listing a number of success stories of hybrid solution methods [7], that is, papers describing integrated approaches that outperform single optimization methods.
A number of conferences and workshops specifically aiming at bringing together researchers working on the integration of solution techniques for combinatorial problems have also recently started. Notable examples are the series of GlossaryTerm
CP
-GlossaryTermAI
-GlossaryTermOR
conferences [8, 9], started in 1999, and the Hybrid Metaheuristics workshops [10, 11, 12, 13, 14, 15, 16], started in 2004. The scope of these conferences is not limited to the integration of GlossaryTermCP
techniques with metaheuristics, but they also consider hybridization among other methods.Additionally, a few surveys on the integration of complete methods with metaheuristics have appeared in the literature [17, 18, 19]. However, these surveys either deal with a particular class of metaheuristics (i. e., local search) [17, 19] and/or with a different class of complete methods (integer linear programming) [17, 18]. Jourdan etal [20] also took GlossaryTerm
CP
methods into account, but they provide mostly a taxonomy of cooperation between optimization methods rather than surveying the specific integrations. Wallace and Azevedo etal [21, 22] surveys hybrid algorithms, but from a constraint programming viewpoint and mainly in the settings of hybrid exact methods. In their recent review of hybrid metaheuristics Blum etal [23] include a section on the integration of GlossaryTermCP
with local search and ant colony optimization (GlossaryTermACO
). However, to the best of our knowledge, at present no specific survey on the integration of metaheuristics and constraint programming has been published in the literature. This work tries to overcome this lack and to review the different approaches specifically employed in the integration of GlossaryTermCP
methods within metaheuristics.The chapter is organized as follows. In Sect. 62.2 the basic concepts of the constraint programming paradigm are introduced. They include modeling (Sect. 62.2.1), solution methods (Sect. 62.2.2), and GlossaryTerm
CP
systems (Sect. 62.2.3). The integration of GlossaryTermCP
with metaheuristics is presented in Sect. 62.3, which is organized on the basis of the metaheuristic type involved in the integration. Finally, in Sect. 62.4 some conclusions are drawn.2 Constraint Programming Essentials
In this section, we will briefly describe the essential concepts of GlossaryTerm
CP
, which are needed to understand the following sections. The readers interested in a more detailed introduction to GlossaryTermCP
are referred to the book of Apt [1] and to the recent comprehensive Handbook of Constraint Programming [2].In order to apply constraint programming to a combinatorial problem one first needs to model it through the specific formalism of constraint satisfaction or constrained optimization problems. Afterwards, the model can be solved by a GlossaryTerm
CP
solver, which alternates the analysis of constraints with tree search. Let us review these basic concepts.2.1 Modeling
Constraint satisfaction problems (GlossaryTerm
CSP
s) are a useful formalism for modeling many real-world problems, either discrete or continuous. Remarkable examples are planning, scheduling, timetabling, just to name a few.A GlossaryTerm
CSP
is generally defined as the problem of associating values (taken from a set of domains) to variables subject to a set of constraints. A solution of a GlossaryTermCSP
is an assignment of values to all the variables so that the constraints are satisfied. In some cases not all solutions are equally preferable and we can associate a cost function to the variable assignments. In these cases, we talk about constrained optimization problems (GlossaryTermCOP
s), and we are looking for a solution that (without loss of generality) minimizes the cost value. These concepts are formally introduced in the following.2.1.1 Constraint Satisfaction Problems
Given:
-
is a set of variables.
-
is a set of domains associated to the variables. In other words, each variable x i can assume value d i if and only if .
-
is a set of constraints, i. e., mathematical relations over .
We say that a tuple satisfies a constraint if and only if .
A constraint satisfaction problem (GlossaryTerm
CSP
) , described by the triple , is the problem of finding the tuples that satisfy every constraint . Such tuples are called solutions of the GlossaryTermCSP
, and the set of solutions of is denoted by .is said to be consistent or satisfiable if and only if .
Notice that, depending on the modeling of the combinatorial problem at hand, we could be interested in determining different properties of the GlossaryTerm
CSP
. In the extreme case, for example, one could just want to know whether the problem is satisfiable, regardless of the actual solutions. The most common case is to search and provide a single solution to the problem, whereas sometimes one could be interested in all the solutions.2.1.2 Constrained Optimization Problems
A constrained optimization problem (GlossaryTerm
COP
) is a GlossaryTermCSP
with an associated objective function , where is a well-ordered set (typically, E is one of the sets ).Differently from the previous case, the tuples that satisfy every constraint are called feasible solutions, and the set of these tuples is usually assumed to be non-empty. A solution of the GlossaryTerm
COP
is a feasible solution for which the value of the objective function f is minimized, i. e.,2.1.3 Observations
A few observations about this formalism are worth noting. First, notice that the general framework does not impose any restriction on either the type of domains and constraints or on the form of the objective function that can be used to express the problem. The basic type of domain is a finite set of integer values (also known as a finite domain), but there are other possibilities that enhance the expressive power of the modeling framework and capture some combinatorial substructures of the problem more naturally. For example, it is possible to deal with variables whose values are finite (multi)sets, (hyper)graphs, real valued intervals, or resources of a scheduling problem. Moreover, also the kind of constraints that can be employed is quite rich and includes arithmetic constraints, set constraints, permutation, counting and other types of combinatorial constraints, resource scheduling constraints, path constraints on graphs, and constraints expressible through regular expressions, just to name a few possibilities (see [24] for a comprehensive set of constraints and their implementation in actual GlossaryTerm
CP
systems).These features clearly make the modeling phase easier and more precise with respect to other formalisms such as integer linear programming. Indeed, part of the combinatorial structure of the problem can be directly captured by the use of complex domains/constraints and, as for the objective function, there is no general limitation on its form, in particular, there is no assumption of linearity.
Another important point to be noticed regards the role of constraints. Differently from other modeling formalisms, which distinguish between constraints that must be satisfied (called hard constraints) and that should preferably be satisfied (soft constraints), in the original GlossaryTerm
CSP
/GlossaryTermCOP
framework constraints are all hard and the solution methods, described in the following section, consider it mandatory to satisfy all of them. There have been several attempts in the GlossaryTermCP
literature to include soft constraints in the general framework (see, e. g., [25] for a review) but the most common way to handle them is to include a measure of their violation in the objective function of the problem.2.2 Solution Methods
GlossaryTerm
CP
solution methods basically exploit a form of tree search that interleaves a branching phase with an analysis of constraints called constraint propagation. These two components are described in the following.2.2.1 Branching and Tree Search
Once the combinatorial problem has been modeled as a GlossaryTerm
CSP
or a GlossaryTermCOP
, GlossaryTermCP
solves it by constructing a solution by a process that exploits a non-deterministic variable assignment, where one value is selected together with one value in its current domain. This phase is also called labeling using (constraint) logic programming terminology, and a solution to the problem is a complete labeling. The process proceeds by recursively checking whether the current labeling can be extended to a consistent solution or, in the negative case, undoing the current assignment.The pseudocode of the procedure, called (chronological) backtracking, is given in Algorithm 62.1. The procedure is at first called with the full set of variables and empty labeling as follows . The procedure performs an implicit form of tree search, where a branch is identified by the selection of one variable (a node of the search tree) and all the possible values for that variable (the edges).
Note that, at each step of the recursive procedure, the choice of the variable and the value to branch on is non-deterministic. Therefore, these choices are susceptible to heuristics to enhance performances.
In addition, there are also other possibilities to define a branching rule. For example, instead of selecting a possible value for the variable selected (i. e., the assignment ), the branching rule could split the domain of a given variable x i in two by selecting a value and adding the constraint on one branch and on the other.
2.2.2 Consistency and Constraint Propagation
The check for solution consistency does not need all the variables to be instantiated, in particular for detecting the unsatisfiability of the GlossaryTerm
CSP
with respect to some constraint. For example, in Algorithm 62.2, the most straightforward implementation of the procedure is reported. The procedure simply checks whether the satisfiability of a given constraint can be ascertained according to the current labeling (i. e., if all of the constraint variables are assigned). However, the reasoning about the current labeling with respect to the constraints of the problem and the domains of the unlabeled variables does not necessarily need all the variables appearing in a constraint to be instantiated. Moreover, the analysis can prune (as a side effect) the domains of the unlabeled variables while preserving the set of solutions , making the exploration of the subtree more effective. This phase is called constraint propagation and is interleaved with the variable assignment. In general, the analysis of each constraint is repeated until a fixed point for the current situation is achieved. In the case that one of the domains becomes empty consistency cannot be achieved and, consequently, the procedure returns a fail.Different notions of consistency can be employed. For example, one of the most common and most studied notions is hyper-arc consistency [26]. For a k-ary constraint C it checks the compatibility of a value v in the domain of one of the variables with the currently possible combinations of values for the remaining variables, pruning v from the domain if no supporting combination is found. The algorithms that maintain hyper-arc consistency have a complexity that is polynomial in the size of the problem (measured in terms of number of variables/constraints and size of domains). Other consistency notions have been introduced in the literature, each having different pruning capabilities and computational complexity, which are, usually, proportionally related to their effectiveness.
One of the major drawbacks of (practical) consistency notions is that they are local in nature, that is, they just look at the current situation (partial labeling and current domains). This means that it would be impossible to detect future inconsistencies due to the interaction of variables. A basic technique, called forward checking, can be used to mitigate this problem. This method exploits a one-step look-aheadwith respect to the current assignment, i. e., it simulates the assignment of pair of variables, instead of a single one, thus evaluating the next level of the tree through a consistency notion. This technique can be generalized to several other
Algorithm 62.1 Backtracking (U, L, , )
1: if then
2: returnL
3: end if
4: for /*Try to label x i with value v*/ do
5:
6:
7: if then
8: returnr /*a consistent assignment has been found for the variables in with respect to */
9: end if
10: end if
11: end for
12: returnfail /*backtrack to the previous variable (no consistent assignment has been found for x i )*/
Algorithm 62.2 Consistent (L, , )
1: for do
2: if all variables in C are labeled in is not satisfied by L then
3: returnfail
4: end if
5: end for
6: returntrue
Algorithm 62.3 BranchAndBound (U, L, , , f, b, L b )
1: if then
2: if then
3:
4: end if
5: else
6: for /*Try to label x i with value v*/ do
7:
8: BranchAndBound(, , , , f, b, L b )
9: end if
10: end for
11: end if
2.2.3 Branch and Bound
In the case of a GlossaryTerm
COP
, the problem is solved by exploring the set in the way above, storing the best value for f found as sketched in Algorithm 62.3. However, a constraint analysis () based on a partial assignment and on the best value already computed, might allow to sensibly prune the search tree. This complete search heuristic is called (with a slight ambiguity with respect to the same concept in operations research) branch and bound.2.3 Systems
A number of practical GlossaryTerm
CP
systems are available. They mostly differ with regards to the targeted programming language and modeling features available. For historical reasons, the first constraint programming systems were built around a Prolog system. For example, SICStus Prolog [27], was one of the first logic programming systems supporting constraint programming which is still developed and released under a commercial license. Another Prolog-based system specifically intended for constraint programming is [28], which differently from SICStus Prolog is open source. Thanks to their longevity, both systems cover many of the modeling features described in the previous sections (such as different type of domains, rich sets of constraints, etc.).Another notable commercial system specifically designed for constraint programming is the ILOG GlossaryTerm
CP
optimizer, now developed by IBM [29]. This system offers modeling capabilities either by means of a dedicated modeling language (called GlossaryTermOPL
[30]) or by means of a callable library accessible from different imperative programming languages such as C/C++, Java, and C#. The modeling capabilities of the system are mostly targeted to scheduling problems, featuring a very rich set of constructs for this kind of problems. Interestingly, this system is currently available at no cost for researchers through the IBM Academic Initiative.Open source alternatives that can be interfaced with the most common programming languages are the C++ libraries of Gecode [31], and the Java libraries of Choco [32]. Both systems are well documented and constantly developed.
A different approach has been taken by other authors, who developed a number of modeling languages for constraint satisfaction and optimization problems that can be interfaced to different type of general purpose GlossaryTerm
CP
solvers. A notable example is MiniZinc [33], which is an expressive modeling language for GlossaryTermCP
. MiniZinc models are translated into a lower level language, called FlatZinc, that can be compiled and executed, for example, by Gecode, or SICStus prolog.Finally, a mixed approach has been taken by the developers of Comet [34]. Comet is a hybrid GlossaryTerm
CP
system featuring a specific programming/modeling language and a dedicated solver. The system has been designed with hybridization in mind and, among other features, it natively supports the integration of metaheuristics (especially in the family of local search methods) with GlossaryTermCP
.3 Integration of Metaheuristics and CP
Differently from Wallace [21], we will review the integration of GlossaryTerm
CP
with metaheuristics from the perspective of metaheuristics, and we classify the approaches on the basis of the type of metaheuristic employed. Moreover, following the categorization of Puchinger and Raidl [18], we are mostly interested in reviewing the integrative combinations of metaheuristics and constraint programming, i. e., those in which constraint programming is embedded as a component of a metaheuristic to solve a subproblem or vice versa.Indeed, the types of collaborative combinations are either straightforward (e. g., collaborative-sequential approaches using GlossaryTerm
CP
as a constructive algorithm for finding a feasible initial solution of a problem) or rather uninvestigated (e. g., parallel or intertwined hybrids of metaheuristics and GlossaryTermCP
).3.1 Local Search and CP
Local search methods [4] are based on an iterative scheme in which the search moves from the current solution to an adjacent one on the basis of the exploration of a neighborhood obtained by perturbing the current solutions.
The hybridization of constraint programming with local search metaheuristics is the most studied one and there is an extensive literature on this subject.
3.1.1 CP Within Local Search
The integration of GlossaryTerm
CP
within local search methods is the most mature form of integration. It dates back to the mid 1990s [35], and two main streams are identifiable to this respect. The first one consists in defining the search of the candidate neighbor (e. g., the best one) as a constrained optimization problem. The neighborhoods induced by these definitions can be quite large, therefore, a variant of this technique is known by the name of large neighborhood search (GlossaryTermLNS
) [36]. The other kind of integration, lately named constraint-based local search (GlossaryTermCBLS
) [34], is based on the idea of expressing local search algorithms by exploiting constraint programming primitives in their control (e. g., for constraint checks during the exploration of the neighborhood) [37]. In fact, the two streams have a non-empty intersection, since the GlossaryTermCP
primitives employed in GlossaryTermCBLS
could be used to explore the neighborhood in a GlossaryTermLNS
fashion. In the following sections we review some of the work in these twoA few surveys on the specific integration between local search and constraint programming exist, for example [38, 39].
3.1.1.1 Large Neighborhood Search
In GlossaryTerm
LNS
[36, 40] an existing solution is not modified just by applying small perturbations to solutions but a large part of the problem is perturbed and searched for improving solutions in a sort of re-optimization approach. This part can be represented by a set of released variables, called fragment, which determines the neighborhood relation . Precisely, given a solution and a set of free variables, thenGiven , the neighborhood exploration is performed through GlossaryTerm
CP
methods (i. e., propagation and tree search).The pseudocode of the general GlossaryTerm
LNS
procedure is shown in Algorithm 62.4. Notice that in the procedure there are a few hotspots that can be customized. Namely, one of the key issues of this technique consists in the criterion for the selection of the set given the current solution , which is denoted by in the algorithm. The most straightforward way to select it is to randomly release a percentage of the problem variables. However, the variables in could also be chosen in a structured way, i. e., by releasing related variables simultaneously. In [41], the authors compare the effectiveness of these two alternative choices in the solution of a job-shop scheduling problem.Also the upper bounds employed for the branch and bound procedure can be subject to a few design alternatives. A possibility, for example, is to set the bound value to , the best solution value found that far, so that the procedure is forced to search at each step only for improving solutions. This alternative can enhance the technique when the propagation on the cost functions is particularly effective in pruning the domains of the released variables. At the opposite extreme, instead, the upper bound could be set to an infinite value so that a solution is searched regardless whether or not it is improving the cost function with respect to the current incumbent.
Moreover, another design point is the solution acceptance criterion, which is implemented by the function. In general, all the classical local search solution acceptance criteria are applicable, obviously in dependence on the neighborhood selection criterion employed. For example, in the case of randomly released variables a Metropolis acceptance criterion could be adequate to implement a sort of simulated annealing.
Finally, the criterion is one of those usually adopted in non-systematic search methods, such as the expiration of a time/iteration budget, either absolute or relative, or the discovery of an optimal solution.
Algorithm 62.4 LargeNeighborhoodSearch (X, , , f)
1:
2:
3: while not do
4:
5:
6: if then
7:
8: if then
9:
10: end if
11: else
12:
13: end if
14:
15: end while
16: return
GlossaryTerm
LNS
has been successfully applied to routing problems [36, 42, 43, 44, 45], nurse rostering [46], university course timetabling [47], protein structure prediction [48, 49], and car sequencing [50].Cipriano etal propose , a modeling language and a hybrid solver specifically designed for GlossaryTerm
LNS
[51, 52, 53]. The system has been tested on a set of benchmark problems, such as the asymmetric traveling salesman problem, minimum energy broadcast, and university course timetabling.The developments of the GlossaryTerm
LNS
technique in the wider perspective of very large neighborhood search (GlossaryTermVLNS
) was recently reviewed by Pisinger and Ropke [54]. Charchrae and Beck [55] also propose a methodological contribution to this area with some design principles for GlossaryTermLNS
.3.1.1.2 Constraint-Based Local Search
The idea of encoding a local search algorithm by means of constraint programming primitives was originally due to Pesant and Gendreau [35, 56], although in their papers they focus on a framework that allows neighborhoods to be expressed by means of GlossaryTerm
CP
primitives. The basic idea is to extend the original GlossaryTermCP
model of the problem with a sort of surrogate model comprising a set of variables and constraints that intentionally describe a neighborhood of the current solution.A pseudocode of GlossaryTerm
CBLS
defined along these lines is reported in Algorithm 62.5. The core of the procedure is at line 5, which determines the neighborhood model on the basis of the current solution. The main components of the neighborhood model are the new set of variables Y and constraints that act as an interface of the neighborhood variables Y with respect to those of the original problem X. For example, the classical swap neighborhood, which perturbs the value of two variables of the problem by exchanging their values, can be modeled by the set , consisting of the variables to exchange, and with the interface constraintsMoreover, an additional component of the neighborhood model is the evaluator of the move impact , which can be usually computed incrementally on the basis of the single move.
It is worth noticing that the use of different modeling viewpoints is common practice in constraint programming. In classical GlossaryTerm
CP
modeling the different viewpoints usually offer a convenient way to express some constraint in a more concise or more efficient manner. The consistency between the viewpoints is maintained through the use of channeling constraints that link the different modelings. Similarly, although with a different purpose, in GlossaryTermCBLS
the linking between the full problem model and the neighborhood model is achieved through interface constraints.Algorithm 62.5 ConstraintBasedLocalSearch (X, , , f)
1:
2:
3: while not do
4:
5:
6:
7: /*neighborhood exploration*/
8: if then
9:
10: if then
11:
12: end if
13: else
14:
15: end if
16:
17: end while
18: return
This stream of research has been revamped thanks to the design of the Comet language [34, 57], the aim of which is specifically to support declarative components inspired from GlossaryTerm
CP
primitives for expressing local search algorithms. An example of such primitives are differentiable invariants [58], which are declarative data structures that support incremental differentiation to effectively evaluate the effect of local moves (i. e., the in Algorithm 62.5). Moreover, Comet support control abstractions [59, 60] specifically designed for local search such as the neighbors construct, which aims at expressing the unions of heterogeneous neighborhoods. Finally, Comet has been extended also to support distributed computing [61].The embedding of local search within a constraint programming environment and the employment of a common programming language makes it possible to automatize the synthesis of GlossaryTerm
CBLS
algorithms from a high-level model expressed in Comet [62, 63]. The synthesizer analyzes the combinatorial structure of the problem, expressed through the variables and the constraints, and combines a set of basic recommendations, which are the basic constituents of the synthesized algorithm.3.1.1.3 Other Integrations
The idea of exploring with local search a space of incomplete solutions (i. e., those where not all variables have been assigned a value) exploiting constraint propagation has been pursued, among others, by Jussien and Lhomme [64] for an open-shop scheduling problem. Constraint propagation employed in the spirit of forward checking and, more in general, look-ahead has been effectively employed, among others, by Schaerf [65] and Prestwich [66], respectively, for scheduling and graph coloring problems.
3.1.2 Local Search Within CP
Moving to the integration of local search within constraint programming, the most common utilization of local search-like techniques consists in limiting the exploration of the tree search only to paths that are ‘‘close’’ to a reference one. An example of such a procedure is limited discrepancy search (GlossaryTerm
LDS
) [67], an incomplete method for tree search in which only neighboring paths of the search tree are explored, where the proximity is defined in terms of different decision points called discrepancies. Only the paths (i. e., complete solutions) with at most k discrepancies are considered, as outlined in Algorithm 62.6.Algorithm 62.6 LimitedDiscrepancySearch (X, , , f, k)
1:
2:
3: for do
4: if then
5:
6: end if
7: end for
8: end for
9: return
Another approach due to Prestwich [68] is called incomplete dynamic backtracking. Differently from GlossaryTerm
LDS
, in this approach proximity is defined among partial solutions, and when backtracking needs to take place it is executed by randomly unassigning (at most) b variables. This way, the method could be intended as a local search on partial solutions. In fact, the method also features other GlossaryTermCP
machinery, such as forward checking, which helps in boosting the search.An alternative possibility is to employ local search in constraint propagation. Local probing [69, 70] is based on the partition of constraints into the set of easy and hard ones. At each choice point in the search tree the set of easy constraints is dealt with a local search metaheuristic (namely simulated annealing), while the hard constraints are considered by classical constraint propagation. This idea generalizes the approach of Zhang and Zhang [71], who first presented such a combination. Another similar approach was taken by Sellmann and Harvey [72], who used local search to propagate redundant constraints.
In [73] the authors discuss the incorporation of the tabu search machinery within GlossaryTerm
CP
tree search. In particular, they look at the memory mechanisms for limiting the size of the tree and the elite candidate list for keeping the most promising choices in order to be evaluated first.3.2 Genetic Algorithms and CP
A genetic algorithm [5] is an iterative metaheuristic in which a population of strings, which represent candidate solutions, evolves toward better solutions in a process that mimics natural evolution. The main components of the evolution process are crossover and mutation operators, which, respectively, combine two parent solutions generating an offspring and mutate a given solution. Another important component is the strategy for the offspring selection, which determines the population at the next iteration of the process.
To the best of our knowledge, one of the first attempts to integrate constraint programming and genetic algorithms is due to Barnier and Brisset [74]. They employ the following genetic representation: given a GlossaryTerm
CSP
with variables , the i-th gene in the chromosomes is related to the variable X i and it stores a subset of the domain D i that is allowed to be searched. Each chromosome is then decoded by GlossaryTermCP
, which searches for the best solution of the sub-GlossaryTermCSP
induced by the restrictions in the domains. The genetic operators used are a mutation operator that changes values on the subdomain of randomly chosen genes and a crossover operator that is based on a recombination of the set-union of the subdomains of each pair of genes. The method was applied to a vehicle routing problem and outperformed both a GlossaryTermCP
and a GlossaryTermGA
solver.A different approach, somewhat similar to local probing, was used in [75] for tackling a production scheduling problem. In this case, the problem variables are split into two sets, defining two coupled subproblems. The first set of variables is dealt with by the genetic algorithm, which determines a partial schedule. This partial solution is then passed to GlossaryTerm
CP
for completing (and optimizing) the assignment of the remaining variables.Finally, GlossaryTerm
CP
has been used as a post-processing phase for optimizing the current population in the spirit of memetic algorithms. In [76] GlossaryTermCP
actually acts as an unfeasibility repairing method for a university course timetabling problem, whereas in [77] the optimization performed by GlossaryTermCP
on a flow-shop scheduling problem is an alternative to the classical local search applied in memetic algorithms. This approach is illustrated in Algorithm 62.7.Algorithm 62.7 A Memetic Algorithm with CP for Flow-Shop scheduling (adapted from [77])
1: generate an initial population of permutations of n jobs (each composed of k tasks whose start time and end time are denoted by and respectively)
2:
3: while not do
4: select p1 and p2 from P by binary tournament
5: /*apply crossover*/
6: if then
7: mutate c under probability p m
8: end if
9: decode to the set of precedence constraints }
10:
11:
12:
13: if then
14: discard c
15: else
16: select r by reverse binary tournament
17: c replaces r in P
18: end if
19:
20: end while
21: return
3.3 ACO and CP
Ant colony optimization [6] is an iterative constructive metaheuristic, inspired by ant foraging behavior. The GlossaryTerm
ACO
construction process is driven by a probabilistic model, based on pheromone trails, which are dynamically adjusted by a learning mechanism.The first attempt to integrate GlossaryTerm
ACO
and GlossaryTermCP
is due to Meyer and Ernst [78], who apply the method for solving a job-shop scheduling problem. The proposed procedure employs GlossaryTermACO
to learn the variable and value ordering used by GlossaryTermCP
for branching in the tree search. The solutions found by the GlossaryTermCP
procedure are fed back to the GlossaryTermACO
in order to update its probabilistic model. In this approach, GlossaryTermACO
can be conceived as a master online-learning branching heuristic aimed at enhancing the performance of a slave GlossaryTermCP
solver.A slightly different approach was taken by Khichane etal [79, 80]. Their hybrid algorithm works in two phases. At first, GlossaryTerm
CP
is employed to sample the space of feasible solutions, and the information collected is processed by the GlossaryTermACO
procedure for updating the pheromone trails according to the solutions found by GlossaryTermCP
. In the second phase, the learned pheromone information is employed as the value ordering used for GlossaryTermCP
branching. This approach, differently from the previous one, uses the learning capabilities of GlossaryTermACO
in an offline-learning fashion.More standard approaches in which GlossaryTerm
CP
is used to keep track of the feasibility of the solution constructed by GlossaryTermACO
and to reduce the domains through constraint propagation have been used by a number of authors. Khichane etal apply this idea to job-shop scheduling [78] and car sequencing [79, 81]. Their general idea is outlined in Algorithm 62.8, where each ant maintains a partial assignment of values to variables. The choice to extend the partial assignment with a new variable/value pair is driven by the pheromone trails and the heuristic factors in lines 7–8 through a standard probabilistic selection rule. Propagation is employed at line 10 to prune the possible values for the variables not included in the currentAnother work along this line is due to Benedettini etal [82], who integrate a constraint propagation phase for Boolean constraints to boost a GlossaryTerm
ACO
approach for a bioinformatics problem (namely, haplotype inference). Finally, in the same spirit of the previous idea, Crawford etal [83, 84] employ a look-ahead technique within GlossaryTermACO
and apply the method to solve set covering and set partitioning problems.Algorithm 62.8 Ant Constraint Programming (adapted from [79])
1: initialize all pheromone trails to
2:
3: repeat
4: for do
5:
6: repeat
7: select a variable so that according to the pheromone trail
8: add to
9:
10: until orFailure
11: update pheromone trails using
12: end for
13: until or
4 Conclusions
In this chapter we have reviewed the basic concepts of constraint programming and its integration with metaheuristics. Our main contribution is the attempt to give a comprehensive overview of such integrations from the viewpoint of metaheuristics.
We believe that the reason why these integrations are very promising resides in the complementary merits of the two approaches. Indeed, on the one hand, metaheuristics are, in general, more suitable to deal with optimization problems, but their treatment of constraints can be very awkward, especially in the case of tightly constrained problems. On the other hand, constraint programming is specifically designed for finding feasible solutions, but it is not particularly effective for handling optimization. Consequently, a hybrid algorithm that uses GlossaryTerm
CP
for finding feasible solutions and metaheuristics to search among them has good chances to outperform its single components.Despite the important steps made in this field during the last decade, there are still promising research opportunities, especially in order to investigate topics such as collaborative hybridization of GlossaryTerm
CP
and metaheuristics and validate existing integration approaches in the yet uninvestigated area of multiobjective optimization. We believe that further research should devote more attention to these aspects.Abbreviations
- ACO:
-
ant colony optimization
- AI:
-
artificial intelligence
- CBLS:
-
constraint-based local search
- COP:
-
constrained optimization problem
- CP:
-
constraint programming
- CSP:
-
constraint satisfaction problem
- GA:
-
genetic algorithm
- LDS:
-
limited discrepancy search
- LNS:
-
large neighborhood search
- LP:
-
logic programming
- OPL:
-
open programming language
- OR:
-
operations research
- VLNS:
-
very large neighborhood search
References
K.R. Apt: Principles of Constraint Programming (Cambridge Univ. Press, Cambridge 2003)
F. Rossi, P. van Beek, T. Walsh: Handbook of Constraint Programming, Foundations of Artificial Intelligence (Elsevier Science, Amsterdam 2006)
M. Dorigo, M. Birattari, T. Stützle: Metaheuristic. In: Encyclopedia of Machine Learning, ed. by C. Sammut, G.I. Webb (Springer, Berlin, Heidelberg 2010) p. 662
H.H. Hoos, T. Stützle: Stochastic Local Search: Foundations & Applications (Morgan Kaufmann, San Francisco 2004)
C. Sammut: Genetic and evolutionary algorithms. In: Encyclopedia of Machine Learning, ed. by C. Sammut, G.I. Webb (Springer, Berlin, Heidelberg 2010) pp. 456–457
M. Dorigo, M. Birattari: Ant colony optimization. In: Encyclopedia of Machine Learning, ed. by C. Sammut, G.I. Webb (Springer, Berlin, Heidelberg 2010) pp. 36–39
T. Yunes: Success stories in integrated optimization (2005) http://moya.bus.miami.edu/~tallys/integrated.php
W. J. van Hoeve: CPAIOR conference series (2010) available online from http://www.andrew.cmu.edu/user/vanhoeve/cpaior/
P. van Hentenryck, M. Milano (Eds.): Hybrid Optimization: The Ten Years of CPAIOR, Springer Optimization and Its Applications, Vol. 45 (Springer, Berlin 2011)
C. Blum, A. Roli, M. Sampels (Eds.): Hybrid Metaheuristics, First International Workshop (HM 2004), Valencia (2004)
M.J. Blesa, C. Blum, A. Roli, M. Sampels (Eds.): Hybrid Metaheuristics: Second International Workshop (HM 2005), Lecture Notes in Computer Science, Vol. 3636 (Springer, Berlin, Heidelberg 2005)
F. Almeida, M.J. Blesa Aguilera, C. Blum, J.M. Moreno-Vega, M. Pérez, A. Roli, M. Sampels (Eds.): Hybrid Metaheuristics: Third International Workshop, Lecture Notes in Computer Science, Vol. 4030 (Springer, Berlin, Heidelberg 2006)
T. Bartz-Beielstein, M.J. Blesa Aguilera, C. Blum, B. Naujoks, A. Roli, G. Rudolph, M. Sampels (Eds.): Hybrid Metaheuristics: 4th International Workshop (HM 2007), Lecture Notes in Computer Science, Vol. 4771 (Springer, Berlin, Heidelberg 2007)
M.J. Blesa, C. Blum, C. Cotta, A.J. Fernández, J.E. Gallardo, A. Roli, M. Sampels (Eds.): Hybrid Metaheuristics: 5th International Workshop (HM 2008), Lecture Notes in Computer Science, Vol. 5296 (Springer, Berlin, Heidelberg 2008)
M.J. Blesa, C. Blum, L. Di Gaspero, A. Roli, M. Sampels, A. Schaerf (Eds.): Hybrid Metaheuristics: 6th International Workshop (HM 2009), Lecture Notes in Computer Science, Vol. 5818 (Springer, Berlin, Heidelberg 2009)
M.J. Blesa, C. Blum, G.R. Raidl, A. Roli, M. Sampels (Eds.): Hybrid Metaheuristics: 7th International Workshop (HM 2010), Lecture Notes in Computer Science, Vol. 6373 (Springer, Berlin, Heidelberg 2010)
I. Dumitrescu, T. Stützle: Combinations of local search and exact algorithms, Lect. Notes Comput. Sci. 2611, 211–223 (2003)
J. Puchinger, G. Raidl: Combining metaheuristics and exact algorithms in combinatorial optimization: A survey and classification, Lect. Notes Comput. Sci. 3562, 113–124 (2005)
S. Fernandes, H. Ramalhinho Dias Lourenço: Hybrids combining local search heuristics with exact algorithms, V Congr. Esp. Metaheurísticas, Algoritm. Evol. Bioinspirados (MAEB2007), Tenerife, ed. by F. Rodriguez, B. Mélian, J.A. Moreno, J.M. Moreno (2007) pp. 269–274
L. Jourdan, M. Basseur, E.-G. Talbi: Hybridizing exact methods and metaheuristics: A taxonomy, Eur. J. Oper. Res. 199(3), 620–629 (2009)
M. Wallace: Hybrid algorithms in constraint programming, Lect. Notes Comput. Sci. 4651, 1–32 (2007)
F. Azevedo, P. Barahona, F. Fages, F. Rossi (Eds.): Recent Advances in Constraints: 11th Annual ERCIM International Workshop on Constraint Solving and Contraint Logic Programming (CSCLP 2006), Lecture Notes in Computer Science, Vol. 4651 (Springer, Berlin, Heidelberg 2007)
C. Blum, J. Puchinger, G.R. Raidl, A. Roli: Hybrid metaheuristics in combinatorial optimization: A survey, Appl. Soft Comput. 11(6), 4135–4151 (2011)
N. Beldiceanu, H. Simonis: Global constraint catalog (2011), available online from http://www.emn.fr/z-info/sdemasse/gccat/
P. Meseguer, F. Rossi, T. Schiex: Soft constraints. In: Handbook of Constraint Programming, Foundations of Artificial Intelligence, ed. by F. Rossi, P. van Beek, T. Walsh (Elsevier, Amsterdam 2006)
A.K. Mackworth: Consistency in networks of relations, Artif. Intell. 8(1), 99–118 (1977)
SICStus prolog homepage, available online from http://www.sics.se/isl/sicstuswww/site/index.html
K.R. Apt, M. Wallace: Constraint Logic Programming Using Eclipse (Cambridge Univ. Press, Cambridge 2007)
ILOG CP optimizer, available online from http://www-01.ibm.com/software/integration/optimization/cplex-cp-optimizer/
P. van Hentenryck: The OPL Optimization Programming Language (MIT Press, Cambridge 1999)
Gecode Team: Gecode: Generic constraint development environment (2006), available online from http://www.gecode.org
CHOCO Team: Choco: An open source java constraint programming library, Res. Rep. 10-02-INFO (Ecole des Mines de Nantes, Nantes 2010)
N. Nethercote, P.J. Stuckey, R. Becket, S. Brand, G.J. Duck, G. Tack: Minizinc: Towards a standard CP modelling language, Lect. Notes Comput. Sci. 4741, 529–543 (2007)
P.V. Hentenryck, L. Michel: Constraint-Based Local Search (MIT Press, Cambridge 2005)
G. Pesant, M. Gendreau: A view of local search in constraint programming, Lect. Notes Comput. Sci. 1118, 353–366 (1996)
P. Shaw: Using constraint programming and local search methods to solve vehicle routing problems, Lect. Notes Comput. Sci. 1520, 417–431 (1998)
B.D. Backer, V. Furnon, P. Shaw, P. Kilby, P. Prosser: Solving vehicle routing problems using constraint programming and metaheuristics, J. Heuristics 6(4), 501–523 (2000)
F. Focacci, F. Laburthe, A. Lodi: Local search and constraint programming. In: Handbook of Metaheuristics, ed. by F. Glover, G. Kochenberger (Kluwer, Boston 2003) pp. 369–403
P. Shaw: Constraint programming and local search hybrids. In: Hybrid Optimization, Springer Optimization and Its Applications, Vol. 45, ed. by P. van Hentenryck, M. Milano (Springer, Berlin, Heidelberg 2011) pp. 271–303
L. Perron, P. Shaw, V. Furnon: Propagation guided large neighborhood search, Lect. Notes Comput. Sci. 3258, 468–481 (2004)
E. Danna, L. Perron: Structured vs. unstructured large neighborhood search: A case study on job-shop scheduling problems with earliness and tardiness costs, Lect. Notes Comput. Sci. 2833, 817–821 (2003)
Y. Caseau, F. Laburthe, G. Silverstein: A meta-heuristic factory for vehicle routing problems, Lect. Notes Comput. Sci. 1713, 144–158 (1999)
L.M. Rousseau, M. Gendreau, G. Pesant: Using constraint-based operators to solve the vehicle routing problem with time windows, J. Heuristics 8(1), 43–58 (2002)
S. Jain, P. van Hentenryck: Large neighborhood search for dial-a-ride problems, Lect. Notes Comput. Sci. 6876, 400–413 (2011)
J.H.-M. Lee (Ed.): Principles and Practice of Constraint Programming – CP 2011 – 17th International Conference, CP 2011, Perugia, Italy, September 12-16, 2011, Proceedings, Lecture Notes in Computer Science, Vol. 6876 (Springer, Berlin, Heidelberg 2011)
R. Cipriano, L. Di Gaspero, A. Dovier: Hybrid approaches for rostering: A case study in the integration of constraint programming and local search, Lect. Notes Comput. Sci. 4030, 110–123 (2006)
H. Cambazard, E. Hebrard, B. O'Sullivan, A. Papadopoulos: Local search and constraint programming for the post enrolment-based course timetabling problem, Ann. Oper. Res. 194(1), 111–135 (2012)
I. Dotu, M. Cebrián, P. van Hentenryck, P. Clote: Protein structure prediction with large neighborhood constraint programming search. In: Principles and Practice of Constraint Programming, ed. by I. Dotu, M. Cebrián, P. van Hentenryck, P. Clote (Springer, Berlin, Heidelberg 2008) pp. 82–96
R. Cipriano, A. Dal Palù, A. Dovier: A hybrid approach mixing local search and constraint programming applied to the protein structure prediction problem, Proc. Workshop Constraint Based Methods Bioinform. (WCB 2008), Paris (2008)
L. Perron, P. Shaw: Combining forces to solve the car sequencing problem, Lect. Notes Comput. Sci. 3011, 225–239 (2004)
R. Cipriano, L. Di Gaspero, A. Dovier: A hybrid solver for Large Neighborhood Search: Mixing Gecode and EasyLocal++, Lect. Notes Comput. Sci. 5818, 141–155 (2009)
R. Cipriano: On the hybridization of constraint programming and local search techniques: Models and software tools, Lect. Notes Comput. Sci. 5366, 803–804 (2008)
R. Cipriano: On the Hybridization of Constraint Programming and Local Search Techniques: Models and Software Tools, Ph.D. Thesis (PhD School in Computer Science – University of Udine, Udine 2011)
D. Pisinger, S. Ropke: Large neighborhood search. In: Handbook of Metaheuristics, ed. by M. Gendreau, J.-Y. Potvin (Springer, Berlin, Heidelberg 2010) pp. 399–420, 2nd edn., Chap. 13
T. Carchrae, J.C. Beck: Principles for the design of large neighborhood search, J. Math. Model, Algorithms 8(3), 245–270 (2009)
G. Pesant, M. Gendreau: A constraint programming framework for local search methods, J. Heuristics 5(3), 255–279 (1999)
L. Michel, P. van Hentenryck: A constraint-based architecture for local search, Proc. 17th ACM SIGPLAN Object-oriented Program. Syst. Lang. Appl. (OOPSLA '02), New York (2002) pp. 83–100
P. van Hentenryck, L. Michel: Differentiable invariants, Lect. Notes Comput. Sci. 4204, 604–619 (2006)
P. van Hentenryck, L. Michel: Control abstractions for local search, J. Constraints 10(2), 137–157 (2005)
P. van Hentenryck, L. Michel: Nondeterministic control for hybrid search, Lect. Notes Comput. Sci. 3524, 863–864 (2005)
L. Michel, A. See, P. van Hentenryck: Distributed constraint-based local search, Lect. Notes Comput. Sci. 4204, 344–358 (2006)
P. van Hentenryck, L. Michel: Synthesis of constraint-based local search algorithms from high-level models, 22nd Natl. Conf. Artif. Intell. AAAI, Vol. 1 (2007) pp. 273–278
S.A. Mohamed Elsayed, L. Michel: Synthesis of search algorithms from high-level cp models, Lect. Notes Comput. Sci. 6876, 256–270 (2011)
N. Jussien, O. Lhomme: Local search with constraint propagation and conflict-based heuristic, Artif. Intell. 139(1), 21–45 (2002)
A. Schaerf: Combining local search and look-ahead for scheduling and constraint satisfaction problems, 15th Int. Joint Conf. Artif. Intell. (IJCAI-97), Nagoya (1997) pp. 1254–1259
S. Prestwich: Coloration neighbourhood search with forward checking, Ann. Math. Artif. Intell. 34, 327–340 (2002)
W.D. Harvey, M.L. Ginsberg: Limited discrepancy search, 14th Int. Joint Conf. Artif. Intell., Montreal (1995) pp. 607–613
S. Prestwich: Combining the scalability of local search with the pruning techniques of systematic search, Ann. Oper. Res. 115(1), 51–72 (2002)
O. Kamarainen, H. Sakkout: Local probing applied to scheduling, Lect. Notes Comput. Sci. 2470, 81–103 (2006)
O. Kamarainen, H. El Sakkout: Local probing applied to network routing, Lect. Notes Comput. Sci. 3011, 173–189 (2004)
J. Zhang, H. Zhang: Combining local search and backtracking techniques for constraint satisfaction, Proc. 13th Natl. Conf. Artif. Intell. (AAAI96) (1996) pp. 369–374
M. Sellmann, W. Harvey: Heuristic constraint propagation, Lect. Notes Comput. Sci. 2470, 319–325 (2006)
M. Dell'Amico, A. Lodi: On the integration of metaheuristic stratgies in constraint programming. In: Metaheuristic Optimization Via Memory and Evolution: Tabu Search and Scatter Search, Operations Research/Computer Science Interfaces, Vol. 30, ed. by C. Rego, B. Alidaee (Kluwer, Boston 2005) pp. 357–371, Chap. 16
N. Barnier, P. Brisset: Combine & conquer: Genetic algorithm and CP for optimization, Lect. Notes Comput. Sci. 1520, 463–463 (1998)
H. Hu, W.-T. Chan: A hybrid GA-CP approach for production scheduling, 5th Int. Conf. Nat. Comput. (2009) pp. 86–91
S. Deris, S. Omatu, H. Ohta, P. Saad: Incorporating constraint propagation in genetic algorithm for university timetable planning, Eng. Appl. Artif. Intell. 12(3), 241–253 (1999)
A. Jouglet, C. Oguz, M. Sevaux: Hybrid flow-shop: a memetic algorithm using constraint-based scheduling for efficient search, J. Math. Model Algorithms 8(3), 271–292 (2009)
B. Meyer, A. Ernst: Integrating ACO and constraint propagation, Lect. Notes Comput. Sci. 3172, 166–177 (2004)
M. Khichane, P. Albert, C. Solnon: CP with ACO. In: Integration of AI and OR Techniques in Constraint Programming for Combinatorial Optimization Problems, ed. by L. Perron, M.A. Trick (Springer, Berlin, Heidelberg 2008) pp. 328–332
M. Khichane, P. Albert, C. Solnon: Strong combination of ant colony optimization with constraint programming optimization, Lect. Notes Comput. Sci. 6140, 232–245 (2010)
M. Khichane, P. Albert, C. Solnon: Integration of ACO in a constraint programming language, Lect. Notes Comput. Sci. 5217, 84–95 (2008)
S. Benedettini, A. Roli, L. Di Gaspero: Two-level ACO for haplotype inference under pure parsimony, Lect. Notes Comput. Sci 5217, 179–190 (2008)
B. Crawford, C. Castro: Integrating lookahead and post processing procedures with ACO for solving set partitioning and covering problems, Lect. Notes Comput. Sci. 4029, 1082–1090 (2006)
B. Crawford, C. Castro, E. Monfroy: Constraint programming can help ants solving highly constrained combinatorial problems, ICSOFT 2008 – Proc. 3rd Int. Conf. Software Data Technol., INSTICC, Porto (2008) pp. 380–383
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2015 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Di Gaspero, L. (2015). Integration of Metaheuristics and Constraint Programming. In: Kacprzyk, J., Pedrycz, W. (eds) Springer Handbook of Computational Intelligence. Springer Handbooks. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-43505-2_62
Download citation
DOI: https://doi.org/10.1007/978-3-662-43505-2_62
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-662-43504-5
Online ISBN: 978-3-662-43505-2
eBook Packages: EngineeringEngineering (R0)