Optimization of territories and transport routes for hazardous products in a distribution network

: Purpose: This work presents a general model in mixed integer programming that integrates the design of the territory and distribution route planning, seeking to minimize the total distance covered by the vehicle in each territory. Design/methodology/approach: In this work, a mathematical optimization model has been proposed using an exact algorithm based in mixed integer linear programming, to seek of minimizing the cost of pickups and/or deliveries of products considered to be hazardous in a distribution network, using AMPL software as an interface, with CPLEX as an optimizer to solve a practical real problem. Findings: The model reports an efficient solution, which provide the process administrator with sufficient information to optimize the use of the available (Limited) distribution resources in SMEs of these types of markets that are considered emerging. Originality/value: In contrast to the typical models applied to the VRP with pickups and/or delivery of hazardous materials, this work proposes the use of an exact algorithm that gives a quick and efficient solution for a real optimization problem, considered balance in workload in each territory and using of a single central deposit which the vehicle must use as its origin and final destination.


Introduction
The pickup or delivery of goods and/or services in a logistical distribution network are key activities in administrating the use of available logistical resources in any company (Bueno, Cedillo & Velarde, 2016). Nowadays, this operation has become more complicated, as the needs of the clients are constantly changing, creating a constant struggle to maintain or raise their level of satisfaction. In this context, the efficient use of material resources and human capital are important points to consider in order to reach the established goals while minimizing the associated costs. In emerging markets, such as Mexico, companies face challenges such as the design of low cost solutions to logistical problems, solutions which should be sufficiently robust to allow the company to continue operating in spite of the different faults that infrastructure and other external elements can induce in logistics systems.
The functioning of the majority of daily life systems is defined by different levels of performance that compose them, which can range from perfection to total failure. In this sense, the problem arises from the need to have an adequate client allocation to a group of territories according to policies defined by the company as well as a series of distribution (pickup) routes according to available logistical resources. This type of problem is addressed by companies and organizations involved in the pickup and delivery of goods, services, or people in a distribution network (Kechmane, Nsiri & Baalal, 2015).
The constant increase in competition makes the optimization of the problem analyzed here especially relevant due to the contribution of the cost allocation of the clients to territories, as well as the distribution costs in the total costs. The vehicle routing problem, as well as the problem of territory design, includes common characteristics in their modeling, such as demand, number of clients, locations, etc., which provides a great opportunity for offering a solution that integrates these two problems considering the unique characteristics of the problem of pickup or delivery of hazardous products. The challenge of the problem of territory design is grouping clients into larger groups, called zones or territories, assuring satisfaction of the planning criteria (Kalcsics, Nickel & Schroder, 2005), which depend on the organization's objectives, which may be economic motivations (workload, increase in number of clients, increase in potential sales), demographic (number of inhabitants, voting population). In addition, there are space constraints (contiguity, compactness), which aim to group these clients into territories that are easy to administrate. In an organization, the need to establish or redesign a territory, as well as to have adequate distribution of the logistical resources, arises when the number of clients or their demands change.
To achieve this, organizations investigate how to divide the group of pickup or delivery localities throughout a city in different territories, considering geographic, administrative, and economic criteria, among others, with the aim of obtaining an efficient management of the territories, as well as of the available logistical resources for the administration of the distribution routes. The efficient use of these resources constitutes the central axis of the majority of the problems in territory and route design. The research is limited to finding the distribution route in which only the pickup of the product is considered, the start and final destination of the distribution route is the same (central depot), only one vehicle can visit to each customer on the route and is using a single vehicle for each distribution route.
Specifically, compact territories (compactness) is required, so that the pickup and delivery trips are short, which has the benefit of reducing time and cost related to transport, in such a way that meet very specific criteria of balancing as is the Workload, another point to be considered is that the model contemplates the use of a single central deposit which the vehicle must use as its origin and final destination in contrast to different works in the literature as (Dechampai, Tanwanichkul, Sethanan & Pitakaso, 2015;Ugurlu, Bozcaya & Kervenoael, 2013;Jiaoman, Xiang, Lean, Ralescu & Jiandong, 2017), which handle several deposits to make their pickups in the distribution network, likewise, it is intended to define the number of teams necessary to meet the demand and the allocation of clients and vehicles to the routes for the efficient utilization of these teams, is important to mention than in emerging market context, it is important to consider that the proposed solution seeks to respond to a recurrent problem in an emerging market context where on the one hand there is a limited availability of professional, technological and economic resources and on the other hand, given the scarcity of resources, there is a growing demand for robust solutions that minimize costs and enable companies to improve their connectivity in the market, is use existing infrastructure to be more efficient in their services and at the same time reduce their risks by complying with existing regulations. These are dimensions that are measured in Agility's Emerging Markets Logistics Index 2016. In this sense, one of the main characteristics of this work is the use of an exact algorithm for the resolution of this model, since these problems are typically solved through heuristic techniques due to their large size and complexity (Ugurlu et al., 2013;Guedria, Malhene & Deschamps, 2016;Nucamendi, Cardona & Bello, 2015).

