Capacitated vehicle routing problem with pick-up and alternative delivery (CVRPPAD): model and implementation using hybrid approach

The paper presents an optimization model and its implementation using a hybrid approach for the Capacitated Vehicle Routing Problem with Pick-up and Alternative Delivery (CVRPPAD). The development of the CVRPPAD was motivated by postal items distribution issues. The model proposed combines various features of Vehicle Routing Problem variants. The novelty of this model lies in the introduction of alternativeness of item delivery points, differentiation of delivery point types in terms of their capacity (parcel lockers) and possibility of collecting the items during the execution of delivery routes. The model also takes into account a possibility of introducing time windows related to delivery time. The proposed data structure in the form of sets of facts facilitates the implementation of the model in all environments, Constraint Logic Programming (CLP), Mathematical Programming (MP), metaheuristics, databases, etc. The model is implemented in the MP, hybrid CLP/MP, and hybrid CLP/heuristic environments. The hybrid CLP/MP approach is the authors’ original solution, which has already been used to solve Supply Chain Management problems, scheduling problems, routing problems etc. For large size problems, considering their combinatorial character, the proposed CLP/MP approach is ineffective. Its effectiveness will improve when MP is replaced by a heuristic. All implementations were performed on the same data instances (facts), which made it possible to compare them according to the solution search time, number of decision variables and number of constraints. The directions into which the model can be further developed were also presented.


Introduction
Observed in the last 10 years, fast development of information technologies, online services and mobile applications has resulted in a significant growth of e-commerce segment. The base of the European e-commerce customers who have ordered goods or services over the Internet for private use (2014) ranges from 15% in Bulgaria, 30% in Poland and Latvia and more than 75% in the UK and Denmark (Eurostat http://ec.europa.eu/eurostat/statisticsexplained/index.php/Main_Page). Despite rapid expansion, there is still room for further development and the e-commerce is rising in impact (Eurostat http://ec.europa.eu/eurostat/ statistics-explained/index.php/Main_Page). This impact has already had its effect in the area of postal items distribution. E-commerce, enjoying no limits of time and space, increased the number and volume of international postal items. Postal service providers are required to provide high quality, efficient and reliable services.
Another element, outside the global e-commerce, that affects the postal service market is the emergence of a number of postal and courier service operators and a declining market share of local operators. This process started more than 20 years ago in Western Europe and about 10 years ago in the east European countries.
Rising competition among postal operators has contributed to the development of new types of services, such as parcel lockers, mail tracking systems with real-time tracking information sent to a customer's mobile, etc. Universal service providers have undergone major organizational changes. Currently, RFID tags for item-level tracking are being looked at as an alternative technology to barcodes. The main advantage of this technology is that it is easy to automate data capture process at shipment and sorting hubs.
That said, these changes have failed to solve or even deepened existing problems distributors have to face with respect to the so-called first and last mile (Zellner et al. 2016) in their supply chains. These problems are related to finding the optimal solution in terms of cost and time for both delivery and collection of postal items to/from end customers. And today's definition of a customer may include an individual (home delivery), parcel lockers or a postal outlet.
The main motivation of this research was to build a model for the optimization of postal items distribution (letter and parcel distribution with the use of universal couriers), which would take into account certain currently existing conditions and limitations. The conditions are different from those in the previous models (VRPs, CVRPs, etc.). These new conditions include: a new type of customer with limited capacity (parcel lockers), an opportunity to take alternative delivery points, one point of delivery supported by several couriers, delivery and pick up at the same time and etc. For solving this model, an innovative, original hybrid approach is proposed, which gives a far greater modeling flexibility and efficiency [already tested in modeling and optimization of SCM ), 2E-CVRP (Sitek 2014) etc.].
The rest of this paper is structured as follows. Section 2 presents the literature review concerning VRPs. Description and formalization of the presented problem is described in Sect. 3. Section 4 explains the proposed implementation approach based on integrated CLP/MP and CLP/heuristic environments. The computational results for numerical experiments are presented in Sect. 5. A summary of conclusions and future works is presented in Sect. 6.

