1 Introduction

Route scheduling is one of the most important real-life problems and became a core issue in transportation, supply chain management and logistics. Its numerous practical applications include the bus route planning, post, parcels, food and beverage delivery, cash delivery to banks and ATM terminals, industrial waste collection, maintenance operations, and many more. While constructing the routing schedule for a given distribution problem, it is necessary to consider a large number of practical issues, e.g., the available fleet size, truck capacities, travel costs between geographically dispersed customers, possible time intervals in which customers should be visited, and numerous other circumstances. These factors affect the feasibility of a routing plan.

Minimizing the number of trucks and their total distance traveled during the service contributes to reducing the fleet exploitation costs and fuel consumption, it lessens the price of delivered goods, and helps in reducing the environmental pollution and traffic congestion (Hosny and Mumford 2010). Numerous variants of vehicle routing problems (VRPs) reflect real-life scheduling scenarios (Dantzig and Ramser 1959; Creput and Koukam 2008). In the multiple traveling salesman problem (\(m\)TSP)—an extension of a standard traveling salesman problem—more than one salesman can serve customers (Bektas 2006). Each customer specifies a non-negative demand, which should be satisfied by the salesman. Clearly, the number of vehicles (salesmen) should be as minimum as possible. In the capacitated vehicle routing problem (CVRP), vehicle capacities cannot be exceeded (Niu et al. 2014). In commercial transportation problems, customers usually expect their orders within a specified time slot. The vehicle routing problem with time windows (VRPTW) incorporates delivery time constraints to address this issue (Kallehauge 2008). It is a two-objective NP-hard discrete optimization problem (Garey and Johnson 1990). Its main objective is to minimize the number of homogeneous vehicles serving customers scattered around the map. Then, the total travel distance is to be minimized. There exist a plethora of other variants of the VRPs which consider additional scheduling constraints (Marinakis and Marinaki 2014; Masson et al. 2014).

State-of-the-art algorithms for tackling the VRPTW include exact and approximate methods. Since this problem is NP-hard (Garey and Johnson 1990), the former approaches can be applied only for relatively small problem instances. Therefore, various heuristic algorithms that do not guarantee obtaining the optimal solution but execute very fast have been introduced to solve the VRPTW in a short time, and became a main stream of development in this field. They encompass simulated annealing (Zhong and Pan 2007), tabu searches (Ho and Haugland 2004), ant colony systems (Gambardella et al. 1999; Gomez et al. 2014), swarm optimization algorithms (Hu et al. 2013), evolutionary approaches (Repoussis et al. 2009), genetic and memetic algorithms (GAs and MAs) (Ghoseiri and Ghannadpour 2010; Nagata et al. 2010; Nalepa and Czech 2013; Vidal et al. 2013; Nalepa and Blocho 2014), and more (Bräysy and Gendreau 2005).

Although evolutionary algorithms were shown to be extremely effective, these techniques require their numerous parameters to be given prior to the optimization, which is difficult in practice. These algorithms need to be run multiple times in a very time-consuming tuning process to find the most appropriate set of parameter values. Due to the difficulty of the VRPTW, it became a significant disadvantage of the mentioned GAs and MAs. This issue was initially addressed in our preliminary study which showed that adapting MA parameters using basic mechanisms helps improve its convergence capabilities (Nalepa 2014). In this paper, we propose a new adaptive memetic algorithm.

1.1 Contribution

As previously stated, the main drawback of the MAs applied for solving the VRPTW lies in an unclear tuning of their numerous parameters. Since the state-of-the-art methods use static parameter values, they must be set a priori, and do not change during the optimization process. Clearly, improperly determined parameters can easily jeopardize the convergence of the MA and deteriorate its performance. In this paper, we propose a new adaptive MA (termed AMA-VRPTW) which dynamically adapts itself according to the current state of the search without any additional knowledge given prior to the algorithm execution. This mitigates the necessity of performing a time-consuming tuning process.

The adaptation in AMA-VRPTW includes controlling the selection scheme, population size, and the number of child solutions generated during the recombination. Also, we introduce a new adaptive selection scheme which balances the exploration and exploitation capabilities of AMA-VRPTW based on the current search progress. Experimental results obtained for two standard and widely used benchmark sets empirically demonstrate that our adaptive MA efficiently controls its parameters on the fly which leads to high convergence capabilities of the proposed method, and show that AMA-VRPTW is very competitive compared with other techniques reported in the literature. Finally, we present a thorough sensitivity analysis on various method components, followed by the two-tailed Wilcoxon test for assessing statistical significance of the results to investigate how the proposed adaptation schemes contribute to the performance of AMA-VRPTW.

1.2 Paper outline

The remainder of this paper is organized as follows. The problem is formally defined in Sect. 2. Section 3 reviews the state-of-the-art algorithms for solving the VRPTW. Section 4 discusses in detail the proposed adaptive memetic algorithm. The results of an extensive experimental study performed on standard Solomon’s and Gehring and Homberger’s benchmark sets, along with the sensitivity analysis on various method components followed by the two-tailed Wilcoxon test, are reported and analyzed in Sect. 5. Section 6 concludes the paper and highlights directions of our future work.

2 Problem formulation

The VRPTW is formulated as a problem of serving \(M\) customers by a fleet of \(K\) vehicles. The vehicles have a constant capacity \(Q\), which makes the fleet homogeneous. A single depot (\(v_{0}\)) is the start and the finish point of each route. The customers \(v_{i}\), \(i \in \{1,2,\ldots ,M\}\), define their own service times \(s_{i}\), \(i \in \{1,2,\ldots ,M\}\). Serving the depot does not take any time (\(s_0=0\)), whereas the customer service times are non-negative. A non-negative demand \(d_{i}\), \(i \in \{1,2,\ldots ,M\}\), is given for each customer. The travel costs between each pair of travel points (i.e., distances in the Euclidean metric) are given as \(c_{(i,j)}\), where \(i \ne j\), \(i,j \in \{0,1,\ldots ,M\}\). These travel costs correspond to the travel times. Each customer and the depot specifies its earliest and latest time of starting the service (i.e., time window), \(e_{i}\) and \(l_{i}\), respectively (\(i \in \{0,1,\ldots ,M\}\)).

More formally, the VRPTW is defined on a directed graph \(G=(V,E)\) with a set \(V\) of \(M+1\) vertices representing the customers and the depot, along with a set of edges \(E=\{\langle v_{i},v_{(i+1)}\rangle |v_{i},v_{(i+1)}\in V, v_{i} \ne v_{(i+1)}\}\), representing the connections between the travel points. Intuitively, the \(0\)th vertex \(v_0\) represents the depot. Each vehicle is assigned a set of customers from exactly one route for service. The \(i\)th route is an ordered list of \(m_i\) customers to serve: \(r_i=\langle v_{0},v_{(r_i(1))},\ldots ,v_{(m_i+1)}\rangle \), where \(v_{0} = v_{(m_i+1)}\) is the depot, and \(v_{(r_i(j))}\) denotes the \(j\)th customer visited in \(r_i\).

