Expert Systems with Applications 39 (2012) 5739–5747
Contents lists available at SciVerse ScienceDirect
Expert Systems with Applications journal homepage: www.elsevier.com/locate/eswa
Sliced Neighborhood Search q Fabio Parisini ⇑, Michela Milano D.E.I.S., University of Bologna, Italy
a r t i c l e
i n f o
Keywords: Combinatorial optimization Constraint programming Metaheuristics Sliced Neighborhood Search Large Neighborhood Search
a b s t r a c t The integration of tree search and metaheuristic techniques for the solution of combinatorial optimization problems is a research area widely explored in the last decade. We propose a search strategy called Sliced Neighborhood Search, SNS, that iteratively explores slices of large neighborhoods of an incumbent solution by performing constraint programming tree search (along with constraint propagation). SNS encloses concepts from metaheuristic techniques. SNS can be used both as a stand alone search strategy, and embedded in other strategies as intensification and diversification mechanism. We provide an extensive experimental evaluation of SNS on hard instances of the Asymmetric Traveling Salesman Problem with Time Windows. We show the effectiveness of SNS as a stand alone strategy when compared to Limited Discrepancy Search and of SNS when included in a heuristic framework such as the constraint programming based local branching. Ó 2011 Elsevier Ltd. All rights reserved.
1. Introduction Combinatorial optimization is a topic in theoretical computer science and applied mathematics that consists of finding the least-cost solution to a mathematical problem in which each solution is associated with a numerical cost.1 Combinatorial optimization (CO) problems arise in many application areas including vehicle routing, logistics, packing and cutting stock application, resource allocation and scheduling to name a few. CO problems can be faced by complete and incomplete methods. Complete strategies find the optimal solution and prove optimality at the cost of a high computational effort (see Nemhauser & Wolsey, 1988), while heuristic (incomplete) approaches tend to find good solutions without any optimality guarantee. In this paper we consider large scale CO problems where complete search is not computationally feasible. Two aspects coexist within CO problems, namely the feasibility and the optimality component. We acknowledge relevance to the feasibility component of a CO problem when the constraints and the size of the problem are such that it is computationally expensive to find any feasible solution, i.e. any solution which complies with all the problem constraints. The optimality component, instead, becomes dominant when it is computationally easy in practice to
q
A shorter version of this paper appeared as (Parisini, Lombardi, & Milano, 2010).
⇑ Corresponding author. Tel.: +39 051 2093321.
E-mail addresses:
[email protected] (F. Parisini),
[email protected] (M. Milano). 1 http://en.wikipedia.org/wiki/Combinatorial_optimization. 0957-4174/$ - see front matter Ó 2011 Elsevier Ltd. All rights reserved. doi:10.1016/j.eswa.2011.11.096
find a feasible solution, whilst it is very difficult to find the optimal one. Constraint programming (CP) is particularly effective when dealing with the feasibility component of a CO problem. CP is a powerful programming paradigm for modeling and solving NPhard problems; it addresses the solution of optimization problems by means of tree search techniques guided by a proper variable and value selection heuristic. During search constraint propagation removes provably infeasible assignments thus limiting the size of the search tree to be explored. On the other hand, CP may present some limitations when dealing with a strong optimality component. Metaheuristic methods instead are used in the literature to solve large scale optimization problems in an incomplete way, i.e. by finding feasible sub-optimal solutions. Many metaheuristic techniques have been developed in the literature, showing that it is possible to obtain good quality solutions for problems which cannot be solved to optimality. Each metaheuristic approach defines its own strategies to address the solution of large optimization problems. Some common concepts (see (Blum, Aguilera, Roli, & Sampels, 2008) for a complete survey) can be identified: intensification and diversification techniques, neighborhood exploration methods, definition of local search moves specific for the problem at hand, usage of a set of elite solutions, adaptation of the search strategy to the evolution of the search process itself, and so on. Metaheuristic techniques can thus effectively deal with CO problems where the optimality component is dominant, whilst they encounter major difficulties when the feasibility component grows in importance. As CP and metaheuristics show complementary strengths and weaknesses, hybrid search techniques can be designed to exploit
5740
F. Parisini, M. Milano / Expert Systems with Applications 39 (2012) 5739–5747
the advantages of both approaches. The aim of this paper is to integrate metaheuristic concepts, such as neighborhood exploration, intensification, diversification, restarting, within a CP-based tree search. We present a search strategy called Sliced Neighborhood Search (SNS), inspired from Large Neighborhood Search (LNS) (Shaw, 1998) and Limited Discrepancy Search (LDS) (Harvey & Ginsberg, 1995). SNS iteratively explores randomly selected slices of the search space defined as the large neighborhood of an incumbent solution. SNS can be used as either as a stand alone search strategy or as an intensification or a diversification method embedded within a metaheuristic framework. We show the effectiveness of SNS in both cases by performing experimental tests on large Asymmetric Traveling Salesman Problem with Time Windows (ATSPTW) instances. We compare SNS with LDS showing that SNS can reach larger neighborhoods and improve solutions quicker. Also, we integrate SNS in a CP-based local branching framework (Kiziltan, Lodi, Milano, & Parisini, 2007) as intensification and diversification strategy, achieving promising improvements in terms of solution quality. 2. Background 2.1. Constraint programming Constraint programming (CP) is a programming paradigm designed to model and solve constraint satisfaction problems. A CP model is defined on a set of variables x = [x1, . . . , xn], each variable having a finite domain Dðxi Þ of values, and a set of constraints specifying allowed combinations of values for subsets of variables. A solution x ¼ ½ x1 ; . . . ; xn is an assignment of x complying with all the constraints, i.e. a feasible assignment. The CP solution process interleaves propagation and search: it explores the space of partial assignments using a backtrack tree search; at each step filtering algorithms local to each constraint remove provably infeasible variable assignments thus reducing the size of the search tree to explore. With no loss of generality, we deal with minimization problems where a cost ci,j is associated to each variable value assignment xi = j and we want to minimize P Cost ¼ i2N ci;xi where N = {1, . . . , n}. The optimization process works by repeatedly obtaining improving feasible solutions; when an incumbent solution x is found a so-called upper bound constraint, of the kind Cost < Costx , is added to the model, stating that further solutions have to be better than x in terms of cost. This constraint, however, performs a rather limited form of filtering on the problem decision variables. Therefore, CO problems with a strong optimality component are poorly faced with CP. To alleviate this problem, when dealing with CO problems, an additional pruning mechanism called cost-based filtering (Focacci, Lodi, & Milano, 2002b) can be adopted; it is a general technique which allows the removal of values which cannot be a part of an optimal solution. Gradient functions such as reduced-costs, together with lower bound computations, are used to provide a conservative estimate of the cost to pay for having a particular variable-value assignment in the solution; assignments which lead to costs exceeding the given upper bound are pruned from the domains. 2.2. Related work The integration of CP-based tree search methods and heuristic local search techniques for solving large scale CO problems has been longly advocated in the literature. We will briefly outline the research activity which has been done in this field; see (Shaw, 2010) for a complete survey.
Local search and constraint programming offer two different and contrasting ways of solving CO problems. Local search works on a complete assignment of values to variables, and navigates through the search space (landscape) by making ‘‘moves’’: each move is selected from a set of available moves and modifies part of the complete assignment. In this context, the neighborhood is defined as the set of possible moves from the current assignment. Constraint programming, instead, builds up a partial solution constructively by making assignments to variables (possibly guided by a variable and value selection heuristic). Filtering algorithms are used to reduce the set of possible values for variables not yet in the partial solution, performing the so-called constraint propagation. An important group of contributions is related to the use of local search methods on a CP-based model; the min-conflicts algorithm, which has been described in Minton, Philips, Johnston, and Laird (1993), is a prominent example of this research area. The main idea in min-conflicts is that constraints may be violated during the search process, and that violation is measured and treated as an objective function in the classical sense. At each step the minconflicts algorithm takes a local decision which minimizes the total number of conflicts. Although min-conflicts has shown its effectiveness and it has been successfully used in practice, the conflict minimization process is prone to fall in local minima. Two different approaches have been developed to avoid this problem: the break-out method (Morris, 1993) and GENET (Davenport, Tsang, Wang, & Zhu, 1994), which is in turn based on the Guarded Discrete Stochastic (GDS) network (Adorf & Johnston, 1990). They both work by adjusting the way constraint violations are counted; they assign a specific weight to the cost of each constraint and the weight can be modified during the search by learning mechanisms. Experimental results show that the overall performance significantly improves over the min-conflicts hill-climbing algorithm. Stemming from the results of min-conflicts, many languages have been developed integrating elements from local search and CP-like models. Localizer (Michel & Hentenryck, 1997) represents the first attempt of creating a language for the specification of local search algorithms; it defines a novel modeling language sharing concepts with constraint programming, together with many important differences. Expressions and invariants are the basic building blocks of the language; the notion of finite domain variable, which is central in CP, is not directly defined in Localizer. More recently, the Comet system (Hentenryck & Michel, 2005) has been developed, based on the experience arising from Localizer. Comet brings a full-function imperative programming language, as opposed to Localizer, which is mostly declarative; nonetheless, it creates the model of the problem in a declarative style. The notion of constraints takes the place of the invariants; this is due to the fact that Comet is mainly oriented to deal with constraint violations. It does not require that the solutions comply with all the constraints, thus allowing the assignment of a violation state to each of them. It is easy to implement many local search methods in Comet; the min-conflicts algorithm itself can be written in few lines of code. Another example of CP-based modeling and solving environments is given by the IBM ILOG CP Optimizer. It offers a powerful CP-based framework which integrates different heuristic techniques for the solution of CO problems. In Khichane, Albert, and Solnon (2010) it is shown how to simply implement the ant colony optimization (Dorigo & Sttzle, 2004) metaheuristic method within the framework. An important area where CP and local search strategies meet is when a local search method exploits CP for exploring and evaluating the neighborhood of the incumbent solution. The main difference between these approaches and the previously presented ones lies in the fact that here we have complete assignments of
5741
F. Parisini, M. Milano / Expert Systems with Applications 39 (2012) 5739–5747
values to domain variables, satisfying all the problem constraints; these methods work by moving from a feasible solution to another. A local search framework for the solution of CO problems based on CP-modeling has been introduced in Pesant and Gendreau (1999). It defines a standard CP model of the problem, it stores the incumbent solution x and explores its neighborhood. The neighborhood is defined by coupling a neighborhood constraint model with the standard model, such that the search is limited to all and only the feasible solutions which are in the neighborhood of x. The neighborhood constraint model, identified with the socalled interface constraints, exploits the declarative and filtering power of CP, and it is bound to the representation of feasibles solutions, i.e. assignments. This method shows to be flexible and efficient, except for the fact that it loses much of its effectiveness when dealing with highly solution populated neighborhoods. This approach shares many elements with our work; the main difference lies in the way neighborhoods are defined and explored and how escaping from local minima is performed. Other related approaches are search methods like Large Neighborhood Search (LNS) (Shaw, 1998) which iteratively relaxes a fragment of the current solution x and then re-optimizes it using CP aided tree search. At a high level it is normally a hill climber which is executed until some time limit is exhausted. Key components of LNS are the methods used to choose the fragments to relax and the methods to re-optimize them. The main difference with our approach lies in the fact that these methods are problem dependent, whilst we propose a problem-independent search strategy. In this paper, we propose the SNS problem independent search strategy, inheriting concepts from LNS and metaheuristics in general. As we compare SNS with Limited Discrepancy Search and encapsulate SNS into the CP-based local branching, the next two subsections are devoted to introduce concepts related to these two search strategies. 2.3. Limited Discrepancy Search Limited Discrepancy Search (LDS) (Harvey & Ginsberg, 1995) is a tree search strategy that improves over depth first search, when a good heuristic is available. Successor ordering heuristics are commonly used as guidance when performing tree search to solve CO problems. When the heuristic guides the search to a failure state, backtracking is performed up to an open decision point, where the choice performed by the heuristic is reverted. We call this alternate choice a ‘‘wrong turn’’. LDS addresses the problem of limiting the number of ‘‘wrong turns’’ (i.e. discrepancies) along the way; it explores portions of the search space at increasing discrepancy values w.r.t. a given successor ordering heuristic. We will focus on a variation of LDS, Improved Limited Discrepancy Search (ILDS) (Korf, 1996), which first explores the portions of the search tree which can be reached by making exactly one choice different from the heuristics, then allows exactly two differences (discrepancies), and so on, till a termination condition is reached or the desired solution has been found. These regions at increasing discrepancy k are the so-called k-distance neighborhoods of the solution proposed by the heuristic. In the following we will use LDS to refer to ILDS. We deal with CO problems for which we have an incumbent solution x having cost Costx . LDS tries to reduce the cost of the incumbent solution by exploring the k-distance neighborhoods of x via tree search; in this setting we count a discrepancy each time a variable is assigned to a value which is different from the value the same variable takes in the incumbent. An eminent drawback of LDS is that for large problems, exploring neighborhoods at high discrepancy (high values of k) is very time consuming. In those settings LDS does not manage to explore high discrepancy values in a reasonable time, limiting the search space to be very close to the
incumbent solution; in fact, if the incumbent solution has a large optimality gap, it is very likely that small neighborhoods contain low quality solutions. Let us introduce some notions on discrepancy: Definition 1 (Discrepancy). The discrepancy between two assignments x and x, Dðx; xÞ, can be computed as
Dðx; xÞ ¼
n X
di
where di ¼
i¼1
1 if xi – xi ; 0
otherwise:
ð1Þ
Stemming from the discrepancy definition we introduce the concept of k-distance neighborhood of a given solution x. Definition 2 (Neighborhood). A k-distance neighborhood of a given reference solution x is defined by the set of solutions satisfying all the original problem constraints P plus a discrepancy constraint enforcing the k-distance relation
N ðx; kÞ ¼ fxjP [ Dðx; xÞ ¼ kg Indeed, we can consider larger neighborhoods that explore not just one distance k, but solutions up to a distance k or solutions with at least distance k. For this purpose, two bounds can be introduced. The at-most k discrepancy bound is designed to allow the neighborhood exploration of an incumbent solution x when looking for a solution x; it ensures that at least n k variables, where n is the number of problem variables, take the same value as in x. This means that if E is the set of variables taking the same value as in x, so that we have E ¼ fxi jxi 2 x ^ xi ¼ xi g, it must be true that jEj P n k. Similarly, if we define the set of variables changing their value from the incumbent solution as D ¼ fxi jxi 2 x ^xi – xi g, the at-least k discrepancy bound ensures that jDj P k. Both bounds can be set at the same time and different values of k can be used for each bound. LDS can be read in terms of at-most k and at-least k discrepancy bounds. LDS, in fact, iteratively explores in a complete fashion a search space at increasing discrepancy from the incumbent solution x. When a k-distance neighborhood is explored, this is equivalent to enforce at-most and at-least discrepancy bounds to the same value k. 2.4. Local branching Local branching is a successful search method proposed for 0–1 MIP (Fischetti & Lodi, 2003) which is in the current implementation of IBM-Cplex.2 The idea is that, given an incumbent solution to an optimization problem, its neighborhood is searched using tree search with the hope of improving the solution quality. After the optimal solution in the neighborhood has been found, the incumbent solution is updated to this new solution and the search continues from it. The basic machinery of the framework is depicted in Fig. 1. Assume we have a tree search method for solving an optimization problem P whose constrained variables are x, an incumbent solution x and discrepancy Dðx; xÞ computed as in Definition 3. For a given positive integer parameter k, the neighborhood of x; N ð x; kÞ, is defined as the set of feasible solutions of P satisfying the additional local branching constraint Dðx; xÞ 6 k. More precisely, the solution space associated with the current branching node is partitioned by means of the disjunction Dðx; xÞ 6 k _ Dðx; xÞ P k þ 1. In this way, the whole search space is divided 2 Note that the way in which local branching is implemented in Cplex differs from the one described in the following, see (Danna, Rothberg, & Pape, 2004) for details.
5742
F. Parisini, M. Milano / Expert Systems with Applications 39 (2012) 5739–5747
n 5
4
3
2 1
Fig. 2. Basic LDS space exploration scheme.
Fig. 1. The basic local branching framework.
into two, and thus exploring each part exhaustively would guarantee completeness. The neighborhood structure is general-purpose in the sense that it is independent of the problem being solved. The local branching framework is not specific to MIP; an integration of local branching in CP has been done in (Kiziltan et al., 2007, Kiziltan, Lodi, Milano, & Parisini, submitted for publication). This integration, which defines the so-called CP-based local branching, is not simply a matter of implementation, but requires a number of significant extensions. The main extensions include the definition of an efficient and incremental bound computation for the neighborhood and a cost-based filtering algorithm for the local branching constraint (Lodi, Milano, & Rousseau, 2003). We will use the CP-based local branching as a general heuristic search method to test the effectiveness of Sliced Neighborhood Search within an existing framework. We will show how the adoption of SNS as intensification and diversification mechanism can substantially improve over existing CP-based local branching. 3. Sliced Neighborhood Search We propose a novel tree search strategy called Sliced Neighborhood Search, SNS. It takes inspiration from LNS and it is designed to explore slices of large discrepancy neighborhoods efficiently. In contrast with LDS, SNS avoids the exhaustive exploration of the k-distance neighborhood of the incumbent solution, which is too expensive from a computational point of view; it rather operates a sampling process of the given search space. Pictorially, we can imagine the incumbent solution x as a point in a two-dimensional space. The Euclidean distance between two points on the two-dimensional space corresponds to the discrepancy between two solutions. Fig. 2 shows the behavior of basic LDS. The central point is the incumbent solution x, while the concentric circumferences enclose areas of the search space at a discrepancy from x smaller than the corresponding number. For large problems, LDS may efficiently explore only low discrepancy areas. Fig. 3, instead, shows the main idea underlying SNS; the central point and the circumferences have the same meaning as in Fig. 2. The grayed out slices in the circles represent the search areas explored at each iteration of SNS; we expect to be able to explore portions of the search space which are at a higher discrepancy value than those explored via LDS within the same time limit.
Fig. 3. SNS space exploration scheme.
SNS iteratively explores neighborhoods of an incumbent solution x by triggering a sequence of restarts; at each restart a randomly chosen transversal slice of a k-distance neighborhood is chosen and explored. Transversal slices are identified by randomly selecting which variables have to change and which variables have to keep the same value. Therefore, SNS works by posting extra constraints, equality and difference constraints, on subsets of variables, thus setting at-least and at-most discrepancy bounds. Definition 3 (Neighborhood slice). A slice of a k-distance neighborhood of a given reference solution x is defined on three parameters: the incumbent solution x, a set E of indices corresponding to variables that keep the same value and a set D of indices corresponding to variables that have to change. The cardinality of E is n k.
N S ðx; E; DÞ ¼ fxjP [ fxi ¼ xi j8i 2 Eg [ fxi – xi j8i 2 Dgg SNS randomly chooses indices in sets E and D and iteratively explores the corresponding neighborhood slice. In the remaining of this section we assume D = ;, as we will justify in Section 4.3. For example, let us take an incumbent solution x of a problem instance having 6 variables x1 . . . x6 taking values [2, 4, 9, 5, 2, 8] and assume that we want to explore its neighborhood. With LDS
F. Parisini, M. Milano / Expert Systems with Applications 39 (2012) 5739–5747
we would first explore exhaustively the search space at discrepancy 1, where just 1 of the 6 variables can change at a time, then at discrepancy 2 and so on. SNS, instead, would fix a certain number of variables to the incumbent solution value, then the real search would start; for example, we could set x2 = 4, x3 = 9 and x6 = 8 and perform a standard tree search just on x1, x4 and x5. Our approach relies on restarts and randomization to ensure the considered neighborhood is sufficiently well explored. SNS performs many randomized iterations, each iteration exploring just a slice of the limited discrepancy space w.r.t. x, choosing each time a different set of variables and using small time limits for each iteration. SNS has two main parameters which need to be carefully tuned: at-least and at-most discrepancy bounds to be used in each iteration; in particular, these values could change at each iteration. time allocated to each iteration: it could be computationally expensive to perform a complete exploration of the sampled neighborhood. In our configuration a time limit is set on each iteration. We will examine into detail the tuning process of these parameters by inferring the impact they have on the effectiveness of the whole search approach. 3.1. SNS as a stand alone search strategy The usage of SNS as a stand alone search strategy in order to find improving solutions for CO problems, through the exploration of large neighborhoods of a given solution x, is a prominent field of application of our research work. It is a very general context, in which SNS is given a feasible solution of the problem, x, obtained through some other search method. In general we can assume x to be distant from the optimal solution in terms of discrepancy, thus we expect SNS to be able to quickly improve over it by performing large neighborhood search in situations in which the solution density is not too low. We will use LDS as a reference, to evaluate the usefulness of adopting our incomplete search method in contrast with an exhaustive approach (Section 4.3). 3.2. SNS in a heuristic framework SNS can be regarded as a general search strategy: it allows the partial exploration of very large neighborhoods, it includes randomization elements and it offers flexible parameters settings which can lead to either intensification or diversification behaviors. SNS is thus an ideal candidate to be used within a heuristic framework. In the following of this section we will investigate the usage of SNS within the neighborhood exploration and the diversification strategy of CP-based local branching. Both neighborhood exploration and diversification use an incumbent solution as a starting point, as SNS natively does. 3.2.1. Neighborhood exploration Neighborhood exploration in CP-based local branching is implemented as a Limited Discrepancy Search (LDS) guided by x. SNS is designed to explore higher discrepancy values than LDS in a incomplete way, so it is suitable for being used in such a setting where there is the need to explore high discrepancy neighborhoods without any completeness guarantee. We expect that SNS configurations having a small at-most k discrepancy bound, i.e. setting many equality constraints of the kind xi ¼ xi , could be effectively used for local branching neighborhood exploration blocks. The value of choice for the at-most k bound
5743
should be bigger than the maximum discrepancy reachable by LDS, to ensure exploration of a wider search space, but small enough to define a search space which could still be successfully explored within a SNS iteration. 3.2.2. Diversification strategy It is not obvious to find good diversification strategies for CPbased local branching. When a neighborhood search fails and some diversification is needed, it is not affordable neither to enlarge the neighborhood to explore via LDS, nor to switch to a new solution which is completely unrelated to the incumbent solution. In fact, searching for an improving solution from scratch during the diversification phase would in general require too much computational effort. SNS can be used for performing diversification; by conveniently setting at-most k and at-least k bounds it is possible to constrain the solution x to be found to have the desired minimum and maximum discrepancy with respect to x. 4. Experimental results In this section we provide experimental results, divided into two sets of experiments. The first set tests the effectiveness of SNS when compared to LDS; the second set evaluates the advantages of using SNS as intensification and diversification strategy within CP-based local branching. Experiments are conducted on instances of the Asymmetric Traveling Salesman Problem with Time Windows, using ILOG Solver 6.3 and ILOG Scheduler 6.3 on a 2 Ghz Pentium IV running Linux with 1 GB RAM. 4.1. Traveling Salesman Problem with Time Windows Given a set of cities and a cost associated to traveling from one city to the other, the Traveling Salesman Problem (TSP) is to find a (unique) tour such that each city is visited exactly once and the total cost of traveling is minimized. In Asymmetric TSP (ATSP), the cost from a city i to another city j may not be the same as the cost from j to i, in contrast with the classical (or symmetric) TSP. The TSP with Time Windows (TSPTW) is a time-constrained variant of the TSP in which each city has an associated visiting time and must be visited within a specific time window. TSPTW is a difficult problem which has applications in routing and scheduling. It is therefore extensively studied in Operations Research and CP (see, e.g. Desrosiers, Dumas, Solomon, & Soumis, 1995, 2002a). In the following, we concentrate on the asymmetric TSPTW (ATSPTW). The difficulty of ATSPTW stems on the fact that it involves both optimality and feasibility. In TSPs, optimization usually results to be the most difficult issue: although the feasibility problem of finding a Hamiltonian tour in a graph is NP-hard, in the specific applications it is usually easy to find feasible solutions, while the optimal one is very hard to determine. On the other hand, scheduling problems with release dates and due dates usually set serious feasibility issues since they may involve disjunctive, precedence and capacity constraints at the same time. The solution of scheduling problems is probably one of the most promising constraint programming (CP) area of application to date (see, e.g. (Baptiste, Pape, & Nuijten, 2001) and the use of local search techniques greatly enhances the ability of CP to tackle optimization problems (see, e.g. Milano, 2003 for a survey). For these reasons the ATSPTW is a good choice for testing the effectiveness of SNS in a CP-based framework. Note that we do not aim at competing with the advanced techniques developed specifically to solve this problem. We will show how SNS significantly improves over LDS when given an incumbent solution. We will also show how the CP-based local branching benefits from SNS.
5744
F. Parisini, M. Milano / Expert Systems with Applications 39 (2012) 5739–5747
4.2. ATSPTW modeling in CP To solve ATSPTW using local branching in CP, we have adopted the model of (Focacci, Lodi, & Milano, 2002a) in which each Nexti variable indicates the city visited after city i. Each city i is associated with an activity and the variable Starti indicates the time at which the service of activity i begins. Apart from the other constraints, the model consists of the all different (x) constraint (posted on the Next variables) and the cost function C(Next). We applied the cost-based filtering described in (Focacci et al., 2002b); additionally, to improve the quality of the computed bounds on discrepancy-limited neighborhoods, a discrepancy constraint on the Next variables is inserted in the additive bounding chain, together with the Assignment Problem relaxation (see Kiziltan et al., 2007 for details). Two different heuristics are taken into account for building a solution, the sequencing heuristic SeqHeu and the cost based heuristic CostHeu: SeqHeu builds a path starting from the initial city by assigning the Next variables; at each step it selects an activity j in the domain of Nexti; in detail, the activity having the smallest reduced-cost value cij , (obtained from the Assignment Problem relaxation) is chosen and assigned. CostHeu, instead, chooses the variable Nexti having the worst potential cost reduction at each decision step. The variable is instantiated to the incumbent solution value Nexti , if it is in the variable domain; to the minimum domain value otherwise. The process proceeds until all the variables are instantiated. When performing LDS or SNS alone, as in Section 4.3, SeqHeu is the heuristic of choice for the search. When testing local branching, both heuristics can be used for different SNS-based components of the framework; we will detail the chosen heuristics in Section 4.4. 4.3. Experiments: a comparison between SNS and LDS The first set of experiments was conducted on the ATSPTW instances proposed by Ascheuer (1995); in particular we used the largest instances (with more than 50 cities). The aim of this set of experiments was that of comparing LDS and SNS behavior when exploring the neighborhood of a given incumbent solution; the incumbent solutions were chosen from a pool of candidates, found via CP-based local branching (Kiziltan et al., 2007). We set a time limit of 300 s on each test run (referred to as global time limit). Additionally, a smaller time limit (namely, 10% of the global one) was set on each SNS iteration; this allows the (possibly partial) exploration of several SNS samples and is basically required for the method to be effective. The SNS performance is mainly influenced by 3 elements, namely (A) the effectiveness of the search within the search subtrees defined by the addition of equality and difference constraints to the model; then (B) the actual presence of improving solutions in the discrepancy range identified by at-least and at-most bounds. Finally, (C) the quality of the sampling process performed by SNS by randomly choosing portions of search space. In deeper detail: Search effectiveness in the search sub-trees: We refer as search sub-tree to the search space explored in after discrepancy bounds are enforced by posting equality and difference constraints. Search effectiveness in the sub-trees strongly depends on the propagation performed by such constraints, and clearly has a big part in SNS performance. While equality constraints enable strong propagation, we expect difference constraints to be less effective. Solution density in the selected discrepancy range: Regardless of how efficiently the selected discrepancy range is explored, the success of SNS depends on the actual presence of improving solutions
in such range and their number. This in turn depends on the problem structure, and on the selected at-least and at-most discrepancy bounds. Effectiveness of the sample space exploration: As SNS is basically sampling the search space defining the neighborhood of the incumbent solution, the effectiveness of the sampling process has a strong impact on the method performance. Such effectiveness is measured by the number of collected samples (i.e. SNS iterations) over the size of the Sample Space. Let n be the cardinality of the set of the problem variables, Dleast be the at-least discrepancy bound, Dmost the at-most discrepancy bound and let Dleast and Dmost be fixed throughout the whole SNS process; then the size of the Sample Space (i.e. the overall number of search sub-trees) is given by:
n n Dmost
Dmost Dleast
For a fixed number of SNS iterations, the larger the sample space, the least effective we expect the method to be. Note that such size is minimum for Dmost = 0 or n and Dleast = 0 or n, and quickly grow as Dmost approaches n/2 and Dleast approaches Dmost/2. The best results obtained for SNS are given in Table 1; here we compare LDS with a configuration of our approach having at-most discrepancy set to 40% of the problem size n. We also report results from what we call the Random Restart approach, in which we randomize the search heuristic SeqHeu and perform a sequence of fail limited restarts. We did not take into account LDS variations working on the sorting of branch exploration at a given discrepancy value, such as Depth-bounded Discrepancy Search (Walsh, 1997), as such sorting in our implementation is handled by the search heuristics once the discrepancy constraints have been set. The instances are ordered by increasing number of cities and the instance name contains such number. The column labeled ‘‘Best Cost’’ reports the cost of the best known solution from the literature. The column ‘‘Ref Cost’’ reports the cost of an incumbent solution. For all the search strategies the cost of the best solution found within the global time limit is reported; the discrepancy at which that solution is found follows, together with the percentage of the cost improvement. Since the incumbent solutions offer an initial cost value which is quite near to the best one, the percentage improvement provides a better evaluation of the search strategy ability to cover a large part of the gap. This percentage is computed as
%Impr ¼ 100 ðCost Ref CostÞ=ðRef Cost Best CostÞ where Cost is the cost value found by the considered configuration, while Ref Cost and Best Cost have the meaning explained above. The table shows that SNS is able to get results consistently better than basic LDS; our approach is able to find improving solutions at discrepancy values which are much higher than the ones which can be explored by LDS. The chosen at-most discrepancy value is small enough to allow an effective exploration of the search subtrees and big enough to keep a sufficiently high solution density within the sub-trees. Random Restart performs better than SNS only on the biggest instances; this is due to the fact that SNS is constrained to explore the neighborhood of initial solutions whose quality worsens while the instance size grows. We have also run experiments on different Minimum and Maximum Discrepancy values; we report some results in Table 2. In this table we use the notation D(Dleast,Dmost) to identify a SNS configuration having at-least discrepancy Dleast and at-most discrepancy Dmost from x. We compare the best SNS configuration, D(0%, 40%), with configurations having Dleast – 0, i.e. D(10%, 50%), D(10%, 40%) and D(25%, 55%). We observe that, even if using a
5745
F. Parisini, M. Milano / Expert Systems with Applications 39 (2012) 5739–5747 Table 1 Big instances, more than 50 cities, 300 CPU seconds time limit. Instance
Best Cost
Ref Cost
rbg050a rbg050b rbg050c rbg055a rbg067a rbg092a rbg125a rbg132 rbg132.2 rbg152 rbg152.3 rbg172a rbg193 rbg193.2 rbg201a rbg233.2
414 527 536 814 1048 1093 1409 1360 1083 1783 1539 1799 2414 2093 2189 2304
430 570 563 814 1056 1245 1762 1934 2164 2415 2570 2991 3401 3330 3748 4142
Basic LDS
Dmax=40%
Random restart
Cost
Sol disc
% Impr
Cost
Sol disc
% Impr
Cost
% Impr
430 570 563 814 1051 1208 1706 1882 2152 2371 2570 2942 3360 3290 3694 4103
– – – – 4 3 3 3 3 3 – 3 3 3 3 3
0.00 0.00 0.00 0.00 62.50 24.34 15.86 9.06 1.11 6.96 0.00 4.11 4.15 3.23 3.46 2.12
424 570 545 814 1051 1150 1632 1815 2040 2336 2548 2873 3266 3233 3650 4059
5 – 7 – 7 8 20 13 31 23 42 31 31 45 24 49
37.50 0.00 66.67 0.00 62.50 62.50 36.83 20.73 11.47 12.5 2.13 9.9 13.68 7.84 6.29 4.52
430 570 563 814 1056 1245 1762 1934 1969 2414 2539 2904 3389 3131 3748 3834
0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 18.04 0.16 3.01 7.30 1.21 16.09 0.00 16.76
Table 2 Big instances, more than 50 cities, 300 CPU seconds time limit. Instance
Best Cost
Ref Cost
rbg050a rbg050b rbg050c rbg055a rbg067a rbg092a rbg125a rbg132 rbg132.2 rbg152 rbg152.3 rbg172a rbg193 rbg193.2 rbg201a rbg233.2
414 527 536 814 1048 1093 1409 1360 1083 1783 1539 1799 2414 2093 2189 2304
430 570 563 814 1056 1245 1762 1934 2164 2415 2570 2991 3401 3330 3748 4142
D(0%, 40%)
D(10%, 50%)
D(10%, 40%)
D(25%, 55%)
Cost
% Impr
Cost
% Impr
Cost
% Impr
Cost
% Impr
424 570 545 814 1051 1150 1632 1815 2040 2336 2548 2873 3266 3233 3650 4059
37.50 0.00 66.67 – 62.50 62.50 36.83 20.73 11.47 12.5 2.13 9.90 13.68 7.84 6.29 4.52
429 570 563 814 1048 1203 1682 1925 2063 2377 2555 2918 3278 3330 3748 4142
6.25 0.00 0.00 – 100 27.63 22.66 1.57 9.34 6.01 1.45 6.12 12.46 0.00 0.00 0.00
429 570 563 814 1051 1203 1721 1916 2035 2365 2499 2932 3401 3330 3748 4142
6.25 0.00 0.00 – 62.50 27.63 11.61 3.14 11.93 7.91 6.89 4.95 0.00 0.00 0.00 0.00
430 570 563 814 1051 1217 1762 1934 2108 2410 2528 2991 3401 3330 3748 4142
0.00 0.00 0.00 – 62.50 18.42 0.00 0.00 5.18 0.79 4.07 0.00 0.00 0.00 0.00 0.00
nonnull at-least discrepancy bound further reduces the size of the sub-trees to be explored, the overall performances of the SNS configurations worsen. This is due to the fact that, when Dleast – 0, the size of the sampling space grows quickly, lowering the quality of the sampling process performed by SNS. The tests can be effectively read in terms of size of sampling space, search sub-tree size and solution density, supporting with experimental results the effectiveness of SNS as a CP-based search strategy for exploring the neighborhood of a given incumbent solution. 4.4. Experiments: evaluation of SNS within a heuristic framework The second set of experiments we conducted aimed at comparing the best CP-based local branching configuration known from the literature (Kiziltan et al., submitted for publication), which we will call Local Branching Configuration (LB Conf), with our CPbased local branching configurations using SNS for the diversification strategy and the neighborhood exploration. All the configurations run the same CP-based local branching code, thus finding the same initial solution for a given instance (except for the results shown in Table 6); the cost of such initial solution is called Ref value in the result tables. The quality of the results obtained from a given configuration can be evaluated in the measure in which the configuration improves over the Ref value w.r.t. the other configurations, LB Conf in particular. It is important to note that LB
Conf represents a very interesting benchmark, as it has already been experimentally proven to outperform both standard CP depth first search and LDS (see Kiziltan et al., submitted for publication for details). The tests were run on a subset of the ATSPTW instances proposed by Ascheuer (1995) that we already mentioned in Section 4.3. We set a 7200 s time limit on each instance. The first group of experiments uses the best SNS configuration from Section 4.3 as diversification strategy in the CP-based local branching, keeping all the other local branching elements the same as they are in LB Conf; we call this configuration D1 Conf in Table 3. In detail, in the SNS-based diversification strategy equality constraints are set on 60% of the problem variables to ensure at-most k bound is set at 40% of the problem size and a 30 s time limit is set on each SNS iteration. Moreover, the SNS iterations are performed within a macro time window of 300 s; if no improving solution is found within the window, another time window is allocated and SNS iterates again. The heuristic used within SNS is the sequencing heuristic SeqHeu. This simple configuration already obtains good performances, better on all ATSPTW instances than the LB Conf, except for the biggest instance, 233.2. We tried minor parameters variations to obtain a more stable configuration, so we developed D2 and D3. Configuration D2 reduces the time window from 300 s to 30 s, making it equal to each SNS iteration timeout. In this way we obtain a fine-grained control on the SNS iterations, allowing us to
5746
F. Parisini, M. Milano / Expert Systems with Applications 39 (2012) 5739–5747
Table 3 Big instances, 7200 CPU seconds time limit, SNS used for diversification. Instance
Ref value
LB Conf value
D1 Conf value
D2 Conf value
D3 Conf value
rbg125a rbg132.2 rbg132 rbg152.3 rbg152 rbg172a rbg193.2 rbg193 rbg201a rbg233.2
2346 2276 2122 2675 2771 3010 3365 3440 3780 4219
1762 1883 1934 2397 2281 2748 3143 3217 3562 3886
1511 1654 1439 2261 2051 2395 2928 2917 3248 4009
1523 1839 1548 2262 2093 2551 3021 3061 3449 3791
1516 1579 1439 2222 2109 2529 2943 2982 3222 3867
Bold is used to identify the solution values which have the best quality for the configuration taken into exam in the table.
Table 4 Big instances, 7200 CPU seconds time limit, SNS used for neighborhood exploration. Instance
Ref value
LB Conf value
N1 Conf value
N2 Conf value
N3 Conf value
rbg125a rbg132.2 rbg132 rbg152.3 rbg152 rbg172a rbg193.2 rbg193 rbg201a rbg233.2
2346 2276 2122 2675 2771 3010 3365 3440 3780 4219
1762 1883 1934 2397 2281 2748 3143 3217 3562 3886
1803 1761 1412 2182 2201 2643 2990 3159 3366 3890
1473 1275 1410 1981 1877 2198 2974 3022 3424 3988
1473 1275 1410 1981 2016 2419 2847 2876 3039 3955
Bold is used to identify the solution values which have the best quality for the configuration taken into exam in the table.
Table 5 Big instances, 7200 CPU seconds time limit, SNS used for neighborhood exploration and diversification. Instance
rbg125a rbg132.2 rbg132 rbg152.3 rbg152 rbg172a rbg193.2 rbg193 rbg201a rbg233.2
Ref value
2346 2276 2122 2675 2771 3010 3365 3440 3780 4219
LB Conf
SNS Conf
Value
% Impr
Value
% Impr
1762 1883 1934 2397 2281 2748 3143 3217 3562 3886
62.33 32.94 24.67 24.47 49.59 21.63 17.45 21.73 13.70 17.39
1484 1310 1410 1981 1889 2198 2739 2876 3039 3768
91.99 80.97 93.44 61.09 89.27 67.05 49.21 54.97 46.57 23.55
switch back to local branching from diversification as soon as a SNS iterations reports an improving solution. The 30 s time limit is increased when restarts occur; the optimal Luby sequence (Luby, Sinclair, & Zuckerman, 1993) is used as multiplying factor for the time limit each time a SNS iteration does not return an improving solution. In this way we expect that bigger search spaces can be explored when needed, i.e. when we are not able to find any improving solution within the given time limit, thus overcoming D1’s limitations. Configuration D3, instead, behaves exactly as D1, except for the fact that the time limit on each iteration is augmented from 30 s to 50 s. Both D2 and D3 are designed to be more stable than D1 when dealing with biggest instances; the results, reported in Table 3, show that both configurations always perform better than LB Conf, D3 obtaining many of the best results over all the configurations. The second group of experiments uses SNS as neighborhood exploration tool, substituting Limited Discrepancy Search. The first configuration we tried, N1, plugs the best SNS configuration from Section 4.3 for the neighborhood exploration on the CP-based local branching code. All the other parts of the local branching code are left as they are in LB Conf, including the diversification strategy. The time limit used for neighborhood exploration is 180 s; if SNS does not find any solution within that time limit, local branching switches to the diversification step. The heuristic used within SNS is the sequencing heuristic SeqHeu. From the results in Table 4 we can see that this plain integration of SNS as neighborhood exploration tool provides good results when compared to the LB Conf, as it shows better results, except for a couple of instances. Then we decided to run SNS with parameters tuned for performing a fast, effective exploration of areas closer to the incumbent solution x. First of all we used a different heuristic for exploring the search tree, i.e. we switched from SeqHeu to CostHeu, which is the heuristic used in LB Conf for neighborhood exploration. To achieve proximity to x we reduced the at-most k bound from 40% to 20% by ensuring that 80% of the problem variables have their domain bound to their reference value xi . The configuration we developed is called N2, and its results are shown in Table 4. The results from N2 are very good when compared to both the LB Conf and N1. Its performance worsens on the biggest instances, where the search space defined by the at-most k bound becomes too big, as it is bound to the cardinality of the problem variables. We created a variation of N2, N3, which sets an fixed upper bound on the at-most k bound to avoid exploring search spaces which are too wide; we set this bound to 35 variables. The results from N3 confirm that this small change actually produces a considerable improvement, as it allows us to get many of the best results over all the neighborhood exploration configurations. Given the good results from using SNS separately for diversification and neighborhood exploration within the CP-based local
Table 6 Big instances, 7200 CPU seconds time limit, testing the robustness of the SNS configuration. Instance
rbg125a rbg132.2 rbg132 rbg152.3 rbg152 rbg172a rbg193.2 rbg193 rbg201a rbg233.2
SNS Conf
R1 Conf
R2 Conf
R3 Conf
Ref value
Value
% Impr
Ref value
Value
% Impr
Ref value
Value
% Impr
Ref value
Value
% Impr
2346 2276 2122 2675 2771 3010 3365 3440 3780 4219
1484 1310 1410 1981 1889 2198 2739 2876 3039 3768
91.99 80.97 93.44 61.09 89.27 67.05 49.21 54.97 46.57 23.55
2281 2229 2241 2645 2648 3041 – 3457 3774 4043
1462 1358 1399 1955 1874 2243 – 2879 3146 3690
93.92 76.00 95.57 62.39 89.48 64.25 – 55.42 39.62 20.30
2315 2350 2340 2685 2533 3061 3394 – 3719 4197
1435 1244 1406 2125 1871 2243 2935 – 2974 3776
97.13 87.29 95.31 48.87 88.27 64.82 35.28 – 48.69 22.24
2265 2140 2262 2696 2578 3206 3403 – 3565 4205
1465 1222 1405 2101 1872 2298 2700 – 2849 3782
93.46 86.85 95.01 51.43 88.81 64.53 53.66 – 52.03 22.25
F. Parisini, M. Milano / Expert Systems with Applications 39 (2012) 5739–5747
branching, we decided to use the best SNS configurations for each of these search components in the same local branching configuration, to try and get even better results. In Table 5 we compare the LB Conf with the SNS Configuration, which is a CP-based local branching configuration using N3 as neighborhood exploration tool and D3 as diversification tool. For each instance, for both configurations, a percentage improvement % Impr is computed. That value reports which ratio of the improvement interval, i.e. the absolute value of the difference between the Ref value and the best value known for the instance, has been achieved. This SNS configuration obtains results which are consistently better than LB Conf. In order to test the robustness of the SNS Configuration we decided to run further experiments using a randomized version of the heuristic used to find the initial solution. Our aim is to estimate whether SNS Conf shows a uniform behavior in closing the optimality gap, i.e. if the percentage improvement of a given instance does not drastically change when starting from a different initial solution. In Table 6 we show the results of four SNS configurations, reporting three fields for each of them: the Ref value, i.e. the cost of the initial solution found, the cost of the best solution found within the 1800 s time limit and the percentage improvement. The difference between the four SNS configurations lies in the choice of the heuristic used for finding the initial solution; SNS Conf uses SeqHeu, while R1, R2 and R3 Conf use a randomized version of it, finding different solutions. The randomized version of SeqHeu is not always able to find an initial solution within the time limit, as it happens for instances rbg193 and rbg193.2; this is due to the fact that for such big instances it can be very hard even to find an initial solution. Nonetheless, when an initial solution is found, the SNS local branching configuration is able to cover the improvement interval in a uniform way, showing similar values in the % Impr columns of each instance. 5. Conclusions Sliced Neighborhood Search is a general and effective search technique which heuristically explores random slices of potentially very large neighborhood of an incumbent solution incorporating elements coming from LDS and LNS. It can be used both as a stand alone search strategy and as intensification and diversification method in a heuristic framework. The tests support the idea that a carefully tuned SNS configuration can easily outperform Limited Discrepancy Search. Results also show that the integration of SNS within a CP-based heuristic technique as CP-based local branching involves a substantial improvement in terms of solution quality. Further work on SNS includes the introduction of stoachastic concepts in the way neighborhoods are explored and the use of sampling to derive promising slices to explore.
5747
References Adorf, H. -M., & Johnston, M. (1990). A discrete stochastic neural network algorithm for constraint satisfaction problems. In Neural Networks, IJCNN International Joint Conference on 1990, 3 (pp. 917–924). Ascheuer, N. (1995). Hamiltonian path problems in the on-line optimization of flexible manufacturing systems. Ph.D. thesis Technische Universität Berlin. Baptiste, P., Pape, C. L., & Nuijten, W. (2001). Constraint-based scheduling. Kluwer Academic Publishers. Blum, C., Aguilera, M. B., Roli, A., & Sampels, M. (2008). Hybrid metaheuristics: An emerging approach to optimization. Springer. Danna, E., Rothberg, E., & Pape, C. L. (2004). Exploring relaxation induced neighborhoods to improve MIP solutions. Mathematical Programming, 102, 71–90. Davenport, A. J., Tsang, E. P. K., Wang, C. J., & Zhu, K. (1994). Genet: A connectionist architecture for solving constraint satisfaction problems by iterative improvement. In AAAI (pp. 325–330). Desrosiers, J., Dumas, Y., Solomon, M., & Soumis, F. (1995). Time constrained routing and scheduling. In Network Routing (pp. 35–139). Dorigo, M., & Sttzle, T. (2004). Ant colony optimization. Cambridge, MA: MIT Press. Fischetti, M., & Lodi, A. (2003). Local branching. Mathematical Programming, 98, 23–47. Focacci, F., Lodi, A., & Milano, M. (2002a). A hybrid exact algorithm for the TSPTW. Informs Journal on Computing, 14(4), 403–417. Focacci, F., Lodi, A., & Milano, M. (2002b). Optimization-oriented global constraints. Constraints, 7, 351–365. Harvey, W., & Ginsberg, M. (1995). Limited discrepancy search. In Proceedings of IJCAI-95 (pp. 607–615). Morgan Kaufman. Hentenryck, P. V., & Michel, L. (2005). Constraint-based local search. MIT Press. Khichane, M., Albert, P., & Solnon, C. (2010). Strong combination of ant colony optimization with constraint programming optimization. In CPAIOR (pp. 232– 245). Kiziltan, Z., Lodi, A., Milano, M., & Parisini, F. (2007). Cp-based local branching. Proceedings of CP-07, LNCS, 4741, 847–855. Kiziltan, Z., Lodi, A., Milano, M., & Parisini, F. (submitted for publication). Bounding, filtering and diversification in cp-based local branching. Journal of Heuristics. doi:10.1007/s10732-011-9190-2. Korf, R. (1996). Improved limited discrepancy search. In Proceedings of AAAI-96 (pp. 286–291). MIT Press. Lodi, A., Milano, M., & Rousseau, L. (2003). Discrepancy based additive bounding for the all different constraint. Proceedings of CP-03, LNCS, 2833, 510–524. Luby, M., Sinclair, A., & Zuckerman, D. (1993). Optimal speedup of las vegas algorithms. Information Processing Letters, 47, 173–180. Michel, L., & Hentenryck, P. V. (1997). Localizer: A modeling language for local search. In CP (pp. 237–251). Milano, M. (2003). Constraint and integer programming: Toward a unified methodology. Kluwer Academic Publishers [chapter 9]. Minton, S., Philips, A., Johnston, M. D., & Laird, P. (1993). Minimizing conflicts: A heuristic repair method for constraint-satisfaction and scheduling problems. Journal of Artificial Intelligence Research, 58, 161–205. Morris, P. (1993). The breakout method for escaping from local minima. In AAAI (pp. 40–45). Nemhauser, G. L., & Wolsey, L. A. (1988). Integer and combinatorial optimization. New York, NY, USA: John Wiley & Sons. Parisini, F., Lombardi, M., & Milano, M. (2010). Discrepancy-based Sliced Neighborhood Search. In AIMSA (pp. 91–100). Pesant, G., & Gendreau, M. (1999). A constraint programming framework for local search methods. Journal of Heuristics, 5, 255–279. Shaw, P. (1998). Using constraint programming and local search methods to solve vehicle routing problems. Proceedings of CP-98, LNCS, 1520, 417–431. Shaw, P. (2010). Integration of l s and tree search. In M. Milano & P. van Hentenryck (Eds.), Hybrid optimization. Springer. Walsh, T. (1997). Depth-bounded discrepancy search. In Proceedings of IJCAI-97 (pp. 1388–1393).