Vehicle routing problems: literature review
Various forms of VRPs occur in the field of product distribution/shipments. Solving these problems within acceptable time and optimum costs has become a key issue in modern distribution. In its basic form, a VRP is defined as a problem which answers the question "What is the optimal set of routes for a set of vehicles/fleet/transportation modes to travel in order to deliver to a given set of customers?" This is a combinatorial integer optimization problem (Panos et al. 2013). The VRP objective is generally to minimize route cost. Objective functions could vary with particular variants and applications. The most common objectives are: • to minimize all transportation cost associated with the used means of transport (e.g. vehicles) as well as the distance travelled; • to minimize the number of means of transport (e.g. vehicles) needed to cover all delivery points; • if the estimated travel time and vehicle load have been exceeded, to minimize this overrun.
The VRPs find many applications in real-life but generally concern the services of delivery companies. A detailed description of a VRP is as follows: • The items are delivered from a depot (one or more).
• A set of vehicles is operated by a set of drivers/couriers. • Given is the road/train network.
• Given is a set of delivery points where the items are delivered.
The problem is to determine the set of vehicle routes. Each route for each vehicle should start and end at the proper depot. The road network can usually be described using a graph.
Several VRP variants exist (Jairo et al. 2015;Kumar and Panneerselvam 2012;De Jaegere et al. 2014): • VRPPD (Vehicle Routing Problem with Pickup and Delivery): In this variant, a number of items need to be moved from certain pickup points to other delivery points. The VRPPD objective is to find a set of optimal routes for the means of transport to visit the drop-off and pickup points. The most often used methods and approaches for solving VPRs can be divided into exact approaches (mathematical programming, integer programming, etc.), heuristics, constructive methods, two-phase algorithms and metaheuristics (ant algorithms, constraint programming, genetic algorithms, tabu search, simulated annealing etc.) (Yeun et al. 2008;Archetti and Speranza 2014).
The exact methods used for VRPs include mainly the Branch-and-Bound algorithm and its variants e.g., Branch-and-Price, Branch-and-Cost, and Branch-Cut-and-Price. The Branch-Cut-and-Price exact algorithm was used in Ropke et al. (2007) for a CVRP with twodimensional loading constraints. In Gutiérrez-Jarpa et al. (2010), the exact Branch-and-Price algorithm was proposed for solving a multiple vehicle routing problem with time window-VRPTW. Numerous exact column generation or Dantzig-Wolfe decomposition algorithms were proposed that can accommodate complex constraints and time-dependent costs (Azi et al. 2010;Rousseau et al. 2004). None of those methods has proved capable of dealing with solving VPRs of appreciable size at acceptable time, hence the need to use approximate methods in the form of heuristics and metaheuristics. Among multiple heuristics dedicated to individual VRPs, the most important include the cluster-first, route-second (Fisher and Jaikumar 1981), neighborhood search heuristics to optimize the planned routes of vehicles in the context where new requests, with a pick-up and a delivery location occur in real time (Gandreau et al. 2006), a route construction heuristics with an adaptive parallel scheme (Peng 2011), Granular Tabu Search (GTS) (Toth and Vigo 2014), etc. Nearly all of these methods are heuristic and metaheuristic approaches due to the NP-hardness of the VRP. The Constraint Logic Programming (CLP) (Apt and Wallace 2006;Rossi et al. 2006) approach to many problem types involves building a solution incrementally, backtracking when infeasibility is detected, until a solution is found or the problem is proven to have no solution. This approach can be applied to a variety of VRPs, but it is usually too inefficient to deal with real-world cases. In most real-world cases, the existence of a solution is never in doubt. The quality of the solution is essential and, therefore, CLP is usually used to solve VRP sub-problems or evaluate the feasibility of routes and time slots, available capacity etc. (Rossi et al. 2006).
In some situations, when an exact (optimal) solution is needed, exact methods are used, supported by some heuristics or metaheuristics. Metaheuristics can be applied to finding initial solutions or as presolving methods for narrowing solution spaces or eliminating infeasible solutions. In such cases we can talk about hybrid methods. Motivation behind this work was to construct a reference model for the problem of postal item distribution to final delivery points through universal couriers.
In addition to building the reference model, this contribution includes the implementation and solution of the model with the use of the hybrid approach that applies CLP for initial solving and MP or heuristics for finding the final optimal solution. The universal information structure, based on the sets of facts, was also proposed for the reference model. The structure can be applied to the entire class of VRPs and implemented with ease as databases, XML flat files, etc.