2.1 Objectives

The VRPTW is a hierarchical objective discrete optimization problem. The primary objective is to minimize the fleet size \(K\) (i.e., the number of vehicles serving \(M\) customers). It is easy to note that \(K\ge K_\mathrm{min}\), where \(K_\mathrm{min} = \left\lceil D/Q\right\rceil \). Here, \(D=\sum _{i=1}^M{d_i}\) denotes the total customer demands. Secondly, the total distance \(T\) traveled by the vehicles is to be minimized:

$$\begin{aligned} T=\sum \limits _{i=0}^M { \sum \limits _{j=0}^M { \sum \limits _{k=1}^K {x_{(i,j,k)}c_{(i,j)}}}}. \end{aligned}$$
(1)

The problem is characterized by three decision variables:

$$\begin{aligned}&x_{(i,j,k)} \left( i,j \in \{0,1,\ldots ,M\}, i \ne j, \forall k \in K\right) ,\end{aligned}$$
(2)
$$\begin{aligned}&a_{i} \left( i \in \{0,1,\ldots ,M\}\right) , \text {and}\end{aligned}$$
(3)
$$\begin{aligned}&w_{i} \left( i \in \{1,2,\ldots ,M\}\right) . \end{aligned}$$
(4)

If the \(k\)th vehicle travels from \(v_i\) to \(v_j\) (where \(i\ne j\)), then \(x_{(i,j,k)}=1\) (\(0\) otherwise). Two other decision variables indicate the arrival and the waiting time at \(v_i\) (\(a_i\) and \(w_i\), respectively). There is no waiting time at the depot (and \(a_0 = e_0\)).

Let \(\sigma _A\) and \(\sigma _B\) be two solutions to the VRPTW. Then, \(\sigma _A\) is of a higher quality than \(\sigma _B\), if (\(K(\sigma _A) < K(\sigma _B)\)) or (\(K(\sigma _A) = K(\sigma _B)\) and \(T(\sigma _A) < T(\sigma _B)\)).

2.2 Constraints

The VRPTW constraints may be formally expressed by the following equations:

$$\begin{aligned}&\sum \limits _{k=1}^K {\sum \limits _{j=0, j \ne i}^M {x_{(i,j,k)}} } = \sum \limits _{k=1}^K {\sum \limits _{i=0, j \ne i}^M {x_{(i,j,k)}} } = 1 \quad (\forall i, j \in V),\nonumber \\ \end{aligned}$$
(5)
$$\begin{aligned}&\sum \limits _{j=1}^M { x_{(i,j,k)}} = \sum \limits _{j=1}^M { x_{(j,i,k)}} = 1 \quad (i = 0, \forall k \in K), \end{aligned}$$
(6)
$$\begin{aligned}&\sum \limits _{j=1}^M { \sum \limits _{k=1}^K {x_{(i,j,k)} = K}} \quad (i = 0), \end{aligned}$$
(7)
$$\begin{aligned}&\sum \limits _{i=1}^M { d_i \sum \limits _{j=0, j \ne i}^M {x_{(i,j,k)} \le Q}} \quad (\forall k \in K),\end{aligned}$$
(8)
$$\begin{aligned}&e_i \le a_i + w_i \le l_i \quad (\forall i \in V), \end{aligned}$$
(9)
$$\begin{aligned}&\max \{ a_{(i-1)} + s_{(i-1)} + c_{\left( (i-1),i\right) }, e_i\} \le l_i \nonumber \\&\quad \big (i \in \{1,2,\ldots ,m_{k}+1\}, \forall k \in K\big ). \end{aligned}$$
(10)

It has to be assured that every customer is visited exactly once (Eq. 5), all the routes start and finish at the depot (Eq. 6), and the fleet size is equal to \(K\) (Eq. 7). The capacity (Eq. 8) and the time window constraints (Eqs. 9, 10) must hold for each route. Thus, the total amount of goods delivered to customers by a vehicle cannot exceed \(Q\), and the service of each customer must be started before its time window elapses.

Arriving at a customer \(v_{(i+1)}\) (at a certain time point) is visualized in Figs. 1, 2, 3 (axes show the elapsing time \(\tau \)). If a vehicle visits \(v_{(i+1)}\) within its time window (\(e_{(i+1)}\le a_{(i+1)}\le l_{(i+1)}\)), then the service is immediate (Fig. 1).

Fig. 1
figure 1

Visiting a customer \(v_{(i+1)}\) within its time window

Fig. 2
figure 2

Visiting a customer \(v_{(i+1)}\) before its time window starts

Fig. 3
figure 3

Visiting a customer \(v_{(i+1)}\) after closing its time window

Alternatively, the vehicle may arrive at \(v_{(i+1)}\) before the beginning of the time window (\(a_{(i+1)}<e_{(i+1)}\)). However, the service cannot be initiated before \(e_{(i+1)}\) (we consider hard time windows), and the vehicle waits until the time window is open (see Fig. 2—the dotted line indicates the waiting time \(w_{(i+1)}\) at \(v_{(i+1)}\)).

If a vehicle visits \(v_{(i+1)}\) after closing its time window (\(a_{(i+1)}>l_{(i+1)}\)), it violates the time window constraint, and the service is not feasible (Fig. 3). The entire route \(r\) containing \(v_{(i+1)}\) becomes infeasible, so as \(\sigma \).

3 Related literature

3.1 Vehicle routing problem with time windows

Due to the NP-hardness of the VRPTW (Garey and Johnson 1990), and its wide practical applicability, it was extensively studied over the years. Since the computation time of exact approaches is not acceptable for large-scale problem instances, a plethora of heuristic algorithms (which find high-quality, but not necessarily optimal, solutions quickly) have been proposed. In this section, we review the state-of-the-art techniques for solving the VRPTW.

Most exact approaches consider minimizing the total travel distance as the single optimization objective. In many aspects, they inherit from works devoted to solving the TSP (Kallehauge 2008). They encompass branch-and-cut (Bard et al. 2002), and branch-cut-and-price procedures (Abdallah and Jang 2014), algorithms utilizing many different problem formulations (Kolen et al. 1987; Feillet et al. 2004; Larsen 2004; Chabrier 2006; Righini and Salani 2006; Baldacci et al. 2011), and adopting other problems for the VRPTW (Irnich and Villeneuve 2006). Exact methods were summarized in thorough surveys and reviews (Cordeau et al. 2002; Kallehauge 2008; El-Sherbeny 2010; Baldacci et al. 2012). Although exact algorithms are continuously being developed, they are still not applicable to large real-life VRPTW instances due to their execution time. Also, they are strongly dependent on test characteristics (Vidal et al. 2013).

