A Hybrid Approach to the Optimization of Multiechelon Systems

In freight transportation there are two main distribution strategies: direct shipping and multiechelon distribution. In the direct shipping, vehicles, starting from a depot, bring their freight directly to the destination, while in the multiechelon systems, freight is delivered from the depot to the customers through an intermediate points. Multiechelon systems are particularly useful for logistic issues in a competitive environment. The paper presents a concept and application of a hybrid approach to modeling and optimization of the Multi-Echelon Capacitated Vehicle Routing Problem. Two ways of mathematical programming (MP) and constraint logic programming (CLP) are integrated in one environment. The strengths of MP and CLP in which constraints are treated in a different way and differentmethods are implemented and combined to use the strengths of both.The proposed approach is particularly important for the discrete decision models with an objective function and many discrete decision variables added up in multiple constraints. An implementation of hybrid approach in the ECLiPSe system using Eplex library is presented. The Two-Echelon Capacitated Vehicle Routing Problem (2E-CVRP) and its variants are shown as an illustrative example of the hybrid approach.The presented hybrid approach will be compared with classical mathematical programming on the same benchmark data sets.


Introduction
In the modern freight transportation there are two main distribution strategies: direct shipping and multiechelon distribution.In the direct shipping, vehicles, starting from a depot, bring their freight directly to the destination, while in the multiechelon systems, freight is delivered from the depot to the customers through an intermediate point.
The majority of multiechelon systems presented in the literature usually explicitly consider the routing problem at the last level of the transportation system, while a simplified routing problem is considered at higher levels [1].
In recent years multiechelon systems have been introduced in different areas: (i) logistics enterprises and express delivery service companies under competitions; (ii) hypermarkets and supermarkets products distribution; (iii) multimodal freight transportation; (iv) supply chains; (v) delivery in logistic competition; (vi) E-commerce and home delivery services under competitions; (vii) city and public logistics.
The vast majority of models of optimization in freight transportation and logistics industry have been formulated as the mixed integer programming (MIP) or mixed integer linear programming (MILP) problems and solved using the operations research (OR) methods [2].Their structures are similar and proceed from the principles and requirements of mathematical programming (MP) [2,3].
Unfortunately, high complexity of decision-making models and their integer nature contribute to the poor efficiency of OR methods.Therefore a new approach to solving these problems was proposed.As the best structure for the implementation of this approach, a declarative environment was chosen [4,5].
It seems that better results will be obtained by the use of the declarative constraint programming paradigms (CP/CLP) especially in modeling.The CP-based environments have advantage over traditional methods of mathematical modeling in that they work with a much broader variety of interrelated constraints and allow producing "natural" solutions for highly combinatorial problems.
The main contribution of this paper is hybrid approach (mixed CP with MP paradigms) to modeling and optimization of the Multi-Echelon Capacitated Vehicle Routing Problems or the similar vehicle routing problems.In addition, some extensions and modifications to the standard Two-Echelon Capacitated Vehicle Routing Problems (2E-CVRP) are presented.
The paper is organized as follows.In Section 2 the literature related to Multi-Echelon Vehicle Routing Problems has been reviewed.Next section is about our motivation and contribution.In Section 4 the concept of hybrid approach to modeling and solving and the solution hybrid framework have been presented.Then, the general description of Multi-Echelon Vehicle Routing Problems and mathematical model of 2E-CVRP has been discussed.Finally test instances for 2E-CVRP with extension variants and some computational results were discussed in Section 6.