Capacitated vehicle routing problem with pick-up and alternative delivery (CVRPPAD): problem description
The presented problem can be described as a variant of VRP with an additional possibility of having means of transport for delivery and pick-up. The capacities of the means of transport and some of the delivery points are taken into account. Delivery points are represented by a postal outlet, an individual customer or a parcel locker with a specified capacity at a given time. The problem assumes alternative delivery points, a characteristic feature of parcel locker locations. Couriers are universal in that they can serve any delivery point type and do pickups and deliveries. The problem can be defined as the Capacitated Vehicle Routing Problem with Pick-up and Alternative Delivery (CVRPPAD). The delivery network for the CVRPPAD is shown in Fig. 1. The objective is to minimize the distances for couriers to travel and also the "penalty" for delivering items to alternative points. This is the most obvious objective function chosen for practical reasons, but other options are possible, for example, the number of trips/couriers or the shortest delivery time, etc.
• A vehicle may perform no more than one trip in a planning period.
• Vehicles' capacity constraints are imposed.
• Parcel lockers' capacity constraints are imposed. • Alternative delivery locations are possible.
• Each route between delivery points has a specified travel time and the overall travel time length cannot be greater than the pre-set travel time length. • Items cannot reloaded.
• Each courier's route starts from and ends at the depot.
• Note-No constraints are imposed on route length, number of delivery points on the route, customers' priorities, however the model is flexible enough to add these constraints if needed.
It has to be emphasized that three of the characteristics above make the formulation of this problem different from the existing VRP variants. The differences are introducing various delivery point types, accounting for the capacity of one delivery point type (parcel lockers) and using alternative delivery points. These three elements are dependent on today's new conditions of delivery services, in particular in urban areas, where delivery points called packer lockers are being introduced (Faugere and Montreuil 2016).

Problem formulation
Most of VRPs and their variants are modeled as integer linear program (ILP) problems with two-index or rarely with three-index decision variables for the commodity flow (Nagy et al. 2015). According to the assumptions made, the presented problem (Sect. 3) is modeled as a binary linear program (BLP) problem with three-index and four index decision variable formulations. For example, variables X cpj specify whether arc ( p, j) is traversed by a particular courier c or not; variables Y cpji specify whether arc ( p, j) is traversed by a particular courier c with item i or not. Table 1 shows the indices, parameters and decision variables of the model. The sum of distances for couriers to travel and the "penalty" for delivering items to alternative delivery points were adopted as the objective function (1). The objective function is minimized.
The model has a set of constraints that define the space of feasible solutions. The proposed set of constraints (2)-(15) satisfies the assumptions made (Sect. 3) and can be regarded as the reference set for a broad class of problems derived from the VRP. Some of these constraints may be removed or adequately parameterized for specific VRP variants. For example, constraint (11) is responsible for the so-called time windows, thereby if T takes a very high value or is removed from the set, the problem will be considered without the time windows, etc. The meanings of the constraints are detailed in Table 2. Y cpji = E ic ∀c ∈ C,p ∈ P,j ∈ P,i ∈ I

Implementation
Due to the character of the proposed model (BLP), mathematical programming (MP) provides a natural environment for its implementation. A number of solvers are available, both commercial (LINGO, CLPEX and free of charge (SCIP, LP_Solve), which use MP methods such as simplex, branch&bound, branch&price, etc. (Schrijver 1998). These methods are exact methods, which, taking into account a binary character of decision variables and characteristics of VRPs (NP-hard), renders them inefficient especially in the case of real data instances of larger sizes. Thus based on their previous experience in solving similar problems Sitek 2014; Wikarek 2015b), the authors propose a hybrid approach to the implementation and solving (optimization) of the model (1)-(15). Here, the hybrid approach involves combining two environments, MP and CLP, in the following way. The CLP environment with built-in mechanisms for solving constraints (e.g., constraint propagation, backtracking, etc.) Apt and Wallace (2006) and Rossi et al. (2006) is used in the presolving phase. In this phase, the values of some of the decision variables can be established, the domains of other variables can be narrowed and some constraints can be aggregated and transformed before the actual solving process starts. The presolving phase diagram for the model (1)-(15) is shown in Sect. 4.2 (Fig. 3). The model is solved in the second phase with the use of an MP method. Another element of the implementation is the design of a suitable information structure for the model (Sect. 4.1). The universal information structure allows integrating the model implementation with equivalent commercial environments Enterprise Resource Planning (ERP), Distribution Resources Planning DRP), Warehouse Management System (WMS), Transportation Management System (TMS) and implementing the model with the use of data bases or XML files. The information structure is presented in the form of sets of facts, as in Fig. 2. The hybrid approach with CLP used for presolving is a universal idea and can be combined with other environments outside MP, such as Genetic Algorithm (GA), Ant Colony Optimization ACO, etc.