In heuristic techniques, two VRPTW objectives are usually considered independently. Therefore, two-stage algorithms (both sequential and parallel), in which the number of vehicles is minimized at first, and then the travel distance is optimized, are a vital research topic. A two-stage approach enables designing effective algorithms for both optimization stages independently. In construction heuristics, unserved customers are iteratively inserted into a partial solution (Potvin and Rousseau 1993; Petch and Salhi 2003; Tavares et al. 2009; Pang 2011). Improvement heuristics modify an initial solution to explore the solution space (Bräysy and Gendreau 2005; Nagata and Bräysy 2009). Meta-heuristic algorithms, which often couple exploring the search space with its intensive exploitation, allow for existing infeasible solutions and deteriorating their quality temporarily. Such approaches include simulated annealing (Chiang and Russell 1996), tabu searches (Ho and Haugland 2004), swarm optimization (Hu et al. 2013), ant colony systems (Gambardella et al. 1999; Gomez et al. 2014), hybrid techniques (Liu et al. 2014), and many more (Bräysy and Gendreau 2005; Coltorti and Rizzoli 2007; Banos et al. 2013).

Evolutionary algorithms (EAs) have been very extensively explored for tackling the VRPTW (Thangiah et al. 1991; Zhu 2000; Ombuki et al. 2006; Repoussis et al. 2009). Genetic algorithms (GAs) consist in evolving a population of solutions. It is then continuously improved in the biologically inspired manner, in which chromosomes are successively selected, crossed-over, and mutated. Similarly, memetic algorithms (MAs) are built upon the population-based approach, and combine EAs for exploring the solution space with local refinement procedures for exploiting solutions already found. MAs (both sequential and parallel) were shown to be very effective in solving the VRPTW (Nagata et al. 2010; Blocho and Czech 2012a, b, 2013; Nalepa and Czech 2013; Vidal et al. 2013, Nalepa and Blocho 2014). Memetic techniques have been applied to a bunch of other optimization and pattern recognition problems in a variety of science and engineering domains (Li et al. 2013, 2014; Guan et al. 2014; Jin et al. 2014; Marinaki and Marinakis 2014; Nalepa and Kawulok 2014), and they outperformed other evolutionary algorithms in terms of the convergence capabilities.

figure a

3.2 Adaptive evolutionary algorithms

The most important shortcoming of the mentioned GAs and MAs is an unclear selection of their numerous parameters to ensure the proper convergence speed, exploration and exploitation capabilities. Since these methods use static parameters (i.e., they do not change during the execution), this decision significantly influences the performance, and should be undertaken very carefully. Thus, the current state-of-the-art GAs and MAs for VRPTW must be executed multiple times to determine an acceptable set of appropriate parameters, which is usually a computationally intensive and time-consuming task. In our recent work, we showed how the choice of the co-operation scheme (defining the co-operation of parallel processes, called islands) in the parallel MA influences the search (Nalepa and Blocho 2014). Here, we address the issue of an automatic control of various algorithm parameters in the proposed adaptive MA. Thus, the necessity of performing the tuning process is mitigated.

A significant research effort has been put into proposing approaches for improving EAs by optimizing their parameters. Two main streams of development include parameter tuning and control. The former techniques determine “good” parameter values before the algorithm run. In a majority of such methods, a single parameter is tuned at a time, which may result in sub-optimal choices since the parameters are not independent. Clearly, this process is very time consuming and does not necessarily lead to optimally selected values. Also, trying all parameter combinations is practically impossible. Each EA run is inherently dynamic and adaptive, and different parameters may be “optimal” at various steps of the optimization. This is not considered in tuning schemes—they find a single set of parameters used during the entire execution.

Control techniques aim at setting parameters of dynamic EAs on the fly (i.e., during the algorithm execution). Control EAs are classified based on many aspects: what is changed (selection scheme, mutation rate, etc.), how is it done (deterministic, feedback-based, and self-adaptation), what is the scope (level) of change (population level, individual level, etc.), and what is the evidence upon which the change is carried out (monitoring the progress of the search, population diversity, performance of operators, etc.) (Eiben et al. 1999). However, by tradition, the main criteria of classifying strategies for parameter control are the (straight-forward) what, and (less-obvious) how. Control strategies are divided into three categories based on the “how aspect”: deterministic (the parameter is updated without any feedback from the running EA), adaptive (there is a feedback from the EA, and the parameters are adjusted accordingly), self-adaptive (parameters are encoded into individuals and evolve). Following this taxonomy, the proposed AMA-VRPTW is an adaptive MA.

4 Adaptive memetic algorithm

In this section, we present in detail the proposed adaptive MA (AMA-VRPTW). We introduce a new adaptive selection scheme, termed the adaptive exploration–exploitation scheme (AE\(^2\)), which balances the exploration and exploitation of the solution space based on the current optimization state. The dynamic adaptation of various algorithm parameters, including the population size, selection scheme and the number of children generated for each pair of parents during the recombination process, is discussed. It is worth pointing out that the crossover, mutation, and education procedures applied in AMA-VRPTW have been already utilized in our earlier works and other MAs (Nagata et al. 2010; Blocho 2013; Nalepa et al. 2014; Nalepa and Blocho 2014), and proved to be very robust. Here, we briefly discuss them.

4.1 Chromosomes

In AMA-VRPTW (Algorithm 1), each individual \(p_i\), \(i\in \{1,2,\ldots ,N\}\), represents a solution \(\sigma _i\) with \(K\) routes (therefore, \(K(p_i)=K(\sigma _i)=K\), and \(T(p_i)=T(\sigma _i)\)) in a population of size \(N\), where \(N=N_I\) at the beginning (line 1). The initial population is generated using a guided ejection search (GES) (Nagata and Bräysy 2009), recently improved in our works (Nalepa and Czech 2012; Nalepa et al. 2014).

Guided ejection search is employed to minimize \(K\) at first, and then to create \(N\) feasible solutions (each containing \(K\) routes) (line 2). In GES, the search is started from a feasible solution in which each customer is served within a separate route (thus, \(K=M\)). Then, the algorithm repeatedly attempts to decrease \(K\) by one at a time. A route to be deleted is selected randomly, and the customers from this route are inserted into the ejection pool (EP), which contains unserved customers. Afterwards, the attempts of re-inserting the EP customers into the partial solution are undertaken. If there are no feasible (i.e., not violating capacity and time window constraints) insertions for a given customer taken from the EP, then the other customers from the partial solution are removed and inserted into the EP. GES executes until \(K=K_\mathrm{min}\) (see Sect. 2.1), or its computation time exceeds the limit \(\tau _K\). It is then executed until \(N\) solutions with \(K\) routes are found, or the execution time of this process surpasses the limit \(\tau _N\) (in this case, the solutions already found are copied and mutated—see Sect. 4.4—until \(N\) individuals are generated). The maximum computation time of minimizing \(K\) and generating the initial population is then \(\tau _I=\tau _K+\tau _N\), where \(\tau _K\) denotes the maximum time of minimizing \(K\), and \(\tau _N\) is the maximum time of generating \(N\) solutions.