Literature Review
The Vehicle Routing Problem (VRP) is used to design an optimal route for a fleet of vehicles to serve a set of customers' orders (known in advance), given a set of constraints.The VRP is used in supply chain management in the physical delivery of goods and services.The VRP is of the NP-hard type.
Nowadays, the VRP literature offers a wealth of heuristic and metaheuristic approaches, which are surveyed in the papers of [6,7] because exact VRP methods have a size limit of 50-100 orders depending on the VRP variant and the timeresponse requirements.
There are several variants and classes of VRP like the capacitated VRP (CVRP), VRP with Time Windows (VRPTW), and Dynamic Vehicle Routing Problems (DVRP), sometimes referred to as Online Vehicle Routing Problems and so forth [6].
Different distribution strategies are used in freight transportation.The most developed strategy is based on the direct shipping: freight starts from a depot and arrives directly to customers.In many applications and real situations, this strategy is not the best one and the usage of a multiechelon and particular two-echelon distribution system can optimize several features as the number of the vehicles, the transportation costs, loading factor, and timing.
In the literature the multiechelon system and the twoechelon system in particular refer mainly to supply chain and inventory problems [1].These problems do not use an explicit routing approach for the different levels, focusing more on the production and supply chain management issues.The first real application of a two-tier distribution network optimizing the global transportation costs is due to [8] and is related to the city logistics area.They developed a two-tier freight distribution system for congested urban areas, using small intermediate platforms, called satellites (intermediate points for the freight distribution).This system is developed for a specific situation and a generalization of such a system has not already been formulated.The complete mathematic model of The Two-Echelon Capacitated Vehicle Routing Problem (2E-CVRP) with the solution for sample test data in the classical approach has been proposed by [7], complemented with the method for boosting the computing efficiency (see Section 5).
The increasing role of supply chains and their urban parts evokes a need to focus greater attention on this issue in modeling and efficient optimization methods, in particular.
An integrated approach of constraint programming/ constraint logic programming (CP/CLP) and mixed integer programming/mixed integer linear programming (MIP/MILP) can help to solve optimization problems that are intractable with either of the two methods alone [13][14][15].Although Operations Research (OR) and Constraint Programming (CP) have different roots, the links between the two environments have grown stronger in recent years.
Approaches known from the literature are based mostly on the division of the main problem into sub-problems and iteratively solving each of them in the proper CP/CLP or MP/MILP technique.This is usually a collection of many local optimization points of feasible solutions.Other approaches are based on a "blind" transformation for the CLP to the MILP model.In most cases, this results in an explosion of the number of constraints and variables, which has a negative impact on the effectiveness of optimization.In the proposed hybrid approach, a very important element is the transformation of the initial problem and its solution in the field of domains, which takes place in CP/CLP environment.Then the converted and "slimmed down" problem is solved in the MILP environment, thus creating a global approach to optimization [14,16].
Both MIP/MILP and finite domain CP/CLP involve variables and constraints.However, the types of the variables and constraints that are used, and the way the constraints are solved, are different in the two approaches [13,15].
MIP/MILP relies completely on linear equations and inequalities in integer variables; that is, there are only two types of constraints: linear arithmetic (linear equations or inequalities) and integer (stating that the variables have to take their values in the integer numbers).In finite domain CP/CLP, the constraint language is richer.In addition to linear equations and inequalities, there are various other constraints such disequalities, nonlinear and symbolic (alldifferent, disjunctive, cumulative, etc.) constraints.In both MIP/ MILP and CP/CLP, there is a group of constraints that can be solved with ease and a group of constraints that are difficult to solve.The easily solved constraints in MIP/MILP are linear equations and inequalities over rational numbers.
Integer constraints are difficult to solve using mathematical programming methods and often the real problems of MIP/MILP make them NP-hard.
In CP/CLP, domain constraints with integers and equations between two variables are easy to solve.The system of such constraints can be solved over integer variables in polynomial time.The inequalities between two variables, general linear constraints (more than two variables), and symbolic constraints are difficult to solve, which makes real problems in CP/CLP NP-hard.This type of constraints reduces the strength of constraint propagation.As a result, CP/CLP is incapable of finding even the first feasible solution.
Both environments use various layers of the problem (methods, the structure of the problem, data) in different ways.The approach based on mathematical programming (MIP/MILP) focuses mainly on the methods of optimization and, to a lesser degree, on the structure of the problem.However, the data is completely outside the model.The same model without any changes can be solved for multiple instances of data.In the approach based on constraint programming (CP/CLP), due to its declarative nature, the methods are already built-in.The data and structure of the problem are used for its modelling in a significantly greater extent.
To use so much different environments and a variety of functionalities such as modeling, optimization, and transformation, the declarative approach was adopted.
The motivation and contribution behind this work were to create a hybrid method for constrained decision problems modelling and optimization instead of using mathematical programming or constraint programming separately.
It follows from the above that what is difficult to solve in one environment can be easy to solve in the other.
Moreover, such a hybrid approach allows the use of all layers of the problem to solve it.In our approach, to modelling and optimisation, we proposed the environment, where: (i) knowledge related to the problem can be expressed as linear, logical, and symbolic constraints; (ii) the optimization models solved using the proposed approach can be formulated as a pure model of MIP/MILP or of CP/CLP, or it can also be a hybrid model; (iii) the problem is modelled in the constraint programming environment by CLP-based predicates, which is far more flexible than the mathematical programming environment/very important for decisionmaking problems under competitions; (iv) transforming the decision model to explore its structure has been introduced by CLP-based predicates; (v) constrained domains of decision variables, new constraints, and values for some variables are transferred from CP/CLP into MILP/MIP/IP by CLP-based predicates; (vi) optimization is performed by MP-based environment.
As a result, a more effective hybrid solution environment for a certain class of decision and optimization problems (2E-CVRP or similar) was obtained.