Problem Statement
The problems of territory design and vehicle routing contain special characteristics that must be taken into account when building an optimization model, which should be created with a wider focus of the supply chain. Due to this, is was necessary to utilize a series of vehicles and clients distributed throughout several territories. In this problem, special characteristics were included, such as the type of material to be transported considered as hazardous or contaminating material, which by its nature must respect the security regulations for handling, transportation, and disposal, the demand of which is deterministic; territories must be compact and balanced with respect to demand (volume of load to be transported by vehicle), with the aim of obtaining territories with similar workloads. The number of existing territories was considered to be fixed and will be provided by the decision-maker, thus assuring that each territory has at least one vehicle to carry out the corresponding route and that customer allocation to each territory seeks to minimize the travel time in each territory.
The vehicle routing problem encompasses different factors that make up the problem addressed here, such as the clients located in a distribution network. Each client requires a certain quantity of goods, materials, or personnel to pick up or deliver d i. , and should be visited only once to fulfill their demand.
The services of pickup and/or delivery to these clients should be provided by a group of vehicles with capacity Q. In each territory, the number of permitted vehicles should be equal. For each client in the distribution route, no vehicle can transport a cargo demand greater than its capacity. All delivery demands are loaded in a central depot at the beginning of the route, and all pickups on the route are taken to the central depot at the end of same. Each vehicle that begins the trip from the central depot has a load equal to the total delivery demand of the clients along the route and returns to this depot with a product load equal to the total quantity of pickups. There is only one central depot for all vehicles, which has a capacity sufficient for loading or unloading each vehicle. A time is set for the delivery or pickup (service) according to the case for each client t i , as well as travel time t ij from client i to client j.
The total travel time of a vehicle's route is defined as the sum of the travel time (proportional to the distance covered) and the service time. The aim of this measurement is to establish an equilibrium measure in the work of each team, as well as to minimize the maximum total distance covered by each vehicle in each territory.