4.2 Selection

The population of solutions is subsequently evolved in AMA-VRPTW to optimize \(T\) (lines 3–31). At first, \(N\) pairs (\(p_a,p_b\)) of individuals from the \(i\)th generation \(G_i\) are selected to create the generation \(G_{(i+1)}\), according to the selection scheme \(\mathcal {S}\) (Algorithm 1, line 4, see also Fig. 4). This selection scheme is adaptively determined during the optimization process (see Sect. 4.6). In this paper, we propose to combine the AB selection (AB), which has high exploration capabilities (Kawulok and Nalepa 2012; Nalepa and Czech 2013), with the scheme locally exploiting best individuals (we term it the local exploitation selection, LES) into the adaptive exploration–exploitation scheme (AE\(^2\)). AE\(^2\) adaptively determines the execution mode (either explorative or exploitative) based on the optimization progress.

Fig. 4
figure 4

Generation of a child solution in AMA-VRPTW. The repair procedure is executed only if the child is not feasible (rendered in light pink) (color figure online)

In AB, each individual \(p_{i}\), \(i\in \{1,2, \ldots , N\}\), is selected as \(p_{a}\) at first. Then, the individual \(p_i'\) is chosen as \(p_{b}\), such that \(p_i\ne p_i'\). Each individual can be selected once as \(p_a\), and once as \(p_b\). Clearly, this selection takes \(O(N)\) time. In LES, the population is sorted according to the fitness of the individuals (the lower \(T\), the higher fitness), and divided into \(\epsilon \) parts [it requires \(O(N\log N)\) time]. Then, \(N/ \epsilon \) pairs of parents are drawn and crossed-over for each population part to exploit them independently. AE\(^2\) dynamically switches between AB and LES to balance the exploration capabilities of the former scheme with the LES exploitation behavior (see Sect. 4.6 for details).

4.3 Crossover

For each pair of selected parent solutions \((p_a, p_b)\), a new individual \(p_c\) is generated using the edge assembly crossover operator (EAX) (Algorithm 1, line 8). This operator was introduced for the TSP (Nagata 2006), and later adapted to the CVRP (Nagata 2007). Originally, the EAX was defined for undirected graphs. Then, it was enhanced for directed graphs to handle time window constraints of the VRPTW (Nagata et al. 2010). Its operation [taking \(\mathcal{T}_\mathrm{EAX}(M)=O(M^2)\) time, where \(M\) is a number of customers in each parent (Blocho 2013)], is visualized in Fig. 5 [the figure is inspired by Nalepa and Blocho (2014)]. It is worth mentioning that a solution obtained using the EAX may be infeasible, and its feasibility needs to be restored (see Sect. 4.4).

Fig. 5
figure 5

Illustration of the EAX operator (Nagata et al. 2010) applied to \(p_a\) and \(p_b\) (solutions \(\sigma _a\) and \(\sigma _b\), respectively): a the graph \(G_a\) corresponding to \(\sigma _a\), b the graph \(G_b\) corresponding to \(\sigma _b\), c the union of edges from \(G_a\) and \(G_b\) (\(E_a\cup E_b\)), d the intersection of edges from \(G_a\) and \(G_b\) (\(E_a\cap E_b\)), e the edges from \((E_a\cap E_b)\) are removed from (\(E_a\cup E_b\)) to form \(G_{ab}\) (\((E_a\cup E_b){\setminus } (E_a\cap E_b)\)), f–h six AB-cycles (consisting of \(G_{ab}\) edges traces alternately—\(E_a\) edges are traced forwardly, and \(E_b\) edges reversely), i the intersection of \(E_a\) and the selected E-set (\(E_S\)) (a random AB-cycle); here we pick up the AB-cycle from h as the E-set, j the intersection of \(E_b\) and \(E_S\), k the intermediate solution with subroutes (\((E_a{\setminus }(E_a\cap E_S))\cup (E_b\cap E_S\))), l the graph \(G_c\) corresponding to the child \(p_c\) after applying local moves (see Sect. 4.4) to the intermediate solution k for removing the subroutes

4.4 Repair, education and mutation

The repair, education and mutation procedures are the hill-climbing methods based on traditional neighborhoods for the VRPTW (Potvin and Rousseau 1995; Kindervater and Savelsbergh 1997; Nagata et al. 2010). Let \(\mathcal {N}(\sigma )\) denote the neighborhood of \(\sigma \), obtained by applying the following operators (moves): 2-opt* (Fig. 6), out-exchange (Fig. 7), out-relocate (Fig. 8), in-exchange (Fig. 9), and in-relocate (Fig. 10). To decrease an extremely large neighborhood size, we consider \(N_{v_i}\) nearest (in the Euclidean metric) customers for each \(v_i\) (Nagata et al. 2010).

Fig. 6
figure 6

2-opt* operator applied to the routes \(r_{\alpha }\) and \(r_{\beta }\)

Fig. 7
figure 7

Out-exchange operator applied to the routes \(r_{\alpha }\) and \(r_{\beta }\)

Fig. 8
figure 8

Out-relocate operator applied to the routes \(r_{\alpha }\) and \(r_{\beta }\)

Fig. 9
figure 9

In-exchange operator applied to the route \(r_{\alpha }\)

Fig. 10
figure 10

In-relocate operator applied to the route \(r_{\alpha }\)

A solution \(\sigma _c\) (represented by \(p_c\)) may be infeasible, and it undergoes the repair. In this process, local search moves are performed to decrease the penalty term of the generalized cost function \(F_g(\sigma )\) (Nagata et al. 2010):

$$\begin{aligned} F_g(\sigma ) = T(\sigma ) + \beta _1 \cdot P_c(\sigma ) + \beta _2 \cdot P_{tw}(\sigma ), \end{aligned}$$
(11)

where \(T(\sigma )\) denotes the total travel distance of \(\sigma \), and \(P_c(\sigma )\) along with \(P_{tw}(\sigma )\) are the penalty components representing the violations of the capacity and time window constraints. \(P_c(\sigma )\) is the sum of the total capacity which exceeds in \(\sigma \), and \(P_{tw}(\sigma )\) denotes the sum of all time window violations. The analysis of the beta scaling coefficients suggested to set \(\beta _1=\beta _2=1.0\), and \(N_{v_i}=50\) (Nagata et al. 2010).

In the repair procedure, the subneighborhoods [denoted as \(\bigcup _{v \in r} \mathcal {N}(\sigma _c,v)\)] for each infeasible customer (from a random infeasible route \(r\) belonging to \(\sigma _c\)) are created at first. A new solution \(\sigma _c'\), \(\sigma _c'\in \bigcup _{v \in r} \mathcal {N}(\sigma _c,v)\), which minimizes the value of \(\left( \beta _1 \cdot P_c(\sigma _c) + \beta _2 \cdot P_{tw}(\sigma _c)\right) \), replaces the infeasible \(\sigma _c\). This process executes until \(\sigma _c\) is feasible, or there are no repair moves left.