A Hybrid Solution Framework for Capacitated Vehicle Routing Problems (HSFCVRP)
Both environments have advantages and disadvantages.Environments based on the constraints such as CLPs are declarative and ensure a very simple modeling of decision problems, even those with poor structures if any.In the CLP a problem is described by a set of logical predicates.The constraints can be of different types (linear, nonlinear, logical, binary, etc.).The CLP does not require any search algorithms.This feature is characteristic of all declarative backgrounds, in which modeling of the problem is also a solution, just as it is in Prolog, SQL, and so on.The CLP seems perfect for modeling any decision problem.
Numerous MP models of decision-making have been developed and tested, particularly in the area of decision optimization.Constantly improved methods and mathematical programming algorithms, such as the simplex algorithm, branch and bound, and branch-and-cost, have become classics now [2].
The proposed method's strength lies in high efficiency of optimization algorithms and a substantial number of tested models.Traditional methods when used alone to solve complex problems provide unsatisfactory results.This is related directly to different treatment of variables and constraints in those approaches (Section 3).
This schema of the hybrid solution framework for Capacitated Vehicle Routing Problems (HSFCVRP) and the concept of this framework with its predicates (P1-P7) are presented in Figure 1.The names and descriptions of the CLP predicates and the implementation environment are shown in Table 1.
From a variety of tools for the implementation of the CP/CLP, ECL i PS e software [4,12] of constraint programming applications.ECL i PS e contains several constraint solver libraries, a high-level modelling and control language, interfaces to third-party solvers, an integrated development environment, and interfaces for embedding into host environments.ECL i PS e was used to model the problem, transform it, and search for a domain solution by constraint propagation.This solution was then the basis for the final MP model, developed in the Eplex library [9] of the ECL i PS e environment.Since ECL  PS  version 5.7, standalone Eplex have become the standard.The previous lib(eplex), which loads Eplex with the range bounds keeper and the IC variant have now been phased out, so users of these old variants must now move to using standalone Eplex.The Eplex library allows MP/MIP/MILP problems to be modelled in ECL i PS e and solved (optimized) by an external MP solver.The implementation of the model in CLP, the term representation of the problem in the form of predicates.

P2 CLP environment
The transformation of the original problem aimed at extending the scope of constraint propagation.The transformation uses the structure of the problem.The most common effect is a change in the representation of the problem by reducing the number of decision variables and the introduction of additional constraints and variables, changing the nature of the variables, and so forth.

P3 CLP environment
Constraint propagation for the model: constraint propagation is one of the basic methods of CLP.As a result, the variable domains are narrowed, and in some cases, the values of variables are set, or even the solution can be found.

P4 CLP environment
Generation by the AG: (i) the model for mathematical programming: generation performed automatically using CLP predicate; (ii) additional constraints on the basis of the results obtained by predicate P3; (iii) domains for different decision variables and other parameters based on the propagation of constraints.Transmission of this information in the form of fixed value of certain variables and/or additional constraints to the MP.Merging files generated by predicate AG into one file.It is a model file format in MP format.

P5 EPLEX environment
Finding the consistent area based on information from the CLP.

P6 EPLEX environment
The solution of the model from the P4 by MP solver.

Two-Echelon Capacitated Vehicle Routing Problem as an Illustrative Example
The Two-Echelon Capacitated Vehicle Routing Problem (2E-CVRP) is an extension of the classical Capacitated Vehicle Routing Problem (CVRP) where the delivery depot-customers pass through intermediate depots (called satellites).
As in CVRP, the goal is to deliver goods to customers with known demands, minimizing the total delivery cost in the respect of vehicle capacity constraints.Multiechelon systems presented in the literature usually explicitly consider the routing problem at the last level of the transportation system, while a simplified routing problem is considered at higher levels [7,8].In 2E-CVRP, the freight delivery from the depot to the customers is managed by shipping the freight through intermediate depots.Thus, the transportation network is decomposed into two levels (Figure 2): the 1st level connecting the depot (d) to intermediate depots (s) and the 2nd one connecting the intermediate depots (s) to the customers (c).The objective is to minimize the total transportation cost of the vehicles involved in both levels.Constraints on the maximum capacity of the vehicles and the intermediate depots are considered, while the timing of the deliveries is ignored.From a practical point of view, a 2E-CVRP system operates as follows (Figure 2): (i) freight arrives at an external/first/base zone, the depot, where it is consolidated into the 1st-level vehicles, unless it is already carried into a fully loaded 1st-level vehicles; (ii) each 1st-level vehicle travels to a subset of satellites that will be determined by the model and then it will return to the depot; (iii) at a satellite, freight is transferred from 1st-level vehicles to 2nd-level vehicles.