The Problem of Territory and Vehicle Route Design
The literature around the vehicle routing problem (VRP) and the territory design problem (TDP) is quite extensive; hence, a comprehensive revision has been developed. A notable work in TDP is (Garfinkel & Nemhauser, 1970), in which the authors propose a solution based on a two-phase method: 1) the first phase generates a group of territories that they termed candidates, which must fulfill the criteria of contiguity and compactness (within a specified range); 2) in the second phase, the required territories would be chosen in a way that optimizes the global balance of the TDP.
Since the middle of the 1970s, several authors in the area of TDP have studied the applications problem in varied contexts, highlighting: 1) TDP applied to sales (Drexl & Haase, 1999) and 2) TDP for the design of political districts (Bacao, Lobo & Painho, 2005;Ricca & Simeone, 2008). Likewise, it is possible in this context to identify a great number of applications related to health services (Blais, Lapierre & Laporte, 2003), law enforcement service, and applications for the design of school districts (Caro, Shirable, Guignard & Weintraub, 2004).
In TDP applied to political districts published by Hojati (1996), a method consisting of three stages was proposed. In the first stage, centers were established in each territory by means of a Lagrangian relaxation; in the second stage, client allocation was carried out to the center of each territory; then, in the final stage, the areas were divided through the solution of a series of qualified transport problems. This method was applied in the case study of the city of Saskatoon (Canada), with a problem that included 42 clients and 11 territories, resulting in more compact territories with fewer zoning areas compared to the original territorial plan used at that time.
The work in Kalcsics et al. (2005) carried out an extensive revision of articles in the area of territorial design. In these articles, the authors propose a general model which includes typical characteristics of these types of problems (without including contiguity constraints), and in the same way develop a localization-allocation heuristic to seek the optimal solution to zoning areas.
The research presented by D'Amico, Wang, Batta and Rump (2002) attacks the problem of reallocation of police districts. In this work, in addition to the need to include contiguity, compactness, and workload balance of the police officers, quality of service was also considered, being a crucial factor for response times to emergency calls. This requirement directly affected waiting lines, generating non-linear constraints and further complicating territory design. In its application, it proposes a heuristic based on a simulated annealing approach, which seeks to minimize the imbalance of workloads between officers in each district. Likewise, in Bozkaya, Erkut and Laporte (2003), the problem of political territory design is approaches, in which the utilization of the criteria of contiguity, compactness, population equality, and socio-economic homogeneity. The authors propose a taboo search algorithm that uses a merit function, thus integrating the aforementioned criteria.
In the research in Vargas, Ríos and López, (2005), a study was performed on the territory design problem, a practical application to a problem arising from a company dedicated to the distribution of bottled softdrinks, whose special characteristics differ from the majority of the problems of this class. In addition to utilizing the criteria of contiguity, on balance it considers three activity measures, which are the number of clients, demand, and workload. In this problem, client allocation criteria are also included (some must be unavoidably allocated to the same territory and others cannot be allocated to a single territory.) The proposed solution is based on a GRASP, where the objective is to minimize the difference between the value of each activity measures and the target value. This solution does not consider the compactness measure and the number of territories is handled as a variable.
The work developed by Ríos and Fernández (2009) tackles a territory design problem with a focus on commercial territory. In this application, the main objective was to be able to obtain compact, contiguous, and balanced territories with respect to three activity measures (number of clients, demand, and workload.) In this sense, in the work developed by Salazar, Ríos and Cabrera (2011), a series of formulations is proposed for the problem of territory design with a focus on the design of commercial districts. The different methods used to seek solutions to these types of problems are based on heuristics, due to the complexity of the problem, which is cataloged as NP-complete.
The work presented by Ríos and López (2012), this transportation design problem is approached with a mathematical formulation in mixed integer linear programming, which seeks to minimize the dispersion measure of the territory, fulfilling the establishment of the number of clients, product demand, and the workload for each territory, respecting the different planning criteria of each company. In the work presented by Kechmane, Nsiri and Baalal (2015), a mathematical model is proposed, whose objective is to minimize transportation costs at a single level of the logistical network, seeking to optimize client allocation to the distribution centers and vehicles to journeys, reducing distances covered, considering the constraints of vehicle storage capacity and the distribution centers, as well as the fulfillment of each client's demand.
Various algorithms have been developed to resolve distinct cases of VRP and VRPTW, which tend to be divided into exact methods and approximate methods (Beaulieu & Gamache, 2006;Laporte, 2009).
Among the exact methods are the Branch and Bound (B&B), Branch and Cut (B&C), and set partition column generation (SP-CG).
In B&B types, work by Fischeetti, Toth and Vigo (1994) puts forth the idea of providing lower demands to the solutions to the respective problems through relaxation of the whole variables or the elimination of some constraints, seeking to reach small problems with quick solutions that represent benchmarks for the value of the original problem. In the work presented by Serdar and Gen (2012) (Wark & Holt, 1994). This method seeks to mix routes with at least one characteristic in common. Within the second group are the simulated annealing, deterministic annealing, taboo search, and genetic algorithm methods, among others (Toth & Vigo, 2002). Unlike the classic heuristic methods, in a metaheuristic method, the algorithm can consider passing through an x t solution to another x t+1 solution with a higher cost (Cedillo, De la Riva, Bueno,

Gonzalez & Garcia, 2014).
In the research by Okudea and Taniguchi (2014), a calculation method approximate to VRP is proposed, which returns a better solution in a shorter time. The proposed method generates an approximate solution through the use of a hierarchical traffic network based on the behavior of a vehicle, which is the frequency of highway utilization.
In the work presented by Nucamendi et al. (2015), an adaption is carried out of the Traveling Salesman Problem, addressing special characteristics where the waiting time is more important than the vehicles used in the distribution network and with the aim of minimizing the sum of the waiting times to receive service on each route.
In the research carried out by Litvinchev (2007), a metaheuristic method is proposed based on a Lagrangian relaxation, which employs a systematic decomposition principle to resolve large scale linear problems or special structure problems. The focus of the method is to use the decomposition principle, which consists of operating in two separate linear programs: a) one on the set of simple constraints; and b) another on the set of complex constraints. In these programs, the information flows between them until it reaches a point at which it finds the solution to the original problem. The linear problem of general constraints is termed the master problem and the linear problem of special constraints is termed the sub-problem (Litvinchev, Rangel & Saucedo, 2008).
In the literature, there are authors that consider the vehicle routing problem with deliveries and pickups (VRPDP) as an extension of the qualified vehicle routing problem and present a model based on genetic algorithms to provide a solution to this type of problem (Ugurlu et al., 2013;Serdar & Gen, 2012;Laporte, 2009). Likewise, in the work presented by Ugurlu et al. (2013), the authors propose a metaheuristic hybrid in the search for a solution, which uses a business model in supermarkets for the storage capacity of various products. Its application consists of designing and executing a network system able to acquire a product from various places on the network. To achieve this, the authors applied a genetic algorithm in the selection and allocation of the supplier and a modified savings algorithm for the qualified VRP with multiple pickups, single delivery, and time windows.
In the work by Dechampai et al. (2015), the utilization of two heuristics is considered to resolve the vehicle routing problem, considering a flexible demand in the mix of pickup and delivery service with constraints on maximum time of the route, thus extending the well-known VRP with simultaneous pickups and deliveries.
The research in Guedriaet al. (2016) proposed implementing two well-known strategies in the delivery routes in urban areas: the vehicle routing problem and the load planning and optimization problem, utilizing an approximation with a hybrid method of the two strategies and introducing the concept of robustness in the route, with the purpose of guaranteeing a predefined level of efficiency.
Below, a mathematical model in mixed integer linear programming (MILP) is presented, which was designed based on different characteristics of the real problem of territory design, routing (including special features such as, each customer is visited only once in each territory, time limitations to complete the route, the total demand of the route cannot exceed the capacity of the vehicle to mention a few), and in the work proposed by Mingyong and Erbo (2010), for the vehicle routing problem.