If \(p_c\) is feasible, then it is educated. Here, only feasible moves improving the solution quality, i.e., decreasing \(T(p_c)\), are accepted. If there are no more improvement moves, then the education finishes. Afterwards, \(p_c\) is mutated by at most \(I_M\) moves (not violating the constraints). The best feasible child \(p_c^B\) is updated if \(T(p_c)>T(p_c^B)\) (Algorithm 1, line 9).

4.5 Adaptive number of children

The child solution inherits structure information from both parents (see Fig. 5). This inheritance strongly depends on the E-set selection process. Thus, creating a larger number of children (\(N_c>1\)) for each pair (\(p_a,p_b\)) is beneficial and increases the probability of obtaining a well-adapted individual. However, if \(N_c\) is very large, then the search convergence and computation time may be jeopardized and significantly slowed down since creating a feasible child takes \(O(M^2)\) time (Blocho 2013). Intuitively, the number of children should depend on the current optimization progress, since it is intrinsically dynamic and adaptive.

Here, we propose to keep generating child individuals \(p_c\) until a solution which is better (i.e., it has a shorter total travel distance \(T\)) than at least one of its parents is found (Algorithm 1, lines 10–12). This suggestion is based on the mentioned inheritance observation. More precisely, it means that the parent solutions could not be further improved by local refinement moves, and combining them with other (perhaps less-fitted) individuals is necessary to guide the search efficiently. Therefore, more global structure changes introduced by the EAX operator are crucial to escape from locally optimal solutions. Since crossing over two individuals does not guarantee obtaining a child better than the parents, we define the maximum number of children (\(N/2\)) which cannot be exceeded during the recombination process. This upper bound dynamically increases along with the increase of the population size \(N\). On the one hand, it maximizes the probability of exploiting (usually) more diversified individuals. On the other hand, this limit prevents from generating too many children which do not contribute to the population layout and will be discarded.

4.6 Adaptation

The recombination process, which is conducted for each pair (\(p_a,p_b\)), is followed by forming the next population (Algorithm 1, line 16). It depends on the current selection scheme \(\mathcal {S}\) in AE\(^2\) (see Sect. 4.2). In the case of AB selection, the best child \(p_c^B\), generated for a pair (\(p_a,p_b\)), replaces the parent \(p_a\) in \(G_{(i+1)}\), only if \(T(p_c^B)<T(p_a)\). In LES, \(N\) best solutions are selected to form \(G_{(i+1)}\) from the set of \(2\cdot N\) individuals, containing \(N\) best children and the current population \(G_i\) (\(N\) solutions). It is worth noting that in both cases the best individual (i.e., with the largest fitness) in the population survives. Finally, the best solution \(p^B\) found up to date is updated if it is necessary (line 16).

After creating a new population, the adaptation process is carried out. First, it is verified if the best solution has been improved since the last generation (line 17). If so, the current configuration of the AMA-VRPTW settings is kept for further exploitation. Also, the steady-state counter \(s\), indicating the number of consecutive generations without any improvement in the fitness of the best individual, is reset (line 18). Otherwise, if \(p^B\) has not been updated, \(s\) is increased (line 20).

In the proposed selection scheme (AE\(^2\)), AB and LES selections are dynamically switched between each other to balance both exploration and exploitation of the solution space. The selection scheme \(\mathcal {S}\) is changed to LES (it is AB at the beginning to explore the initial population, see line 1) for a better local exploitation of the subpopulations of size \(N/ \epsilon \) once \(s\) exceeds \(s_\mathrm{M}\) (line 22). Here, \(s_\mathrm{M}=N/4\) is the maximum steady-state selection counter. If \(s\) surpasses \(P=N/2\) (the maximum steady-state population counter), then \(\mathcal {S}\) is set back to AB, and \(\Delta N\) new individuals, where \(\Delta N=N_I\), are added to the current population, to explore new regions of the search space (line 24). Additionally, the counter \(s\) is reset after introducing new genetic material (line 25). Note that other mechanisms for introducing new individuals, e.g., the population re-generation process, are not employed in AMA-VRPTW, since the population diversity is increased while appending new individuals to the population.Footnote 1 It is worth noting that \(s_\mathrm{M}\) and \(P\) depend on the current population size \(N\). This approach allows for increasing the probability of crossing over a larger number of unique pairs of individuals in both explorative (AB) and exploitative (LES) schemes. Thus, the probability of obtaining a well-fitted individual inheriting valuable information from both parents grows.

Finally, the best individual in the previous generation (\(p_p^B\)) is updated (line 28), and the stopping condition is verified (line 29). The algorithm is terminated if its execution time exceeds the maximum time limit \(\tau \). Also, it can be stopped if \(p^B\) is not improved for a given number of consecutive generations, or if a solution of an acceptable quality is already found. Then, the best solution in the last generation (\(p^B\)) is returned (line 31). The crossover, repair, and education procedures are the most time-consuming parts of AMA-VRPTW, hence its time complexity is \(O(M^2)\).

5 Experimental results

5.1 Setup

Extensive experiments were conducted to investigate the performance of AMA-VRPTW, and to compare its efficacy with other state-of-the-art techniques. AMA-VRPTW was implemented in C++ language and run on a computer equipped with an Intel Core i7 2.3 GHz (16 GB RAM) processor. Its maximum execution time was limited by \(\tau =3.2\) min for Solomon’s set, and \(\tau =4.5\) min for Gehring and Homberger’s set (\(\tau \) includes \(\tau _I\)). The initial population is very small (\(N_I=10\), and \(\Delta N=N_I\)). In LES, we divide the population into two equinumerous parts (\(\epsilon =2\)). The maximum number of local moves in the mutation procedure is \(I_M=100\).

5.2 Datasets

AMA-VRPTW was tested on two classical benchmarks of large-scale VRPTW problem instances proposed by Solomon (1987), and Gehring and Homberger (1999). They became the standard sets for evaluating emerging algorithms to solve the VRPTW, since they reflect various real-life scheduling circumstances. All large-scale tests (in both sets) are split into subclasses, containing customers grouped into clusters (C subclass), dispersed randomly on the map (R subclass), and those containing a mix of both clustered and randomized customers (RC subclass). Among these subclasses, it is possible to distinguish problems with smaller vehicle capacities and considerably short time windows (C1, R1, and RC1), and those with larger vehicle capacities and longer scheduling horizons (C2, R2, and RC2). These characteristics strongly influence the structure of final solutions, e.g., a larger fleet is necessary to serve customers in the case of small truck capacities and tight time windows.