Information structure-the sets of facts
The information structure for model (1)-(15) is represented by the sets of facts. A fact is the simplest predicate in the declarative approach (Apt and Wallace 2006). It consists of a single atomic expression and all of its arguments are constants. It can be interpreted in the way a relation is interpreted in a relational approach. The fact can be represented by, for example: Person(ID,forename,surname,age), Vehicle(Registration_numbe, Capacity, Fig. 2 The structure and relationships between set of facts for reference model Production_date), etc. It has key and descriptive attributes. The key attributes are used to determine the instance of a given fact. It is relatively easy to transform a set of facts into a set of tables in the relational database or a set of XML files. Fig. 2 shows a diagram of the structure of facts and their relationships.

Presolving
Presolving is used to reduce the dimensions of the model and, consequently, provides a possibility of solving other large-size models within acceptable time. Figure 3 shows the diagram outlining the presolving stages for the (1)-(15) model. In the first stage, the facts F_item, F_delivery are transformed. All postal items can be grouped according to a category, e.g., a delivery point and an item type, which reduces the number of postal items to handle (groups instead of single postal items are considered). In the next stage, parameter (de i p ) is used to establish which items (groups) have a delivery point alternative. After the analysis of this variable, some of decision variables Z i p take the value of 0 or 1, whereas the remaining variables that can take the value 1 and 0 are not established at this stage (their values are established during the optimization stage). On the basis of constraints (6) and (12), the values of those decision variables Y cpji for which Z i p have been established in the earlier stage are determined. The final presolving stage involves determining the values of X cpj on the basis of constraints (3) and (4) and decision variables Y cpji of pre-established values.
Obviously, the presolving technique allowed determining, before the actual solving process (optimization), the values of some decision variables on the basis of facts and some constraints, thereby reducing the number of variables for the ultimate solving process (Table 4a, b, Sect. 5). In practice, particular presolving stages were executed with the use of adequate CLP predicates. This presolving method implemented using the CLP can be hybridized with other methods, both exact (Yeun et al. 2008) and metaheuristics (Archetti and Speranza 2014).

Heuristic for solving CVRPPAD
For the problems of larger sizes, considering their combinatorial character, the proposed hybrid approach which integrates MP and CLP is insufficiently effective. Therefore, a heuristic is proposed (Fig. 4), which can replace MP in the hybrid approach. The heuristic is dedicated to the structure and properties of problems such as CVRPPAD. It does not guarantee finding an optimal solution, but in combination with CLP, it provides an effective and efficient tool. The heuristic is characterized by three selection criteria/priorities for R1, R2, R3 parameters (Table 3). Being very flexible, this approach can be used according to the character of data. The travelling salesman problem was solved with the known from the literature variants of NN (Nearest Neighborhood) methods (Gandreau et al. 2006;Peng 2011;Regoa et al. 2011).
In short, the main idea of the heuristic algorithm (Fig. 4) is that in the first step, a courier is chosen based on the R1 criterion and the deliveries and their recipients are determined based on criteria R2 and R3. In the next step, the route for the courier is set (in accordance with the NN method).
The heuristic can be used for solving CVRPPAD in two ways, either directly or as an element of the hybrid approach, in which it will replace the MP solver. Its unquestionable Create list L 1 for i∈I (for all items) Create list L 2 for c∈C (for all couriers) While list L 1 is not empty do List L 2 empty STOP -no feasible solution found According to a certain criterion R1 select courier c from the list L 2 Delivery points on the route Tr={∅} While the free capacity of the courier c (with a certain tolerance capacity) do According to a certain criterion R2 select delivery point p∈P Select items for delivery point p∈P from list L 1 Sort item by criteria R3 Add to the list L 3 as many items from the beginning of the sorted list, so as not to exceed the free capacity of the courier c Reduce the available capacity of the courier c by the amount of added items Select items from delivery point p∈P from list L 1 Sort item by criteria R3 Add to the list L 3 as many items from the beginning of the sorted list, so as not to exceed the free capacity of the courier c Reduce the available capacity of the courier c by the amount of added items Remove from list L 1 item in the list L 3 Add a point p to route Tr Solve the traveling salesman problem, determine the sequence of delivery points on the route Tr Remove from list L 2 courier c STOP -feasible solution found  advantage consists of the reduced computation time and the possibility of solving the models of larger sizes within acceptable time. The heuristic used for solving CVRPPAD yields optimal or approximate (from 0 to 150% worse than optimal) solutions. When used in the hybrid approach, it reduces the computation time considerably and improves the quality of approximate solutions (0-10% worse than optimal) (Sect. 5 Table 4b).