Definition and Modeling of the Problem
Model of territory design with vehicle routes with pickups or deliveries and time windows.

Notation:
Indices and parameters used for the model.

Min L
(1) (Minimize the maximum distance covered between zones) Subject to: (2) (Calculate the distance covered by zones) (Assure that each client is allocated to a single zone) (Define that the clients visited by each vehicle belong to the same zone) (Guarantee entry and exit of the client's premises with the same vehicle) (Each client in each zone is visited only once) (Assure the fulfillment of pickup or delivery demand of each client) (Assure the fulfillment of service times and scheduled visits to clients) (Guarantee not surpassing the capacity of each vehicle)

Experimental Results and Case Study
In this section, the results obtained from the experimentation with the proposed mathematical model are presented. The AMPL language was used for the implementation of the model as well as the CPLEX version 12.6 optimization software, executed on a 64-bit Windows 7 operating system, Intel Core 8 processer with 2.53 GHz and 16 GB of RAM. The model was used to solve the practical problem of 40 clients divided into 4 territories with pickups and/or deliveries.
The model was tested based on two demand scenarios, according to the company's requirements. This first scenario presents special characteristics, as the demands between the clients were quite different and their variance very different, while in the second scenario, the demands were quite similar and their variance very small. This represents a difference in execution times for the model when finding the optimal solution.
A comparison of the results with the different demand scenarios with client sizes of 30 and 40 in Tables   1 and 2, respectively, where the difference in execution times of the model can be observed, which presents an increase when handling similar demands. It is important to note that in all cases of the sizes of the problems of 30 and 40 clients, optimal solutions were achieved in short execution times, which represents a favorable result for the model. Thus, it is expected that the solution to the practical (real) problem will be quick and efficient. The results obtained for the different sizes of client and number of territories can be seen in Table 3. In these results, demands with great variation were handled, both in pickup and delivery, as the practical problem required. Client sizes from 10 to 70 are presented with territories from 1 to 4.
It can be seen that for all instance sizes, the CPLEX software reports optimal solutions in relatively short times in ranges from 0.42 seconds to 12,600 seconds for time instances from 10 to 70 clients with territories from 1 to 3.

Conclusions
In this work, a mathematical optimization model in mixed integer linear programming has been proposed, which efficiently integrates the problems of territory design and vehicle routing, also handling pickups and/or deliveries of products considered to be hazardous in a distribution network, respecting the norms applied to the handling of these materials. The deduction of these important results is relevant as this is a practical (real) problem that decision-makers face every day which requires quick and efficient solutions for the good handling of resources.
The solution of the practical problem allows the decision-maker to: • Define the number of territories.
• Balance according to demand.
• Establish the size and composition of the fleet of vehicles necessary to satisfy demand.
• Sequence visits in deliveries and/or pickups to each client, thus contributing to the decrease of logistical expenses, reducing transportation costs, and improving fulfillment of client demand (quality of service to the client).
The aim of the model is to establish a quick and efficient solution, which should provide the process administrator with sufficient information to optimize the use of the available (Limited) distribution resources in SMEs of these types of markets that are considered emerging.

Future Work
To develop a robust and a specialized algorithm using approximation methods, that provides support in decision making related to the calculation of territory design problems, as well as pickup and / or delivery in a distribution network for large instances in time and quality. Handle a cost function in the model in such a way that the expense incurred for the delivered solution can be quantified.