Mathematical Model.
The formal mathematical model (MILP) was taken from [7].Table 2 shows the parameters and decision variables of 2E-CVRP.Figure 2 shows an example of the 2E-CVRP transportation network for this model: The objective function minimizes the sum of the routing and handling operations costs.Constraints (3) ensure, for  =  0 , that each 1st-level route begins and ends at the depot, while when  is a satellite, impose the balance of vehicles entering and leaving that satellite.Constraints (5) force each 2nd-level route to begin and end to one satellite and the balance of The freight arc(, ) where  represents the satellite where the freight is passing through.

𝑍 𝑘,𝑗
A binary variable that is equal to 1 if the freight to be delivered to customer  is consolidated in satellite  and 0 otherwise -Supply balance constraint for recipients is not required.In the route model, the supply volume is calculated for the route.
-Supply volume constraint resulting from the vehicle capacity is unnecessary for level 2. The routes are generated only for the allowable capacities.
(10) -No return loads from satellite to depot (10).The routes are generated so as to automatically ensure this.
(11) -No return loads from the customer to satellite (11).The routes are generated so as to automatically ensure this.( 12), (13) -No  , variable after transformation.vehicles entering and leaving each customer.The number of the routes in each level must not exceed the number of vehicles for that level, as imposed by constraints ( 2) and ( 4).The flows balance on each network node is equal to the demand of this node, except for the depot, where the exit flow is equal to the total demand of the customers and for the satellites at the 2nd-level, where the flow is equal to the demand (unknown) assigned to the satellites which provide constraints ( 6) and (8).Moreover, constraints ( 6) and ( 8) forbid the presence of subtours not containing the depot or a satellite, respectively.In fact, each node receives an amount of flow equal to its demand, preventing the presence of subtours.Consider, for example, that a subtour is present between the nodes ,, and  at the 1st level.It is easy to check that, in such a case, any value does not exist for the variables  1 , ,  1 , , and  1 , , satisfying the constraints ( 6) and (8).The capacity constraints are formulated in ( 7) and ( 9), for the 1st-level and the 2nd-level, respectively.Constraints (10) and (11) do not allow residual flows in the routes, making the returning flow of each route to the depot (1st-level) and to each satellite (2nd-level) equal to 0. Constraints (12) and (13) indicate that a customer  is served by a satellite  ( , = 1) only if it receives freight from that satellite ( ,, = 1).Constraint (16) assigns each customer to one and only one satellite, while constraints ( 14) and ( 15) indicate that there is only one 2nd-level route passing through each customer and connect the two levels.Constraint (17) allows the start of a 2nd-level route from a satellite  only if a 1st-level route has served it.Constraints from (17) to (20) result from the character of the MILP-formulated problem.Additional constraints were introduced by [7] to increase the solution search efficiency.They strengthen the continuous relaxation of the flow model.In particular, authors in [7] used two families of cuts, one applied to the assignment variables derived from the subtour elimination constraints (edge cuts) and the other based on the flows.The edge-cuts explicitly introduce the well-known subtours elimination constraints derived from the TSP (Traveling Sales Problem).They can be expressed as constraint (21).The inequalities explicitly forbid the presence in the solution of subtours not containing Fc: the optimal value of the objective function.the depot, already forbidden by constraint (8).The number of potential valid inequalities are exponential, so that each customer reduces the flow of an amount equal to its demand   -constraints ( 22) and (23).