In each Solomon’s instance, there are \(M=100\) customers to serve, whereas in Gehring and Homberger’s set, there are problems with various \(M\)’s, where \(M\in \{200,400,600,800,1000\}\). The number of tests varies (from 8 to 12) between Solomon’s subclasses (56 instances in total). Each Gehring and Homberger’s subclass contains 10 problems (60 instances in total for each \(M\)). Tests are distinguished by their unique names: \(\alpha \gamma \) in Solomon’s set, and \(\alpha \_\beta \_\gamma \) in Gehring and Homberger’s set, where \(\alpha \) denotes the subclass (C1, C2, R1, R2, RC1, and RC2), \(\beta \) relates to \(M\) (2 for 200, 4 for 400, and so forth), \(\gamma \) is the test identifier (\(\gamma \in \{01,02,\ldots ,12\}\) for Solomon’s set, \(\gamma \in \{1,2,\ldots ,10\}\) for Gehring and Homberger’s set). In this study, we consider the entire Solomon’s set, and only 200-customer Gehring and Homberger’s instances.

We compare AMA-VRPTW with a number of state-of-the-art methods for solving the VRPTW. Table 1 summarizes the algorithms taken for comparison for Solomon’s and Gehring and Homberger’s sets (it is common that the authors report the results obtained using their algorithms only for one benchmark set). Also, we present the world’s best (currently known) results published at the SINTEF websiteFootnote 2 Finally, we report the sensitivity analysis on various AMA-VRPTW components followed by the two-tailed Wilcoxon test to verify statistical significance of the results. This study shows how these components influence the AMA-VRPTW performance, and how they contribute to the convergence capabilities of the proposed MA.

Table 1 Abbreviations of the state-of-the-art methods taken for comparison (S—Solomon’s set, GH—Gehring and Homberger’s set)

5.3 Creating the initial population

The first stage of AMA-VRPTW consists in minimizing the number of routes \(K\), and generating the initial population of \(N\) solutions (see Sect. 4 for more details). Here, we utilized GES (Nagata and Bräysy 2009), which has a relatively high time complexity \(O(M^{2.7})\), where \(M\) is the number of clients to serve (Blocho 2013). Hence, the maximum execution time \(\tau _I\) is imposed on this procedure. As already mentioned, if \(\tau _I\) is exceeded, then the algorithm is terminated and the solutions already found are copied and mutated until \(N\) individuals are generated. We generate a pool of \(20\cdot N_I\) solutions at first (within \(\tau _I\)). Solutions are taken from this pool when \(N\) is increased on the fly, as discussed earlier. If \(N>20\cdot N_I\) at some point during the optimization, then GES is run to generate new (missing) individuals.

Although the theoretical complexity of GES is significant, it runs very fast in practice, and the above-mentioned situation of copying and mutating already found solutions happened for less than \(2.6~\%\) of the considered instances. The average execution time \(\tau _A^K\) (out of \(200\) independent runs) of generating a single feasible solution (with \(K=K_B\), where \(K_B\) is the world’s best minimum \(K\)) is given in Table 2. For some subclasses (R1, R2, and RC1 for Solomon’s set, and R2 and RC2 for Gehring and Homberger’s set), we present the average time (\(\tau _E^K\)) excluding the most computationally intensive tests (Table 3). In most cases, the average time necessary for generating a solution with \(K=K_B\) is well below \(0.4\) s for both benchmarks (Table 2), and it is negligible compared with the execution time of AMA-VRPTW. Solving only four Solomon’s instances took more than 10 s on average (Table 3). If these tests are excluded from \(\tau _A^K\) for Solomon’s set, then it is \(\tau _A^K=0.29\) s. The results indicate that less-structured tests containing randomly scattered customers (R and RC subclasses) are more difficult to solve by GES in a short time. Since AMA-VRPTW is independent from the stage of generating the initial population of solutions, GES can be conveniently replaced by another, perhaps more efficient, route minimization algorithm without affecting the performance of AMA-VRPTW.

Table 2 Average time \(\tau _A^K\) (in s) of generating a feasible solution with \(K_B\) routes using GES (out of \(200\) runs) for Solomon’s and Gehring and Homberger’s sets (superscripts S and GH, respectively)
Table 3 Average time \(\tilde{\tau }_A^{K}\) (in s) of generating a feasible solution with \(K_B\) routes using GES (out of \(200\) runs) for the most time-consuming VRPTW instances

5.4 Comparison with other algorithms

We compare the performance of AMA-VRPTW with other state-of-the-art techniques mentioned in Sect. 5.2. The results are presented for each subclass (C1, C2, R1, R2, RC1, and RC2), for both benchmark sets. Each test (i.e., for each problem instance) was repeated \(5\) times, and the best results were averaged across subclasses (see Tables 4, 6). We indicate the processor on which a given algorithm was executed (P3, P4, Opt, Cent, and Xe stand for Pentium 3, Pentium 4, Opteron, Centrino and Xeon, respectively), along with its execution time \(\tau \) for one problem instance, including \(\tau _I\) [if a given method was run (\(x\)) times for a test, then the best result out of \(x\) executions was selected (\(1/x\)), and \(\tau =x\times \tau _s\), where \(\tau _s\) is the time of a single run]. The quoted computation times are difficult to compare directly due to different computer architectures used for experiments; however, they give a rough overview about the algorithms’ performance and behavior. For some techniques, the authors did not quote certain experimental settings. This is indicated by the “n/a” symbol in the appropriate column. Finally, the last rows in Tables 4 and  6 indicate the world’s best results. The results are given in a form \(K|T\), where \(K\) and \(T\) are the best minimum number of routes and the best minimum total travel distance found using the corresponding method, averaged for each subclass. Additionally, we show the best and the average AMA-VRPTW results for each instance separately (Tables 57).

Table 4 Comparison of the results obtained using various methods on Solomon’s VRPTW instances (\(100\) customers)
Table 5 The average and the minimum total travel distance (\(T_A|T\)) (out of \(5\) runs) obtained using AMA-VRPTW on Solomon’s VRPTW instances (\(100\) customers) (in boldface indicated \(T\)’s equal to the world’s best \(T_B\))
Table 6 Comparison of the results obtained using various methods on Gehring and Homberger’s large-scale VRPTW instances (\(200\) customers)
Table 7 The average and the minimum total travel distance (\(T_A|T\)) (out of \(5\) runs) obtained using AMA–VRPTW on Gehring and Homberger’s large-scale VRPTW instances (\(200\) customers) (in boldface indicated \(T\)’s equal to the world’s best \(T_B\))

For the Solomon’s tests (Table 4), a majority of the investigated state-of-the-art algorithms converged to the best-known \(K_B\). It is worth noting that solutions in which customers are served by a larger number of trucks are usually characterized by a shorter total travel distance. However, the main objective of the VRPTW is to minimize \(K\), thus these solutions are of a lower quality than those with a smaller \(K\). The most competitive results are delivered by the edge-assembly MA (EAMA), MA with the diversity management (MA-DM), and the proposed AMA-VRPTW. For EAMA, two variants of the algorithm were executed, with different population sizes (\(N=20{,}000/M=200\), where \(M\) denotes the number of customers, in EAMA\(^\alpha \), and \(N=100\) in EAMA\(^\beta \)) as suggested by Nagata et al. (2010). The results show that \(N\) significantly affects the algorithm performance. Similarly, all MA-DM parameters are fixed and need to be tuned before the execution. This is an important issue since the whole optimization process must be run multiple times to determine (i.e., to tune) adequate parameter values. Contrary to that, AMA-VRPTW adaptively controls its parameters during the search—it starts from a very small population, which is subsequently increased only if it is necessary. The results show that AMA-VRPTW matched the best-known solutions for almost all subclasses.