Numerical experiments
In order to verify the proposed model as well as evaluate the hybrid approach, we made a number of computational experiments (P1…P12) with instances of the facts contained in    Table 4a, b and the detailed results for P1, P2, P3 and P8 in Table 5 (Appendix B). The optimal solution (hybrid-based approach) for P8 is shown in Fig. 5 and the feasible solution (MP-based approach) in Fig. 6 and in Table 6 (Appendix B). From these data, it follows that the use of the hybrid1/hybrid2 approach and heuristics made it possible to find a solution in a much shorter time.
Analysis of the results clearly shows the superiority of hybrid approach. The hybrid approach (hybrid1) as an exact method reduces calculation time by the order of 2 to 65 times compared to the MP method. However, using different solvers, MP is not so significant. SCIP is approximately 20% more effective than LINGO.
The hybrid approach (hybrid2) provides double reduction in the computation time and improves the quality of approximate solutions (0-10% worse than optimal) in relation to heuristics (the quality of approximate solutions are 0-150% worse than optimal).
In the second stage of the experiment, time windows were implemented for example P8. The optimal solution is shown in Fig. 7 and in Table 7 (Appendix B). The proposed model provides daily decision support in planning the routes of couriers with minimal costs, optimal allocating items to the couriers, determining daily requirement for couriers, etc.

Conclusions
This paper introduced a new VRP variant called CVRPPAD (Capacitated Vehicle Routing Problem with Pick-up and Alternative Delivery), a crucial tool for postal items distribution, city logistic, etc. The CVRPPAD has unique features that distinguish it from other variants of the VRPs (Sect. 3). The most important characteristics include taking into account the capacity of delivery points and alternative locations. These changes are due to the inclusion The model was tested with the classical MP environment, "LINGO" and "SCIP", with the proposed hybrid approach combining two environments, MP and CLP (Bockmayr and Kasper 2004;Milano and Wallace 2010;Sitek and Wikarek 2016;Hooker 2002;Sitek and Wikarek 2015a;Silva 2001), and with hybrid approach combining CLP and proposed heuristics (Sect. 4.3). Declarative CLP was used to presolve the model. MP and heuristics were used for the final model solving (optimization). The use of this integrated approach has reduced the size of the model by the factor of almost 10, thus reducing significantly the optimization time and, for the larger examples, finding the solution within acceptable time span, as opposed to the MP implementations. The proposed hybrid approach, the presolving method in particular, can be used for the integration with heuristics and metaheuristics necessary to solve the CVRPPAD model of industrial size.
The proposed model and method of its solution can be widely implemented in information management systems of postal items distribution. For this purpose, a universal information structure is proposed in the form of sets of facts that are easily integrated with the databases. Further research will follow two directions.
The model will be expanded to cover a route length, number of points on the route, items prioritization, lead times etc. (Nielsen et al. 2014b;Nielsen et al. 2014a) and implementation in the cloud (Deniziak et al. 2013). The model is planned to be enriched with fuzzy logic (Bocewicz et al. 2016).
The authors declare that there is no conflict of interests regarding the publication of this paper.
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.