Model Transformation.
One of the most important features that characterize the hybrid approach is the ease of modeling and transformation of the problem.The transformation is usually used to reduce the size of the problem and increase the efficiency of the search for a solution.In this case the transformation is based on the transition from arc to the route notation.During the transformation in the CLP the TSP, traveling salesman problem, is repeatedly solved and only the best routes in terms of costs are generated.In the process of transformation, the capacity vehicles constraints and those resulting from the set of orders are taken into account at both first and second level.For 2E-CVRP variants, time and logic constraints are also included.The obtained optimization model after the transformation (T1)-(T9) has different decision variables (Table 3) and different constraints than those in the MILP (1)-(24).Some of the decision variables are redundant; other variables are subject to aggregation.This results in a very large reduction in their number.Decision variables before and after the transformation are shown in Table 4.The transformation also reduces or eliminates some of the constraints of the model (Table 4): benchmark instances demonstrates that the hybrid approach may be a superior approach to the classical mathematical programming.For all the examples, the solutions were found 4-40 times faster than they are in the classical approach (Table 5).In many cases the calculations ended after 600 s as they failed to indicate that the solution was optimal.The number of constraints () and decision variables/integer (/int ) was, for example, P1, P2, and P3, respectively,  = 1262,  = 744/368 for P1,  = 1982,  = 744/368 for P2, and  = 21,  = 1082/1079 for P3.Thus, the combinatorial spaces ( × ) for illustrative examples were (i) P1 ≈ 1 000 000; (ii) P2 ≈ 1 400 000; (iii) P3 ≈ 22 700.
The logical relationship between mutually exclusive variables was taken into account, which in real-world distribution systems means that the same vehicle cannot transport two types of selected goods or two points cannot be handled at the same time.
Those constraints result from technological, marketing, sales safety or competitive reasons.Only declarative application environments based on constraint satisfaction problem (CSP) make it possible to implement of this type of constraint.Table 6 presents the results of the numerical experiments conducted for 2E-CVRPs with logical constraints relating to the situation where two delivery points (customers) can be handled separately but not together in one route.
The final stage of the research was to optimize Two-Echelon Capacitated VRP with Time Windows (2E-CVRP-TW).This problem is the extension of 2E-CVRP where time windows on the arrival or departure time at the satellites and/or at the customers are considered.The time windows can be hard or soft.This variant of the 2E-CVRP is extremely important in a competitive environment.
In the first case the time windows cannot be violated, while in the second one if they are violated a penalty cost is paid.2E-CVRP-TW has been implemented in a hybrid environment.This was followed by the optimization problem under the time constraints (time windows).There have been experiments with both windows hard and windows soft.The results are shown in Table 7(a) and Table 7(b).The impact of these constraints on the value of the objective function can be clearly seen.For instance E-n13-k4-20 also shows graphically the optimal way of delivery (see Figure 3

Conclusion and Discussion on Possible Extension
The efficiency of the proposed approach is based on the reduction of the combinatorial problem and using the best properties of both environments.The hybrid approach (Table 3) makes it possible to find solutions in the shorter time.
In addition to solving larger problems faster, the proposed approach provides virtually unlimited modeling options with many types of constraints.Therefore, the proposed solution is recommended for decision-making problems under competitions and that has a structure similar to the presented models (Section 5).This structure is characterized by the constraints and objective function in which the decision variables are added together.
Further work will focus on running the optimization models with nonlinear and other logical constraints, multiobjective, uncertainty, and so on, in the hybrid optimization framework.The planned experiments will employ HSFCVRP for Two-Echelon Capacitated VRP with Satellites Synchronization, 2E-CVRP with Pickup and Deliveries, and other VRP issues in Supply Chain Sustainability [19] and other routing problems [20].

Figure 1 :
Figure 1: The scheme of the hybrid solution framework for Capacitated Vehicle Routing Problems (HSFCVRP).
not necessary in the model with routes.
(a)) as well as the impact on the route of logical constraints (Figure3(b)) and the time window (Figure3(c)).

Table 1 :
Description of CLP predicates.

Table 2 :
Summary indices, parameters, and decision variables.Deport   = {V 1 , V 2 , ..., V sn } Set of satellites   = {V 1 , V 2 , ..., V cn } An integer variable of the 1st-level routing is equal to the number of 1st-level vehicles using arc(, ) ,,A binary variable of the 2nd-level routing is equal to 1 if a 2nd-level vehicle makes a route start from satellite  and go from node  to node  and 0 otherwise 1

Table 3 :
Summary indices, parameters, and decision variables for transformed model.
If the tour takes place along the route  from the route set generated for level 1, then   = 1, otherwise   = 0   If the tour takes place along the route  from the route set generated for level 2, then   = 1, otherwise   = 0 Computed quantities   Total demand for route

Table 4 :
Decision variables and constraints before  after transformation.

Table 5 :
The results of numerical examples for 2E-CVRP.

Table 5 :
Continued.Calculations stopped after 600 s, the feasible value of the objective function. *

Table 6 :
The results of numerical examples for 2E-CVRP with logical constraints.
* Pairs of customers that cannot be served on one route.