In Table 5, we report the detailed AMA-VRPTW results for Solomon’s benchmark, showing the average and the best travel distances, \(T_A\) and \(T\), respectively. For \(32\) (out of \(56\)) problem instances (\(57~\%\)) \(T_A\) matched \(T\), whereas for \(52\) tests (\(93~\%\)) AMA-VRPTW managed to find the best-known solution within \(5\) runs. It indicates high convergence capabilities of the algorithm, and this observation is confirmed by the maximum relative difference between \(T_A\) and \(T\), given as \(\delta _M=\max \{\delta ^{(\alpha \gamma )}\}\), where \(\delta ^{(\alpha \gamma )}=(T_A^{(\alpha \gamma )}-T^{(\alpha \gamma )})/T^{(\alpha \gamma )}\) for each problem instance \(\alpha \gamma \), which is \(\delta _M=1.3\cdot 10^{-2}\) for RC203. The subclasses with clustered customers are not only easy to solve with respect to the fleet size (Table 2), but they are also very efficiently optimized by AMA-VRPTW when the total distance is considered (see C1 and C2 in Table 5).

The results obtained for Gehring and Homberger’s benchmark tests are presented in Table 6, along with the detailed AMA-VRPTW results in Table 7. Although the search space is significantly larger here, C1 and C2 subclasses are solved successfully by most of the methods. However, subclasses containing randomized customers (especially with tight time windows) appeared to be challenging (see R1 and RC1 in Table 6) for both minimizing \(K\) and \(T\). Similarly, the MAs (EAMA, MA-DM, and AMA-VRPTW) deliver the best (and the most stable among different subclasses) results. Also, a branch-and-price-based neighborhood search (BPLNS) offers competitive results, yet its computation time is significantly (at least \(6.31{\times }\) compared with MA-DM) larger than the time of the mentioned evolutionary techniques. As remarked previously, EAMA and MA-DM parameters must be set beforehand, and each configuration requires a separate execution (e.g., for three different \(N\)’s, EAMA would require \(3\times 5\times 4.1=61.5\) min. in this scenario). AMA-VRPTW does not suffer from this drawback as it adapts itself on the fly.

The detailed results of AMA-VRPTW (Table 7) confirm that it is very efficient in solving problems with clustered customers, and all C1 and C2 tests were solved to the best-known optimum within \(5\) algorithm runs. In total, the proposed MA retrieved the world’s best results for \(29\) instances (\(48~\%\)), among which for \(9\) tests (\(15~\%\)) the minimum total travel distance \(T_B\) was gathered in every run. For this benchmark set, the average \(T_A\) values (out of \(5\) AMA-VRPTW runs) were close to the best results, what illustrate a good stability of the algorithm. The relative differences averaged for the subclasses (\(\delta _A^\alpha =\sum _{(\alpha \_\beta \_\gamma )}\delta ^{(\alpha \_\beta \_\gamma )}/10\), where \(\delta ^{(\alpha \_\beta \_\gamma )}\) denotes the relative difference for each instance \(\alpha \_\beta \_\gamma \) in a given subclass \(\alpha \)) are the largest in the case of RC1 and RC2 tests: \(\delta _A^{RC1}=2.0\cdot 10^{-2}\) and \(\delta _A^{RC2}=0.5\cdot 10^{-2}\).

AMA-VRPTW can be terminated once a solution of a desired quality has been found. Alternatively, the search may be finished if the best solution in the population is not improved for a number of consecutive generations \(g\). It usually means that the optimization process converged to a solution which is not likely to be improved further, if \(g\) is sufficiently large. In Table 8, we present the average convergence time \(\tau _c\) (excluding \(\tau _I\)), along with the average number of generations \(g_c\) in AMA-VRPTW, after which the travel distance of the best solution could not be decreased further. The results confirm that AMA-VRPTW is extremely efficient in solving instances with clustered customers (C1 and C2). The subclasses with wide time windows and larger truck capacities (C2, R2, and RC2) are, in general, more difficult to solve in the case of Solomon’s set, and take much more time (compared with C1, R1, and RC1 tests). The situation is opposite for Gehring and Homberger’s large-scale tests. Here, instances with tight time window characteristics (C1, R1, and RC1) appeared to be computationally intensive. Since the converge times \(\tau _c^\mathrm{GH}\) are very close to the imposed time limit \(\tau \), increasing AMA-VRPTW maximum execution time can help improve the best individuals in the next generations. Similarly, the number of generations necessary for converging to high-quality results increases for demanding tests (R2 and RC2 for Solomon’s set, C1, R1, and RC1 for Gehring and Homberger’s set).

Table 8 Average convergence time \(\tau _c\) (in s) and generation \(g_c\) (for Solomon’s and Gehring and 200-customer Homberger’s sets—superscripts S and GH, respectively)

5.5 Analysis and discussion on adaptiveness

In a majority of EAs, a fixed number of children \(N_c\), where \(N_c\ge 1\), is generated for each pair of parents. It is easy to see that creating a larger number of child solutions may be beneficial, especially for MAs, in which each individual undergoes an additional education procedure. However, if the process of generating a child is time consuming, then it may significantly slow down the search and affect the convergence capabilities of the algorithm. Therefore, selecting an optimal number of children \(N_c\) is of a high importance, and is not a trivial task. In AMA-VRPTW, we proposed to adaptively adjust \(N_c\) (see Sect. 4 for details), so as it can change in time. Here, we present the average number of children for Gehring and Homberger’s subclasses generated within \(g_c\) generations (\(g_c\) values are given in Table 8).

The results for all subclasses are depicted in Fig. 11. For difficult tests (with tight time windows), \(N_c\) grows slowly compared with the subclasses characterized by a longer scheduling horizon. It indicates that relatively small populations are exploited for a shorter time here, and generating more children does not help improve the quality of best individuals. Thus, the population size \(N\) adaptively grows to explore new regions of the search space by adding new genetic material. This increase of \(N\) is indicated by peaks in Fig. 11a, e.g., for C1.

Fig. 11
figure 11

The average number of children generated for each pair of parents for: a C1, R1, and RC1, and b C2, R2, and RC2 subclasses of the 200-customer Gehring and Homberger’s set

Once \(N\) is enlarged, the average \(N_c\) drops, since the probability of obtaining a better (i.e., with a shorter \(T\)) child than at least one parent rapidly increases (new individuals appended to the population are usually of a lower quality than those already optimized). For R2 and RC2 tests, \(N_c\) continuously grows without a fast increase of \(N\), since there are still high-quality neighboring solutions, and generating more children is advantageous (see Fig. 11b). Also, it affects the number of generations necessary to converge to the final solutions (see Table 8). Therefore, generating a large number of children is more exploitative and results in aggressive optimization of small populations. On the contrary, small \(N_c\)’s and more rapid increase of \(N\) expose an explorative behavior of AMA-VRPTW. The appropriate search scheme (i.e., more exploitative or explorative) is adaptively controlled according to the current state of the search in the proposed algorithm.

5.6 Sensitivity analysis on method components

In AMA-VRPTW, we introduced some new adaptive components to address the problem of setting numerous MA parameters dynamically. In this section, we analyze how these procedures contribute to the AMA-VRPTW performance and execution time for Gehring and Homberger’s tests with 200 customers. To determine the impact of each of these components, we defined several algorithm variants in which adaptive techniques for setting \(N\), \(N_\mathrm{c}\), and the selection scheme, are replaced by the baseline approaches. The investigated AMA-VRPTW variants are summarized in Table 9. Each test was repeated \(5\) times, and the best results were averaged across subclasses. The minimum total travel distance \(T\), along with the average convergence time \(\tau _\mathrm{c}\) and generation \(g_\mathrm{c}\), and the average time of processing a single generation \(\tau _A^g\), is given in Table 10 (the best \(T\) is indicated in boldface). As previously, \(K=K_B\) for each test.

Table 9 Abbreviations of the investigated MA variants—MA (\(N\), \(N_\mathrm{c}\), selection scheme); A stands for adaptive
Table 10 Comparison of the results (the minimum total travel distance \(T\), the average convergence time \(\tau _\mathrm{c}\) (in s), the average convergence generation \(g_\mathrm{c}\), and the average time of a single generation \(\tau _A^g\) (in s)) obtained using different algorithm variants

Each adaptive component applied separately in the MA significantly improves the results (see variants MA\(_2\), MA\(_3\) and MA\(_5\), compared with the baseline MA\(_1\) in Table 10). The adaptive number of children \(N_c\) and the population size \(N\) affect the convergence speed of the original MA by utilizing the incremental exploration of the solution space. Combining these two variants into MA\(_8\) helps further decrease the execution time and obtain higher-quality results. Also, the adaptive selection scheme (AE\(^2\)) offers better exploitation behavior when combined with the mentioned variants (MA\(_4\), MA\(_6\) and MA\(_7\)). Due to a small value of \(N_\mathrm{c}\) (\(N_\mathrm{c}=1\)) which was set a priori, small populations were not sufficiently exploited during the search (MA\(_6\) resulted in larger \(T\)’s). It confirms the necessity of setting \(N_\mathrm{c}\) on the fly to handle the current search state efficiently. Finally, AMA-VRPTW in which all the discussed adaptive techniques are applied resulted in the best travel distances for each subclass. It proves a good stability of AMA-VRPTW, and shows that it delivers best asymptotic results within the assumed execution time.

The algorithm variants with constant \(N=100\) and \(N_\mathrm{c}=20\) require significantly larger amount of time to process a single generation (see \(\tau _A^g\) for MA\(_1\) and MA\(_2\)). Since the adaptive selection is more exploitative, MA\(_2\) handles a single generation slower, but allows for an intensive search resulting in better solutions (see Table 10). Incorporating the adaptive techniques for \(N_c\) and \(N\) significantly decreases the computation time. It is easy to see that generating a single child for each pair of parents (MA\(_6\)) is very fast, but the quality of solutions obtained by this algorithm variant drastically drops. Finally, the proposed AMA-VRPTW not only can deliver very high-quality solutions, but also it is very efficient in terms of the computation time (e.g., it is more than \(13.3{\times }\) faster compared with the static MA, in which the parameters are fixed during the optimization—see AMA-VRPTW and MA\(_1\) for R2).

To verify the null hypothesis saying that “two variants of the MA (with adaptive and static parameters) lead to the same quality of final solutions”, we performed the two-tailed Wilcoxon test for each pair of the algorithm variants (see Table 11).Footnote 3 It is easy to see that it can be rejected with a high probability for AMA-VRPTW compared with other MA variants. This means that the increase of the solutions quality is statistically significant for the proposed adaptive MA. It is worth noting that the difference between MA\(_3\) (the MA with an adaptive scheme for determining the number of children), and some other adaptive MAs (MA\(_7\) and MA\(_8\)) is not necessarily statistically significant. However, the latter variants outperformed MA\(_3\) in terms of the execution time, and converged to high-quality solutions much faster (see Table 8 for more details). Also, the population size does not need to be specified for the adaptive algorithms prior to the optimization. This was a significant drawback of the MA\(_3\) variant leading to a very time-consuming tuning.

Table 11 The level of statistical significance obtained using the two-tailed Wilcoxon test for each pair of the MA variants: \(p\le x\), where \(x\) is the value given in the table, \(p\) denotes the \(p\) value, and no indicates that \(p>0.05\).

6 Conclusions and future work

In this paper, a new adaptive memetic algorithm (AMA-VRPTW) for solving the VRPTW has been proposed. AMA-VRPTW adaptively adjusts its various parameters, including the population size, the number of children generated for each pair of parents during the recombination process, and the selection scheme, according to the current state of the optimization. The problem of determining proper algorithm parameters before the execution is very difficult in practice, and requires a large computational effort to validate each set of parameters. This is a significant drawback of other state-of-the-art algorithms. A noteworthy feature of AMA-VRPTW is its capability of balancing the exploration and exploitation of the search space. In AMA-VRPTW, the exploration of \(N\) individuals is followed by their intensive exploitation.

The extensive experimental study conducted for two standard benchmark sets proves the high convergence capabilities of AMA-VRPTW, and shows that it not only offers high-quality results but also executes very fast. Since AMA-VRPTW converges to high-quality solutions extremely fast, it can be applied to commercial (real-time) applications in which travel costs are dynamic—they are updated according to the traffic information. We performed the sensitivity analysis, and demonstrated how various algorithm components influence the final results and the optimization process. The two-tailed Wilcoxon test showed the statistical significance of the results obtained using the considered variants of AMA-VRPTW with certain adaptive components switched off and on.

Our ongoing research is focused on incorporating the proposed adaptive algorithm into our parallel framework (Nalepa and Blocho 2014). We aim at conducting the experiments for full Gehring and Homberger’s benchmark set (i.e., for each number of customers) using the adaptive parallel MA. Also, we work on new adaptive co-operation schemes of parallel processes to guide the search more efficiently. Finally, we plan to enhance local refinement procedures applied for optimizing the already-found solutions during the education process to improve the performance of AMA-VRPTW for instances with tight time windows. Another direction of our future work encompasses designing a self-adaptive MA which will evolve its parameters with time. Finally, we plan to apply AMA-VRPTW to other complex vehicle routing problems, especially the pickup and delivery problem with time windows.