Optimization and cooperation with logistics applications
Abstract
Operations Research (OR) is a discipline in which advanced analytical methods are developed and used to solve problems and aid in decision-making. There are a wide variety of fields where OR can be applied, one of which is logistics. Optimizing and scheduling a certain network is a fundamental task, accomplished by proposing models and solving algorithms for each particular situation. Logistic problems are also often treated by the practitioners of OR from a cooperative standpoint, which can be approached through game theory. This thesis addresses several OR and game theoretical problems that have applications in the logistics domain. The performance of the proposed methodologies is analyzed and illustrated with real data applications.
Full text
ESCOLA DE DOUTORAMENTO INTERNACIONAL DA USC Laura Davila Pena 7HVHGHGRXWRUDPHQWR 2SWLPL]DWLRQDQGFRRSHUDWLRQ ZLWKORJLVWLFVDSSOLFDWLRQV 6DQWLDJRGH&RPSRVWHOD Programa de Doutoramento en Estatística e Investigación Operativa
TESE DE DOUTORAMENTO OPTIMIZATION AND COOPERATION WITH LOGISTICS APPLICATIONS Laura Davila Pena ESCOLA DE DOUTORAMENTO INTERNACIONAL DA UNIVERSIDADE DE SANTIAGO DE COMPOSTELA PROGRAMA DE DOUTORAMENTO EN ESTATÍSTICA E INVESTIGACIÓN OPERATIVA SANTIAGO DE COMPOSTELA 2022
DECLARACIÓN DA AUTORA DA TESE Dna. Laura Davila Pena Título da tese: Optimization and cooperation with logistics applications Presento a miña tese, seguindo o procedemento axeitado ao Regulamento, e declaro que: 1) A tese abarca os resultados da elaboración do meu traballo. 2) De ser o caso, na tese faise referencia ás colaboracións que tivo este traballo. 3) Confirmo que a tese non incorre en ningún tipo de plaxio doutros autores nin de traballos presentados por min para a obtención doutros títulos. 4) A tese é a versión definitiva presentada para a súa defensa e coincide coa versión enviada en formato electrónico. E comprométome a presentar o Compromiso Documental de Supervisión no caso de que o orixinal non estea na Escola. En Santiago de Compostela, a 10 de novembro de 2022 Laura Davila Pena
AUTORIZACIÓN DOS DIRECTORES/TITORA DA TESE Optimization and cooperation with logistics applications Dna. Balbina Casas Méndez D. Ignacio García Jurado INFORMAN: Que a presente tese se corresponde co traballo realizado por Dna. Laura Davila Pena, baixo a nosa dirección/titorización, e autorizamos a súa presentación, considerando que reúne os requisitos esixidos no Regulamento de Estudos de Doutoramento da USC, e que como directores/titora desta non incorre nas causas de abstención establecidas na Lei 40/2015. De acordo co indicado no Regulamento de Estudos de Doutoramento, declaran tamén que a presente tese de doutoramento é idónea para ser defendida en base á modalidade de Monográfica con reproducción de publicacións, nas que a participación da doutoranda foi decisiva para a súa elaboración e as publicacións se axustan ao Plan de Investigación. En Santiago de Compostela, En A Coruña, a 10 de novembro de 2022 a 10 de novembro de 2022 Balbina Casas Méndez Ignacio García Jurado
A Linda, por acompañarme más de media vida. A Darwin y Pipo, por su amor incondicional. A los tres, gracias por hacerme feliz.
Contents 155 .............................155 .................................158 159 169 179 193
List of Acronyms ALNS Adaptive Large Neighborhood Search ALNS-TS Adaptive Large Neighborhood Search with Tabu Search BSR Block Splitting Rule CESGA CEntro de Supercomputación de GAlicia CVRP Capacitated Vehicle Routing Problem CW Clarke–Wright EGS Equal Gain Splitting GENI GENeralized Insertion GMS Graph Machine Scheduling GPS Global Positioning System ICU Intensive Care Unit ILP Integer Linear Programming ISA Instance Space Analysis ITS Iterated Tabu Search LNS Large Neighborhood Search LS Local Search MATILDA Melbourne Algorithm Test Instance Library with Data Analytics MC-TTRP Multi-Compartment Truck and Trailer Routing Problem MC-VRP Multi-Compartment Vehicle Routing Problem MC-VRP-SP Multi-Compartment Vehicle Routing Problem with Split Pattern MC-VRPSD Multi-Compartment Vehicle Routing Problem with Stochastic Demands MC-VRPTW Multi-Compartment Vehicle Routing Problem with Time Windows
2 List of Acronyms MCST Minimum Cost Spanning Tree MCSTP Minimum Cost Spanning Tree Problem MDVRP Multi-Depot Vehicle Routing Problem MILP Mixed-Integer Linear Programming MVR Mixed Vehicle Route OR Operations Research PACVRP Partial Accessibility Constrained Vehicle Routing Problem PALNS-TS Penalized Adaptive Large Neighborhood Search with Tabu Search PTR Pure Truck Route PVR Pure Vehicle Route SD-VRP Site-Dependent Vehicle Routing Problem SDVRP Split-Delivery Vehicle Routing Problem SHAP SHapley Additive exPlanations TC Truck Customer TS Tabu Search TSP Traveling Salesman Problem TTRP Truck and Trailer Routing Problem TTRPTW Truck and Trailer Routing Problem with Time Windows US Unstringing and Stringing VC Vehicle Customer VNS Variable Neighborhood Search VRP Vehicle Routing Problem VRPPD Vehicle Routing Problem with Pickup and Delivery VRPSD Vehicle Routing Problem with Stochastic Demands VRPT Vehicle Routing Problem with Trailers VRPTW Vehicle Routing Problem with Time Windows XSTTRP eXtended Single Truck and Trailer Routing Problem
Chapter 1 Introduction This chapter aims to provide an introductory overview of the present thesis. First, Section gives a brief summary of the current use of Operations Research and game theory in the field of logistics, focusing on problems similar to those addressed in this dissertation. Section describes the objectives of each of the investigated problems, as well as the organization of the manuscript. Finally, the methodology adopted for the current thesis is presented in Section . Contents ............. 3 .................. 5 ................................. 7 1.1 Operations Research, game theory, and logistics Operations Research (OR) is a discipline in which advanced analytical methods are developed and used to solve problems and aid in decision-making. There are a wide variety of fields where OR can be applied, one of which is logistics. This area is responsible for managing the flow of goods, people, or resources between different locations, in compliance with certain requirements. It also extends to the management and scheduling of personnel or resources in several domains. Route planning problems are one of the most well-known and studied logistics problems, with ( ) as the seminal work introducing the traveling salesman problem (TSP). The subsequent generalization to vehicle routing problems (VRPs, , ), opened up a field of research that has grown exponentially in recent decades. The diverse nature of transportation problems leads to the incorporation of more or less complex constraints, resulting in a wide variety of models and objectives to be pursued. For instance, ( ) considers a decision problem that arises in an agricultural cooperative where the routes of harvesters need to be planned according to the requirements
4L.DAVILA PENA of the partners. ( ) and ( ) study real-world VRPs that include novel aspects: the former focuses on a food distribution problem encountered by a Portuguese company that must take into account the transportation conditions of each product, and the latter analyzes a VRP where the price of fuel comes into play and, consequently, refueling decisions need to be made. ( ) addresses a route and schedule planning problem in a home care business. ( ) tackles a rich VRP in which environmental and social objectives are incorporated. More recently, ( ) discusses a drone route optimization problem, for which a mathematical formulation and a metaheuristic solution are proposed. ( ) studies a problem of goods delivery in urban areas and develops an information system that integrates the OR algorithms implemented to assist companies in logistics operations. ( ) analyzes a VRP with packing constraints under disruption in the context of first-mile logistics parcel pickup and ( ) tackles a VRP variant in the domain of smart waste collection. ( ) reviews the historical contributions of OR to transportation and logistics problems. In light of the above, it becomes evident that the research on routing problems is a topic of great interest and activity at the present time. In this thesis, we will investigate, among other subjects, a rich VRP motivated by a real situation arising in an agricultural cooperative. Following the methodology adopted in most of the aforementioned works, we will first introduce the model to be considered and then propose a mathematical formulation and solving algorithms. In Section we will further elaborate on the objectives and contents of this research. The previously cited papers focus mainly on the optimal design of a set of routes, but logistics problems are also often treated by the practitioners of OR from a cooperative standpoint. Once the routes or networks are created, the question of how to distribute the costs among the agents involved arises. Just to give a few instances, ( ) considers a savings sharing problem in a public transport system and ( ) addresses the allocation of a tram line’s fixed cost among the municipalities it operates through. The present dissertation also studies a novel OR problem in which the cost of a certain network must be divided between the customers that compose it. This problem is motivated by a logistics situation of water supply in urban areas, and it will be tackled both from the optimization and allocation point of view. Section gives a more detailed description of this study. The cooperative aspect of logistics problems can be approached through game theory, which is precisely the methodology taken in the two papers just mentioned. This discipline can also be applied in many other domains, with machine learning standing out in recent
1.2. Objectives and manuscript distribution 5 years. Works such as ( ), ( ), and ( ) highlight the growing trend of bringing these two subjects together, mainly using game theoretical solutions to improve the interpretability of complex machine learning models. In this way, another of the research lines conducted in this thesis combines these two fields. Driven by the pandemic situation derived from COVID-19, a method is proposed to evaluate the influence that certain characteristics of infected patients have on their evolution. Although this problem does not directly address a logistics application, it does serve as a decision support tool for medical professionals. As already stated, resource management is one of the practices encompassed by logistics, and constitutes a key task in the healthcare environment. ( ) reviews numerous applications of OR in healthcare, including management and logistics. The following section provides more detail on the contents of our work. 1.2 Objectives and manuscript distribution The main goal of this thesis is to address several OR and game theoretical problems that have or may be related to applications in the field of logistics. The objectives and contents of the manuscript are described as follows: Part . On rich vehicle routing problems. The vehicle routing problem (VRP) is a combinatorial optimization problem that aims to find an optimal route configuration traveled by multiple vehicles to service a set of customers. This part of the manuscript focuses on a specific variant of the VRP, the multi-compartment truck and trailer routing problem (MCTTRP) and it is composed of two chapters that present the model and solution algorithms. Chapter . Multi-compartment truck and trailer routing problem (MC-TTRP). ( ) analyzes a VRP with accessibility constraints, where the fleet of vehicles consists of trucks and trailers. This kind of restriction often appears in agricultural logistics problems, which may also present other requirements such as the demand for different types of products. Throughout this chapter, we study the problem resulting from combining these two aspects: the MC-TTRP. In particular, we propose a mathematical formulation for this model and present a real application within the aforementioned field. This chapter is mainly based on ( ). Chapter . Heuristics for the multi-compartment truck and trailer routing problem. The exact solving of the MC-TTRP was demonstrated to be difficult in Chapter , which makes it therefore necessary to resort to approximate solution methods. In this chapter, we
6L.DAVILA PENA propose different two-phase heuristic algorithms to solve the MC-TTRP. A computational study is conducted to analyze the performance of our proposals. This chapter is mainly based on ( ) and ( ). Part . On game theory in classification problems. A classification problem involves identifying the category to which a given individual belongs, based on their attributes. In this type of problem, in addition to classifying, it is important to know how influential each of the features was on the response. This second part of the manuscript is composed of a single chapter that presents an influence measure grounded on game theory ideas. Chapter . An influence measure for classification problems. A method based on the Shapley value of cooperative games is introduced in ( ) to study the influence that the characteristics of a particular individual have on their categorization. The objective of this chapter is to further extend this proposal by not only focusing on an individual-level, but by investigating the importance of the features on a sample of observations already classified. An axiomatic characterization of this measure is provided considering properties widely used in game theory. In addition, we validate the performance of our influence measure and present a real application of it to COVID- 19 data. The given method can be useful to medical practitioners within the domain of health logistics. This chapter is mainly based on ( ). Part . On cooperative Operations Research problems. Minimum cost spanning tree problems and sequencing problems are multi-agent OR problems that pursue two objectives. On the one hand, to minimize the costs related to the construction or design of the network, and on the other hand, to distribute these costs among the agents involved. A combination of ideas from these two problems gives rise to the graph machine scheduling problem (GMS-problem), where the goal sought is also two-fold. The third part of the manuscript focuses on this problem and it is composed of two chapters that present the model and study it from an optimization and allocation perspective. Chapter . The graph machine scheduling problem (GMS-problem). This problem is motivated by a situation in the field of water supply. The solving of the general model turns out to be complex, so we will restrict ourselves to situations where the networks are trees. Throughout this chapter, we propose solution algorithms for these tree GMS- problems and theoretically prove their optimality. This chapter is mainly based on ( ). Chapter . An allocation rule for GMS-problems. After solving the GMS-problem, the question of how to distribute the optimal network design costs among the participating
1.3. Methodology 7 agents arises. In this chapter we propose an allocation rule based on the algorithms and theoretical results discussed in Chapter . Furthermore, several examples are presented to illustrate how this rule is calculated. This chapter is mainly based on ( ). The manuscript includes some concluding remarks in Chapter . Finally, a summary of this dissertation in both Galician and Spanish languages is provided. 1.3 Methodology This thesis follows the classical research methodology in the field of OR. In general, the research process begins by carrying out a comprehensive study of the topics to be addressed and by reviewing some classical and recent bibliographical references. The next stages include the proposal of new models and tools to tackle them, and their theoretical and/or computational analysis. Continuing with the structure outlined in the previous section, the specific methodology employed in each chapter is detailed hereafter. Part . On rich vehicle routing problems. As already mentioned, this part proposes a novel routing problem for which several algorithms are implemented. We describe below the methodology followed in each of the two chapters. Chapter . Multi-compartment truck and trailer routing problem (MC-TTRP). We start by presenting a new route optimization problem that arises from a real case study. After situating this problem in the existing literature on OR logistics problems, we provide a mathematical formulation as a mixed-integer linear programming model. The AMPL software is used for the model implementation and the Gurobi solver is employed to obtain exact solutions on small instances taken from the aforementioned real-world application. Chapter . Heuristics for the multi-compartment truck and trailer routing problem. Given the limitations to solve large problems, and according to the methodology adopted in previous works, four heuristic algorithms to obtain solutions for the problem are developed and thoroughly described. Computational studies are the most commonly chosen approach for assessing the performance of models and algorithms, due to the useful results they provide. The implementation of these methods is carried out in the Rsoftware and numerous simulations are conducted on the CESGA supercomputer. We design and solve specific test instances for the proposed problem. In addition, the algorithms are also applied to real instances of the case study mentioned above.
8L.DAVILA PENA Part . On game theory in classification problems. This part of the thesis combines game theory concepts with machine learning, specifically with classification problems. We detail below the methodology adopted in the chapter that composes it. Chapter . An influence measure for classification problems. We begin by introducing the elements required for the subsequent proposal of the influence measure, both related to classification problems and to game theory. Afterward, desirable properties in the games domain are suggested for this measure and an axiomatic characterization is provided by means of these properties, following the classical scheme in this type of study. The influence measure is implemented in the Rsoftware and a number of simulations are designed and contextualized to validate its performance. Finally, the proposed method is applied to a COVID-19 database, serving also to illustrate its proper behavior. Part . On cooperative Operations Research problems. This part of the thesis begins by reviewing the optimization problems that have served as the basis of the new proposed problem, which will be examined from the optimization and cost allocation points of view. The methodology followed in each chapter is detailed below. Chapter . The graph machine scheduling problem (GMS-problem). First, a new OR problem is motivated and formally presented. Solving algorithms for different subcases are proposed and their optimality is proved. The application of these algorithms is illustrated by examples and graphical elements are provided throughout the chapter. Chapter . An allocation rule for GMS-problems. Following the methodology adopted by many OR practitioners, we present a cost allocation rule that is based on solving algorithms for the problem under consideration, in particular, those provided in the previous chapter. In addition, numerous illustrative examples of the calculation of our rule are given. All the graphs in this chapter have been produced with the tikz package. In some of the works that compose this dissertation, the design of simulation studies to empirically assess the performance of new methods was necessary. For such aim, the use of AMPL and Rsoftwares was essential, as already stated. In addition, the yEd diagram editor was used for the realization of most of the figures in Part of the thesis. Furthermore, R software was employed to produce the graphical representations displayed in Part , as well as to apply the implemented methods to diverse data sets throughout the manuscript.
Chapter 2 Multi-compartment truck and trailer routing problem (MC-TTRP) Vehicle routing problems admit different variants depending on the customers’ needs. One of them is the truck and trailer routing problem (TTRP), where a fleet of trucks and trailers serves a set of customers such that when the trailer is not able to reach a customer, they are attended to only by the truck. The aim of this chapter is to propose a novel mixed-integer linear programming (MILP) approach to combine the TTRP with product compartmentalization, which we call the multi-compartment truck and trailer routing problem (MC-TTRP). The contents of this chapter are collected in ( ). Contents ................................. 15 ................................. 17 ................... 19 .............................. 19 .............. 20 ....................... 27 2.1 Introduction In recent years, transport logistics has played a fundamental role in industry. Many public and private companies are interested in developing computational tools to design their routes, with objectives such as minimizing costs and/or maximizing the distribution of products. Thus, vehicle routing problems (VRPs) are a popular type of combinatorial optimization problem, through which transport routes for vehicles visiting a set of customers located at different places can be modeled. Solving these mathematical optimization problems is a challenge for operational researchers. When new features from real-world applications are considered,
16 L. DAVILA PENA such as capacitated vehicles, delivering in limited time windows, and stochastic behaviors, new variations of the original VRP arise, creating a need to develop new models and solution techniques. One promising modification of the VRP is the truck and trailer routing problem (TTRP) proposed by ( ), which incorporates accessibility restrictions. In this variant, a fleet of trucks and trailers visits a set of customers, where some customers (vehicle customers; VCs) can be served by a complete vehicle (i.e., a truck pulling a trailer), while others are only reachable by a truck alone (truck customers; TCs). Examples of TCs are customers in inner-city areas, mountainous regions, or places where maneuvering or access with a trailer is not possible. To solve this problem, we distinguish three types of routes: pure truck routes (PTRs), which can be traveled only by trucks, pure vehicle routes (PVRs), which can be traveled entirely by a complete vehicle, and mixed vehicle routes (MVRs), which consist of a main tour traveled by a complete vehicle and one or more sub-tours traveled only by the truck part of the vehicle. Figure illustrates a possible solution to the TTRP. Although this model can be very useful in many land-based logistical applications, the presence of three different types of routes makes solving the associated optimization problem more difficult, suiting it to the application of heuristics and metaheuristics, such as in ( ). Real-world applications include farm milk collection ( , ), delivery by feed mills ( , ), and the provisioning of infrastructure services in urban areas with accessibility restrictions ( , ). Figure 2.1: Possible solution to the TTRP. Another interesting variation of the VRP is the multi-compartment case, where different products must be split into different storages during transport, making it challenging to maximize the use of vehicle capacity on the generated routes. Although the inclusion of compartments adds extra complexity, it can be a requirement in real logistical applications, as explained by ( ). Therefore, this chapter focuses
2.2. Related work 17 on a routing problem that combines the TTRP with product compartmentalization, which we call the multi-compartment truck and trailer routing problem (MC-TTRP). In particular, the main interest here lies in the proposal of a novel mixed-integer linear programming (MILP) approach that covers the whole problem. The combination of these two features is motivated by the needs of a Spanish agricultural cooperative that produces feed for cattle, which we used to test, illustrate, and apply the proposed formulation. A tentative MC-TTRP was originally introduced in a preliminary work by ( ). The remainder of this chapter is organized as follows. Section reviews related work. Section presents the current case study in detail and an in-depth description and formulation of the MC-TTRP. Finally, Section reports a thorough study of the exact solution of the proposed MC-TTRP model using the case study previously outlined. 2.2 Related work To solve the logistics of an agricultural cooperative that distributes feed for cattle to a large number of customers, many of whom have accessibility restrictions, the TTRP appears to be a satisfactory model. Although ( ) introduced the term TTRP, previous works have incorporated trailers to solve similar case studies. The first approach could be that presented by ( ). These authors proposed a VRP that considered the use of trailers under accessibility restrictions. ( ) proposed another example describing a new variant of the VRP formulated as an integer linear programming (ILP) problem called the partial accessibility constrained VRP (PACVRP). Despite being very similar to ’s TTRP, it has specific differences, such as the utilization of all available trucks. Other studies have considered a heterogeneous fleet of vehicles composed of trucks and trailers, such as the case of ( ), whose model is known as the VRP with trailers (VRPT). Moreover, ( ) studied the site-dependent VRP (SD-VRP), where every customer has a specific type of vehicle assigned. Some seminal papers on the TTRP do not offer a mathematical formulation through an MILP model, although ( ) presented a formulation of the TTRP by ( ). This turns out to be an adaptation of the proposal by ( ) for the PACVRP and can be considered as the motivation for the current chapter. Other researchers have built new models based on the proposal of ( ) to meet various real-world requirements, such as a TTRP with time windows (TTRPTW) proposed by ( ). In the TTRPTW, besides its type and demand, each customer has three associated measurable times: the earliest and latest time of day at which it can be served and
18 L. DAVILA PENA the service time required. Recently, ( ) considered a generalization of the TTRP, the extended single TTRP (XSTTRP), which contains, all together, a variety of node types that were previously considered only separately: truck customers, vehicle customers with and without parking places, and parking-only locations. In the XSTTRP, a single vehicle, consisting of a truck and a detachable trailer, is used to serve a set of customers with known demand and accessibility constraints. As already mentioned, another challenging variation of the VRP arises when customers demand various types of products that cannot be mixed. This is the case in the multicompartment VRP (MC-VRP), which was initially presented in ( ) and ( ), whose objective was the distribution of petroleum products in the United States. ( ) formulated the MC-VRP as an ILP problem. As with the classic VRP, the MC-VRP can accommodate several adaptations. For instance, ( ) extended the MC-VRP to the case in which the demands are stochastic, giving rise to the MC-VRP with stochastic demands (MC-VRPSD). ( ) proposed various mathematical formulations of the MC-VRP with split pattern (MCVRP-SP). More recently, ( ) presented an MILP formulation for the MCVRP with time windows (MC-VRPTW). Let us recall that, motivated by a real example, the main objective of this chapter is to mathematically formulate a model that incorporates trucks and trailers divided into compartments, i.e., that combines the characteristics of both TTRP and MC-VRP. The work of ( ) should be highlighted as the first (and to the best of our knowledge, the only) to consider the TTRP with compartments, which we refer to as the MCTTRP hereinafter. They investigated a VRP in which at most one type of product could be assigned to each compartment. Furthermore, they established the additional constraint that some delivery locations were small and inaccessible by large vehicles. Due to the similarity between the problem addressed in that paper and this chapter, it is considered convenient to point out the differences between the two studies in terms of motivation and modeling. First, with regard to actual motivation, the problem analyzed by ( ) was for milk collection on farms by an Italian company, while in our real-world case study, which will be described in more detail in the next section, the problem of the distribution of feed among members of a Spanish agricultural cooperative was analyzed. Regarding the model and methodology used, ( ) proposed two mathematical programming models. One of them aimed to assign vehicles to farmers with the objective of minimizing the number of vehicles used, satisfying restrictions on capacity, demand, and types of milk. It should be noted that the group of farmers was divided into four zones, and
2.3. Problem description and formulation 19 an initial allocation of vehicles was made to each zone. The fleet considered was heterogeneous. The second model was used to minimize the lengths of the routes. In the proposed methodology, the possibility of serving VCs on sub-tours was not permitted. Following a different approach, in our setup, there is a homogeneous truck fleet and a trailer fleet, and vehicle pre-assignments are not made to groups of customers. In this case, the sub-tours on an MVR, traveled by only a truck, can visit both TCs and VCs. In addition, what makes an important difference is that the formulation of a single model covering the whole problem is provided. 2.3 Problem description and formulation 2.3.1 Case study The motivation for this study stemmed from the needs of a Spanish cooperative that produces and distributes feed for farm animals. The company is located in Galicia, a region in the northwestern Spain with an area of 29,565 km2spread over four provinces and 315 municipalities. The cooperative, which was created 16 years ago, currently has a total clientele of more than 1500 farmers distributed throughout the four provinces of Galicia (although not all of them order from the feed factory) and covering 60 municipalities across a large geographical area. The annual amount of feed produced exceeds 150,000 tons. The agricultural company produces different types of feed, and farmers usually place one or two orders per month. The number of daily orders is approximately 40, where each order ranges from 500 to more than 14,000 kg. The average number of annual orders per feed customer is approximately 17. There are also occurrences such as the loss or incorporation of new customers. The roads leading to some of the farms or the farms themselves are inaccessible by large trailers. Moreover, customers sometimes request different types of feed because they have different species of animals. Naturally, goods that are not of the same type cannot be mixed. Thus, it is necessary to have compartmentalized vehicles. In addition to not being able to mix different kinds of feed in the same hopper, the same compartment cannot be used to supply two different customers because the cooperative does not have technology to measure out each customer’s supply from their vehicles. The purpose of this study was to provide a tool for the cooperative to automatically design routes for each vehicle such that their restrictions are met and the distance traveled is minimized. Each day, new orders may be received, trucks may experience breakdowns, and customers may change their demands at short notice. All these factors suggest that route planning is only useful within two or three days at most.
20 L. DAVILA PENA A team of agricultural engineers designed a comprehensive global positioning system (GPS) that can monitor various vehicle routes. The GPS supplies all the geographic information required to provide the data to solve the problem. We also know the capacity of each compartment, the demands of different customers, and whether a trailer can access each farm as well as its load restrictions. 2.3.2 Mixed-integer linear programming model As stated before, this chapter proposes an MC-TTRP model–a novel MILP implementation of the TTRP with multi-compartmentalized vehicles. The MC-TTRP can be described as follows. Let G“pN,Eqbe an undirected graph consisting of a node set N“t0,1,...,nu, representing the depot (0) and customers (1,...,n), and a set E“tti, ju|i, j PN,i ‰ju, representing the edges that can be traveled between different nodes. N1and N2are subsets of Nthat contain the n1and n´n1VCs and TCs, respectively. A non-negative cost cij,ti, juPE, is assigned to each edge, which represents the distance a vehicle must travel from ito j. Each node iPNrequires a service time si, which, in the case of the depot, refers to the time required to load the vehicles. For transportation, a set KT“t1,...,m L,...,m Tuof trucks and set KL“t1,...,m Luof trailers are available. KT 1“t1,...,m Luand KT 2“tmL`1,...,m Tuare the subsets of KTthat consist of trucks that can pull a trailer and pure trucks (without trailer attached), respectively. Note that |KT 1|“|KL|, i.e., there are mLcomplete vehicles. In addition, mLis the number of trailers, and mTis the number of trucks (mLďmT). Complete vehicles and pure trucks are assumed to be homogeneous. Let QTbe the capacity of each truck and QLbe the capacity of each trailer. Hence, QT`QLis the capacity of a complete vehicle. As mentioned above and illustrated in Figure , three different types of routes can appear in this variant of the TTRP. For MVRs, the complete vehicle leaves the depot and serves some VCs; this part of the MVR is known as the main tour. The main tour is entirely covered by a complete vehicle and starts and ends at the depot. During the tour of an MVR, it is possible to uncouple the trailer from the truck and leave it parked at one of the VC locations to start a sub-tour (or even at the depot, which is always a candidate for trailer parking places). VCs and TCs can be served in a sub-tour because they are performed by a pure truck. Sub-tours begin and end at the parking place (the depot or any of the VCs of the main tour), also known as the root of the sub-tour. There are no restrictions on the number of sub-tours in an MVR or on the number of sub-tours that can start from the same VC on a given main tour, as long as the vehicle capacity restrictions are satisfied. That is, the demands transported on the MVR cannot exceed the capacity of a complete vehicle, QT`QL, and QTcannot be surpassed in a
2.3. Problem description and formulation 21 sub-tour. Another type of route is a PVR, which is fully traveled by a complete vehicle, implying that only VCs can be delivered to and their demands cannot exceed QT`QL. On the contrary, PTRs serve both types of customers because trucks travel without a trailer attached. The demand transported on a PTR cannot exceed QT. For the sake of simplicity, it is also assumed that travel costs are the same for all vehicles, regardless of whether a trailer is attached. Each trailer rPKLis divided into a set of compartments, HL, where QH Lis the capacity of a trailer compartment. Similarly, each truck kPKTis split into a set of compartments, HT, where QH Tis the capacity of a truck compartment. Furthermore, let the set F“t1,...,n Fuof feed types be given. Each node (except for the depot) has a non-negative demand dif (iPNzt0u,fPF) for every feed type. The demands must be served at customers’ locations and transported from the depot without the feed types being mixed. In addition, products for different customers cannot be carried within the same compartment. The total demands of each customer must be met by the same vehicle, and it is possible to divide a customer’s demand for the same feed type among several compartments. Trucks and complete vehicles have a maximum usage time allowed of D,an average speed of vm, and legal capacities, LTand LT`LL, respectively, which may appear depending on regulations or laws in some specific areas. Regarding the decision variables involved in the model, xkr ij and yklv ij (both binary) are related to the construction of routes. The former involves routes covered by complete vehicles (MVRs or PVRs), and it takes a value of 1if the complete vehicle consisting of truck kPKT 1 and trailer rPKLtravels from node ito j(i, j PN1Yt0u); otherwise, it is 0. In contrast, yklv ij refers to routes covered only by trucks (PTRs or sub-tours of MVRs), and it takes a value of 1 if truck kPKTtraverses the edge ti, juon the v-th route/sub-tour (vPV“t1,...,nu) with root lPN1Yt0u; otherwise, it is 0.Forl“0, the associated tour is a PTR (kPKT 2). However, if lPN1, then such a root refers to the VC of the main tour of an MVR working as a trailer parking place to start a sub-tour (and kPKT 1). The remaining variables are related to the vehicle compartments. In particular, ZTk i,f,ht takes values in r0,1sand represents the proportion of compartment ht PHTof truck kPKTcarrying feed fPFfor customer iPNzt0u, whereas Uk i,f,ht is a binary variable equal to 1if ZTk i,f,ht ą0and 0otherwise. Analogously, ZLr i,f,hl takes values in r0,1srepresenting the proportion of compartment hl P HLof trailer rPKLloaded with feed fPFfor customer iPN1, while Vr i,f,hl is a binary variable equal to 1if ZLr i,f,hl ą0and 0otherwise. The objective of the MC-TTRP is to determine a set of vehicle tours that minimizes the total cost of all edges to be traveled, i.e., the total distance of the solution routes, such that 1Note that a root candidate lPN1Yt0ucan have as many sub-tours as there are customers, n.
22 L. DAVILA PENA Table 2.1: Notation of the proposed MC-TTRP. Set or parameter Definition Parameter Definition t0uDepot nTotal number of customers N1Set of VCs n1Number of VCs N2Set of TCs mLNumber of trailers (and of complete vehicles) N“t0uYN1YN2Set of nodes (customers and depot) mTNumber of trucks N˚“Nzt0uSet of customers cij Distance a vehicle must travel from ito j N0 1“N1Yt0uSet of VCs and depot nFNumber of different types of feed KT 1Set of trucks that can hitch a trailer dif Demand of customer ifor feed f KT 2Set of pure trucks QTCapacity of a truck KT“KT 1YKT 2Set of trucks QLCapacity of a trailer KLSet of trailers QH TCapacity of a truck’s compartment FSet of different types of feed QH LCapacity of a trailer’s compartment HTSet of truck compartments DMaximum time allowed to use a truck/vehicle HLSet of trailer compartments vm Average speed of trucks/vehicles VSet of tours/sub-tours leaving a specific root siService time required for node iPN LTLegal capacity of trucks LLLegal capacity of trailers Variable Definition xkr ij Binary variable equal to 1 if truck kwith trailer rpasses through edge ti, ju; 0 otherwise yklv ij Binary variable equal to 1 if truck kpasses through edge ti, juon route/sub-tour vwith parking place l; 0 otherwise Uk i,f,ht Binary variable equal to 1 if compartment ht of truck kis loaded with feed ffor customer i; 0 otherwise Vr i,f,hl Binary variable equal to 1 if compartment hl of trailer ris loaded with feed ffor customer i; 0 otherwise ZTk i,f,ht Proportion of compartment ht of truck kloaded with feed ffor customer i ZLr i,f,hl Proportion of compartment hl of trailer rloaded with feed ffor customer i all constraints are met, i.e., the demands are satisfied, no vehicle capacities are exceeded, and the restrictions of access to customers and constraints related to the loading of compartments are considered. From now on, we will denote the set of VCs and the depot, N1Yt0u,asN0 1, and we will denote the set of customers, Nzt0u,byN˚. Table gives a summary of the sets, parameters, and decision variables involved in the model to facilitate better understanding of our proposal. Given this terminology and notation, the objective function and constraints of the MC-TTRP can be formulated as follows: minimize ÿ iPN0 1ÿ jPN0 1ÿ kPKT 1ÿ rPKL cijxkr ij `ÿ iPNÿ jPNÿ kPKTÿ lPN0 1ÿ vPV cijyklv ij (2.1) subject to ÿ iPN0 1ÿ kPKT 1ÿ rPKL xkr ij `ÿ iPNÿ kPKTÿ lPN0 1 l‰jÿ vPV yklv ij “1,jPN1;(2.2) ÿ iPN0 1ÿ kPKT 1ÿ rPKL xkr ij `ÿ iPNÿ kPKT ykjv ij ď2,jPN1;vPV;(2.3) ÿ iPNÿ kPKTÿ lPN0 1ÿ vPV yklv ij “1,jPN2;(2.4) ÿ iPNÿ kPKTÿ lPN1ÿ vPV yklv i0“0,(2.5)
2.3. Problem description and formulation 23 ÿ jPN yklv lj ď1,kPKT;lPN0 1;vPV;(2.6) yklv lj ďÿ iPN0 1ÿ rPKL xkr il ,jPN˚;kPKT 1;lPN1;vPV;(2.7) yklv ij ďÿ pPN yklv lp ,i,jPN;kPKT;lPN0 1;vPV;(2.8) ÿ iPNÿ jPNÿ vPV yklv ij “0,kPKT 2;lPN1;(2.9) ÿ iPNÿ jPNÿ vPV yk0v ij “0,kPKT 1;(2.10) ÿ vPVÿ jPN˚ yk0v 0jď1,kPKT 2;(2.11) ÿ jPN1ÿ rPKL xkr 0jď1,kPKT 1;(2.12) ÿ jPN1ÿ kPKT 1 xkr 0jď1,rPKL;(2.13) ÿ iPN˚ÿ jPN˚ j‰lÿ fPF djfyklv ij ďQT,kPKT 1;lPN1;vPV;(2.14) ÿ iPNÿ jPN˚ÿ fPF djfyk0v ij ďQT,kPKT 2;vPV;(2.15) ÿ iPN0 1ÿ jPN1ÿ fPF djfxkr ij `ÿ iPN˚ÿ jPN˚ j‰lÿ lPN1ÿ vPVÿ fPF djfyklv ij ďQT`QL,kPKT 1;rPKL;(2.16) ÿ iPN1ÿ jPN0 1 sjxkr ij `ÿ lPN0 1ÿ vPVÿ iPN˚ i‰lÿ jPN sjyklv ij `ÿ iPN0 1ÿ jPN0 1 pcij{vmqxkr ij `ÿ lPN0 1ÿ vPVÿ iPNÿ jPNpcij{vmqyklv ij ďD´s0,kPKT 1;rPKL; (2.17) ÿ vPVÿ iPNÿ jPNpsj`cij{vmqyk0v ij ďD, k PKT 2;(2.18) ÿ iPN yklv ij “ÿ pPN yklv jp ,jPN;kPKT;lPN0 1;vPV;(2.19) ÿ iPN0 1 xkr ij “ÿ pPN0 1 xkr jp,jPN0 1;kPKT 1;rPKL;(2.20) ÿ iPBÿ jPB xkr ij ď|B|´1,kPKT 1;rPKL;@BĎN1:|B|ě2; (2.21) ÿ iPBÿ jPB yklv ij ´ÿ iPBXN1ÿ jPN1zBÿ rPKL xkr ij ď|B|´1,kPKT 1;lPN1; vPV;@BĎN:|B|ě2; (2.22)
24 L. DAVILA PENA ÿ iPBÿ jPB yk0v ij ď|B|´1,kPKT 2;vPV;@BĎN:|B|ě2; (2.23) 1 |HT|ÿ fPFÿ htPHT ZTk j,f,ht ďÿ iPN0 1ÿ rPKL xkr ij `ÿ iPNÿ lPN1ÿ vPV yklv ij ,kPKT 1;jPN1;(2.24) 1 |HT|ÿ fPFÿ htPHT ZTk j,f,ht ďÿ iPNÿ vPV yk0v ij ,kPKT 2;jPN1;(2.25) 1 |HL|ÿ fPFÿ hlPHL ZLr j,f,hl ďÿ iPN0 1ÿ kPKT 1 xkr ij ,rPKL;jPN1;(2.26) 1 |HT|ÿ fPFÿ htPHT ZTk j,f,ht ďÿ iPNÿ lPN0 1ÿ vPV yklv ij ,kPKT;jPN2;(2.27) ÿ iPN0 1 xkr ij ďÿ fPFÿ htPHT QH TZTk j,f,ht `ÿ fPFÿ hlPHL QH LZLr j,f,hl,kPKT 1;rPKL; jPN1;(2.28) ÿ iPNÿ vPV yk0v ij ďÿ fPFÿ htPHT QH TZTk j,f,ht,kPKT 2;jPN1;(2.29) ÿ iPNÿ lPN1ÿ vPV yklv ij ďÿ fPFÿ htPHT QH TZTk j,f,ht,kPKT 1;jPN1;(2.30) ÿ iPNÿ lPN0 1ÿ vPV yklv ij ďÿ fPFÿ htPHT QH TZTk j,f,ht,kPKT;jPN2;(2.31) ÿ rPKLÿ hlPHL QH LZLr j,f,hl `ÿ kPKTÿ htPHT QH TZTk j,f,ht “djf,jPN1;fPF;(2.32) ÿ kPKTÿ htPHT QH TZTk j,f,ht “djf,jPN2;fPF;(2.33) ÿ iPN˚ÿ fPFÿ htPHT QH TZTk i,f,ht ďLT,kPKT;(2.34) ÿ iPN1ÿ fPFÿ hlPHL QH LZLr i,f,hl ďLL,rPKL;(2.35) ÿ iPN˚ÿ fPF ZTk i,f,ht ď1,kPKT;ht PHT;(2.36) ÿ iPN1ÿ fPF ZLr i,f,hl ď1,rPKL;hl PHL;(2.37) ZTk i,f,ht ´Uk i,f,ht ď0,iPN˚;fPF;kPKT;ht PHT;(2.38) ZLr i,f,hl ´Vr i,f,hl ď0,iPN1;fPF;rPKL;hl PHL;(2.39) Uk i,f1,ht `Uk j,f2,ht ď1,i,jPN˚;f1,f 2PF;f1‰f2;kPKT;ht PHT;(2.40) Vr i,f1,hl `Vr j,f2,hl ď1,i,jPN1;f1,f 2PF;f1‰f2;rPKL;hl PHL;(2.41) Uk i,f,ht `Uk j,f,ht ď1,i,jPN˚;i‰j;fPF;kPKT;ht PHT;(2.42) Vr i,f,hl `Vr j,f,hl ď1,i,jPN1;i‰j;fPF;rPKL;hl PHL;(2.43)
3.2. Related work 31 computational results for the designed heuristics on the MC-TTRP, using a set of instances adapted from those in literature and data of a real application. Finally, Section summarizes the main conclusions of our study. 3.2 Related work As explained in Chapter , the MC-TTRP arises as a combination of the TTRP and the MCVRP. In order to gain insight into which solving methods may be suitable for this problem, we have investigated which techniques are most commonly used when tackling the two underlying routing problems. Regarding TTRP solution methods, heuristics are popular approximation-based strategies for solving medium- to large-scale instances. In fact, heuristics have been used in the solutions of several VRP variants, with ( ) being one of the most recent references. That study considered the problem of a food company’s distribution center. This was solved by constructing an initial solution, which was subsequently improved using a guided local search. ( ) proposed constructive and improvement heuristics for solving the VRPT. ( ) described a two-stage heuristic method for obtaining PACVRP solutions: the first phase of the algorithm involves assigning trailers to trucks and determining the optimal allocation between customers and trucks/vehicles, and then, the second phase builds the routes. Other works, such as those by ( ) and ( ), also proposed two-phase methods, where they first defined an initial solution by applying constructive procedures and then used improvement metaheuristics based on techniques such as tabu search ( , ). Later, ( ) combined a mathematical programming and local search approach to solve the TTRP, and they compared their results with those of ( ) using a set of benchmarks. Furthermore, the TTRP can be addressed using a metaheuristic approach, as in the work by ( ), where a simulated annealing algorithm was designed to find approximate TTRP solutions according to given time windows, achieving improved results in 11 of the 21 instances of ( ). In addition, in an original research, ( ) analyzed different variants of the TTRP and proposed two-stage heuristics for solving these problems, starting by building an initial solution and then moving to an improvement phase combining techniques such as local search (LS) and large neighborhood search (LNS). The behavior of the heuristics created for the TTRPTW was compared with that of the heuristic proposed by ( ). Depending on the TTRP variant considered, the authors applied a specific construction heuristic and, among them, an adaptation of the Clarke–Wright savings algorithm stood out. Subse-
32 L. DAVILA PENA quently, ( ) tailored an ALNS algorithm for the TTRPTW. This methodology has also been adapted to other routing problems with trailers, as can be seen in ( ). In terms of exact solution methods, recent references include the paper by ( ), which also proposes a branching and pricing algorithm for the TTRPTW. It provides an ALNS algorithm, as mentioned, to obtain good initial columns. Compared with existing metaheuristic algorithms, such as those designed by ( ) and ( ), they obtained highly competitive results. Some instances with up to 100 customers were optimally solved. ( ) also solved the TTRPTW exactly using a branching, bounding, and cutting algorithm. Their computational studies showed that their algorithm outperforms existing approaches on the TTRP and TTRPTW benchmark instances used in the literature. To solve the XSTTRP, ( ) developed a fast and efficient hybrid metaheuristic based on a four-phase solution approach, in which the main improvement phase consists of an iterated local search. Concerning the solving of multi-compartment problems, different approaches have been followed in recent years based on heuristics and metaheuristics. Simple constructive algorithms, such as the Clarke–Wright algorithm, have also been successfully adapted in this context, as can be seen in the literature. ( ) compared a constructive algorithm, memetic algorithm, and tabu search, concluding that the results provided by the tabu search were slightly better, although it required more computation time. ( ) used the Clarke–Wright savings algorithm to obtain a feasible initial solution. Subsequently, they performed a local search with movements taken from the literature and improved the quality of the solution previously obtained through a metaheuristic based on a guided local search. They performed a sensitivity analysis on certain parameters (number of customers and their demands, depot location, vehicle capacity, or number of products). Their computational study included a comparison with the work of ( ). ( ) considered a model with a homogeneous fleet, i.e., all vehicles have the same number of compartments, all with equal capacities. This problem is a particular case of that addressed in the current thesis. They implemented their own benchmarks and a collection of optimization methods capable of obtaining high-quality solutions, which covered a wide range of alternative approaches to construction, such as LS, LNS, and metaheuristics. ( ) defined and compared four categories of multi-compartment problems. They proposed two formulations for each case and presented a branching and cutting algorithm to solve single- and multi-period cases containing up to 50 and 20 customers, respectively. ( ) proposed a set of constructive heuristics to solve the MCVRPSD, which included stochastic versions of the nearest neighbor, nearest insertion, and
3.3. Two-phase heuristic approaches 33 savings-based approaches, adapted to the multi-compartment scenario. Among the most recent investigations of solution methods for the MC-VRP, we highlight those by ( ) and ( ). Starting from a real problem of collecting glass containers, a model formulation and branch-and-cut algorithm for solving the problem to optimality were presented. The performance of the proposed algorithm was evaluated through extensive numerical experiments. Furthermore, the economic benefits of introducing compartments to vehicles were investigated. ( ) proposed a tabu search heuristic algorithm and integrated it with an iterated local search to solve the MC-VRP. In several experiments, they analyzed the performance of the algorithm and compared it with results in the literature, finding that it produces better solutions than those provided by other existing heuristic algorithms. They considered an initial solution obtained by the Clarke–Wright savings algorithm extended to handle multiple compartments. Metaheuristics based on iterated local searches have shown very good behavior in various VRP variants (cf. , , who proposed efficient metaheuristics based on iterated local search and simulated annealing). ( ) presented a new mathematical model for the multi-depot MC-VRP. They designed a hybrid algorithm composed of ALNS and variable neighborhood search (VNS). The results were compared to the exact solutions of small instances and compared with each other in large instances. ( ) proposed an MC-VRP with a fleet of vehicles with flexible compartments. The aim of their work was to demonstrate the benefits of considering a mixed fleet consisting of both single-compartment and compartmentalized vehicles. The problem was solved using LNS. ( ) included loading constraints in the previous MC-VRP variant, and developed a branch-and-cut and an LNS algorithm to solve the resulting problem. ( ) introduced a typology for MC-VRPs and extensively reviewed the existing literature. They also made suggestions for future research. 3.3 Two-phase heuristic approaches As already stated, we have proposed different algorithms for solving the novel MC-TTRP model. All of them are two-phase methods that consist of (1) a constructive heuristic that creates a feasible solution and (2) a metaheuristic approach that iteratively improves the solution provided in the previous stage. Moreover, our algorithms can consider additional features, such as fleet limitations, and solve the classic TTRP. The following subsections describe the proposed methods in detail, starting with the construction phase, common to all algorithms.
34 L. DAVILA PENA 3.3.1 Construction phase For the first phase, we designed an ad hoc Clarke–Wright algorithm (CW) capable of handling TTRPs with compartments. The CW is a popular constructive heuristic for the basic VRP. Its strategy is to build a feasible solution based on the notion of savings in the routing cost. Typically, the CW begins by creating a starting solution for which all routes start at the depot, visit one customer, and return to the depot. It continues by computing the savings of joining each pair of these routes. Throughout each iteration, the CW considers the savings in descending order to choose which routes to merge, given that such merging is feasible. It stops when all customers have been served. Figure shows a schematic diagram of its typical implementation for solving VRP instances. !FXVWRPHU !"#$%& ' Figure 3.1: Clarke–Wright savings algorithm for the VRP. The pseudocode for our proposed CW is shown in Algorithm . First, the initial parameters, such as the total number of customers and number of VCs (nand n1, respectively), matrices of demands and distances (dand C), vehicle capacities (QTand QL), vehicle compartment configuration (HTand HL), and number of different types of products (f), are defined. Moreover, unlike classic CW, our heuristic considers two matrices of routes: Rand ˆ R. The former is updated considering those tours directly connected to the depot, while ˆ R considers the sub-tours whose roots are VCs. Consequently, as indicated in line of Algo-
3.3. Two-phase heuristic approaches 35 Algorithm 3.1 Savings-based construction heuristic for the MC-TTRP 1: procedure CW_MC-TTRP(n,n1,d,C,QT,QL,HT,HL,f) 2: Create N1“t1,...,n 1uand N2“tn1`1,...,nuŹInitialization. 3: Create Rand ˆ R 4: Create Sand ˆ S 5: Create matrices HT rem,HL rem, and T 6: Sm“1 7: while Smą0do ŹConstructive heuristics. 8: Sm“Maximum saving in tS, ˆ Su 9: if SmPSthen 10: Extract coordinates ri, jsof SmPS 11: Check type of routes riand rjusing T 12: if riand rjcan be merged then 13: Apply fusion ŹDifferent fusion cases can be seen in the description. 14: Update tR, ˆ R, S, ˆ S,HL rem,HT rem,Tu 15: else 16: Update tS, ˆ Su 17: end if 18: else 19: Extract coordinates ri, jsof SmPˆ S 20: l= Check last customer using rior rjand R 21: if rior rjcan be converted into a sub-tour then 22: Create MVR 23: Update tR, ˆ R, S, ˆ S,HL rem,HT rem,Tu 24: else 25: Update tˆ Su 26: end if 27: end if 28: end while 29: sol_route = Create route using R,ˆ R, and T 30: Add disconnected customers in sol_route, and update {T,HT rem,HL remuŹRefinement. 31: Adjust vehicle fleet creating or completing MVRs in sol_route, and update {R,ˆ R,T,HL rem,HT rem} 32: Adjust vehicle fleet splitting routes in sol_route, and update {R,ˆ R,T,HL rem,HT rem} 33: Adjust vehicle fleet switching residual routes in sol_route, and update {R,ˆ R,T,HL rem,HT rem} 34: Apply tour improvement in sol_route, and update {R,ˆ R,T} 35: Apply local search movements in sol_route, and update {R,ˆ R,T,HL rem,HT rem} 36: cw_sol = Create final route using R,ˆ R, and sol_route 37: return(list(cw_sol,T)) 38: end procedure rithm , we initialize both matrices as follows: R“¨ ˚ ˚ ˚ ˚ ˚ ˝ 010 020 . . .. . .. . . 0n0 ˛ ‹ ‹ ‹ ‹ ‹ ‚ “ˆ R, assuming that routes p0,i,0qfor iPN1are traveled by complete vehicles and routes p0,j,0q for jPN2are covered by trucks alone. Each customer’s corresponding row represents the
36 L. DAVILA PENA previous and next customer in the transport network, as appropriate. Furthermore, at the beginning of the proposed algorithm, two saving matrices are created: Sand ˆ S. The entries of Sare computed as sij “ci0`c0j´cij (for i, j PN,i “ j) , which represents the standard savings matrix. This scenario is illustrated in Figure . However, because we have two different classes of customers and given that VCs can serve as trailer parking places, we also consider savings ˆsij. These values are calculated as follows: ‚ˆsij “sij for i, j PN1or i, j PN2. ‚ˆsij “cj0`c0j´cij ´cji for iPN1and jPN2. These savings are the result of removing route p0,j,0qand converting it into a sub-tour whose root is i. That is, we will have the route p0,...,i,j,i,...,0qinstead of p0,j,0qand p0,...,i,...,0q. Figure illustrates this situation. ‚ˆsij “ci0`c0i´cij ´cji for jPN1and iPN2. These savings are analogous to the previous ones, swapping iand jin their type of customer. Figure 3.2: Calculation of sij for i, j PN. Figure 3.3: Calculation of ˆsij for iPN1and jPN2. Hence, matrix ˆ Swill have the following structure: ˆ S“ ¨ ˚ ˚ ˚ ˚ ˚ ˚ ˚ ˚ ˚ ˝ s1,1¨¨¨ s1,n1ˆs1,n1`1¨¨¨ ˆs1,n . . ..... . .. . ..... . . sn1,1¨¨¨ sn1,n1ˆsn1,n1`1¨¨¨ ˆsn1,n ˆsn1`1,1¨¨¨ ˆsn1`1,n1sn1`1,n1`1¨¨¨ sn1`1,n . . ..... . .. . ..... . . ˆsn,1¨¨¨ ˆsn,n1sn,n1`1¨¨¨ sn,n ˛ ‹ ‹ ‹ ‹ ‹ ‹ ‹ ‹ ‹ ‚ . We must also consider the features related to compartments. As shown in line of Algorithm , we create matrices HT rem,HL rem, and T. The former two are initialized as HT and HL, respectively, and are updated by setting the compartments that have already been 1Moreover, sii “0for all iPN.
3.3. Two-phase heuristic approaches 37 used to ´1. Matrix Tplays a fundamental role in this implementation because it contains all information about the vehicles’ loading procedures; it indicates the allocation details of each customer’s demand for its corresponding vehicle. Once all initial parameters have been created, our CW implementation follows an iterative process, where different routes are merged based on the maximum saving, Sm(lines – of Algorithm ). Thereafter, riand rjare considered to be routes containing customers iand j, respectively. By checking matrix T(line ), the algorithm knows which vehicles cover each of these routes; thus, we can determine the PTRs, PVRs, and MVRs. Therefore, our proposed method repeats a set of steps, while Sm, the maximum saving of Sand ˆ S, is positive (stop condition). Thereafter, each iteration of the algorithm has two discernible cases: SmPSor its opposite, SmPˆ S. The first case occurs when Smbelongs to S(lines – of the pseudocode). Our heuristic applies the classic routing merge of the CW, which considers the type of customers (VCs or TCs) involved in such saving, which is a decisive factor in the type of route generated. Thus, four different unions between routes (by connecting customer ito customer j) can be conducted, as long as iis the first customer of route riand jthe last one of route rj: 1. Merging two PVRs: If routes riand rjare PVRs covered by different complete vehicles, where the trucks are not yet loaded, the algorithm must count the number of unavailable compartments between both trailers. Two situations arise from this: (i) If the number does not exceed the number of trailer compartments, our method can move all goods to one trailer, emptying the other. (ii) If the number exceeds the number of trailer compartments, our method starts to load one of the trucks as long as the total number of available compartments is sufficient to meet the demands of both routes. Thus, it moves the goods from the other trailer to the chosen complete vehicle, giving preference to the filling of the trailer. 2. Merging two PTRs: When both routes riand rjare PTRs, our heuristic can merge them as long as the number of unavailable compartments between both trucks does not surpass the number of truck compartments. In this case, the goods are moved to one of the trucks, leaving the other free. 3. Combining an MVR with a PVR: If one of the routes is an MVR and the other is a PVR with an empty truck, say riand rj, respectively, then their union is possible when the demands already met by route rjfit in the trailer of route ri. That is, when the trailer of route rihas a sufficient number of available compartments to move goods from the trailer of route rj.
38 L. DAVILA PENA 4. Inserting route riin a PTR: If route ri“p0,i,0q, where iis a VC, and route rjis a PTR, then merging both routes is possible when the number of available compartments in the truck is sufficient to hold i’s demands. For all the above considered fusions, updating matrices tR, ˆ R, S, ˆ S,HT rem,HL rem,Tuis necessary to contemplate the changes conducted, as indicated in line . If merging cannot be completed, we must simply update matrices Sand ˆ Sby setting their corresponding entries to zero. The second case occurs when ˆ Scontains Sm, which means that the current saving arises from merging a PTR and PVR (obtaining a sub-tour as a result). Lines – of Algorithm correspond to this situation. In such a case, it is clear that customers involved in Sm have different types. Let us see how to proceed when iPN1and jPN2, because the other case is analogous. Our method can only execute merges when riis a PVR with an empty truck and rjis a PTR. With this in mind, two possibilities arise: ‚If rj“p0,j,0q, the algorithm uncouples the truck of route riand hitches the truck of route rj, loaded with j’s demands, to the trailer of route ri. This proceeds as illustrated in Figure . ‚Suppose jis the first customer of the route but not the only one. In this case, we must also consider the last customer of route rj, say, l. To join routes riand rj, it is necessary that c0j`cl0´cij ´cli is positive. We illustrate this merging in Figure . (a) Before (left) and after (right) merging when rjhas a single customer. (b) Before (left) and after (right) merging when rj has multiple customers. Figure 3.4: Merges performed when SmPˆ S. Refining the construction phase Once we have exited the main loop and no saving is positive, the algorithm must check whether the resulting route configuration is feasible. The following post-processing (lines – of the pseudocode) functions are applied in the order in which they are presented to verify
3.3. Two-phase heuristic approaches 39 (a) Convert a PTR into an MVR. (b) Merge a PVR into the main tour of an MVR. (c) Merge a PTR into the subtour of an MVR. Figure 3.5: Adjusting vehicle fleet by creating or completing MVRs. such feasibility, correct the tours if needed, improve the quality of the results, and limit the vehicle fleet: ‚Add disconnected customers: This checks if there exists a route ri“p0,i,0q, which means that customer ihas not yet been served. During the initialization of R,we mentioned that the starting routes should be covered by complete vehicles or trucks alone, depending on whether iis a VC or TC, respectively. Considering this, we supply customer iwith its corresponding type of vehicle, contemplating the compartment load in matrix T. After that, we are able to add the route p0,i,0qto the solution. ‚Adjust vehicle fleet by creating or completing MVRs: The aim of this function is to use all the available trailers in the solution obtained by eliminating excess PTRs and PVRs, either by changing or merging them into MVRs, respectively. First, because all PTRs with at least a VC can be transformed into MVRs, we convert as many PTRs into MVRs as necessary to reach the required number of trailers. Subsequently, the lowest quality PVRs and PTRs are selected to be joined either to the main tour or to one of the sub-tours of an existing MVR, provided that the result is a feasible solution. This procedure is illustrated in Figure . ‚Adjust vehicle fleet by destroying routes: It is assumed that the routes to be deleted or preserved have already been selected to adjust the fleet. Iteratively, an attempt is made to insert the first group into the second group. The method of merging these routes depends on their nature. For instance, a PTR could only be part of a sub-tour of an MVR or join another PTR. If there are no feasible insertions of a specific route to be deleted, it is split in half. The algorithm will try to add it again in the next iteration, repeating this process until there are no more residual routes or until they cannot be divided anymore. ‚Adjust vehicle fleet by switching residual routes: After applying the previous function, if there are still routes to be eliminated, they will consist of a single customer.
40 L. DAVILA PENA This last procedure to adjust the fleet exchanges these residual customers for others that have less load on the routes to be preserved while aiming to keep the cost function from increasing as much as possible. Once the exchange is conducted, the customer to be inserted requires less space. In this manner, the algorithm aims to relocate it to one of the existing routes, repeating the process until there are no residual routes left. ‚Apply tour improvement: This function performs 2-opt, 3-opt, and 4-opt* moves on the resulting routes , including the sub-tours, individually. For each route, the move that leads to the greatest cost reduction, if any, is applied. ‚Apply local search moves: Finally, a local search is applied to the solution obtained from Algorithm . This iteratively applies a set of small modifications to intensify the search on routes close to the current solution. To implement these moves, we were inspired by the work of ( ), where a hybrid approach for solving the TTRP, combining local search and large neighborhood search, was presented. We adapted some of the moves implemented in their local search to the MC-TTRP. Therefore, this function contains both specific TTRP moves as well as the standard 2-opt, 2-opt*, exchange, and relocate operators commonly used in many VRP implementations. Figure shows some of the moves performed in this step. D G E H I F Figure 3.6: Local search moves for the MC-TTRP. (a) Replacing the single customer of a sub-tour with a VC, (b) replacing a sub-tour root with another VC, (c) replacing a main tour customer with a TC, (d) exchanging a PTR and a sub-tour and relocating the parking place, (e) moving a main tour customer to a new sub-tour, (f) moving a sub-tour customer to the main tour and splitting the sub-tour. Finally, as shown in Algorithm , our constructive heuristic for the MC-TTRP completes the work, returning a feasible route and the loading configuration of all the vehicles involved in the transport network. Once this feasible initial solution has been obtained, the 2The 4-opt* procedure uses a subset of potential 4-opt moves, cf. ( ).
3.3. Two-phase heuristic approaches 47 ‚Shaw: is introduced in ( ). A customer iis randomly chosen followed by its ˜ φ´1most related customers. According to ( ), Γpi, jq, the relation between customers iand j, is based on three aspects in the TTRP: geographical position, demands, and customer types, and is calculated as Γpi, jq“fc¨cij cmax `fq¨|řfPFdif ´řfPFdjf| dmax `ft¨tij, where cmax represents the largest distance between two customers, dmax the highest demand among all customers, and tij is a binary variable which takes value 1 if customers iand jare of a different type, and 0 otherwise. Also, fc,f qand ftare parameters measuring the importance of these aspects, and we took fc“0.50,f q“0.25, and ft“0.25. ‚Shaw_Ali: this operator is a modification of Shaw according to ( ), where the relatedness formula is given by Γ1pi, jq“f1 c¨cij `f1 r¨lij. In this case, lij takes value ´1if customers iand jare in the same route, and 0 otherwise. Also, f1 cand f1 rare parameters taking both the value 0.50. ‚Proximity-based: a customer iis randomly chosen followed by its ˜ φ´1closest customers. ‚Neighborhood: selection of the ˜ φcustomers with the largest difference between its average cost and its position cost. The position cost of a customer is calculated as in Worst, and its average cost is obtained by dividing its route length (that is, the length of the route to which this customer belongs) by the number of customers in the route. ‚Neighborhood_MT: adaptation of Neighborhood where the position cost of each customer is computed as in Worst_MT. After choosing the removal operator, we know the customers that must be removed. For the removal of the customers, we use the unstringing and stringing (US) algorithm proposed by ( ). We can see some examples of deletion moves in Figure . Note 3We took these values according to ( ). Note that these authors consider a different relatedness formula, taking into account the different types of products and not considering the type of customers (they study an MC-VRP).
48 L. DAVILA PENA that it is possible to eliminate a customer that is the single customer of its route, thus releasing a vehicle (either a truck or a complete vehicle). Once we have removed ˜ φcustomers from the solution, we have to reinsert them. In the MC-TTRP, we must take into account the type of customers we need to insert and the destination routes (for instance, it is not possible to insert a TC into the main tour of an MVR). The insertion operators will determine in which routes and positions we should insert these customers. However, we must first know which insertions are feasible. This will also depend on whether the destination route is the same as the route of origin (that is, the route from which a specific customer has been removed), or not. We have implemented some insertion moves that combine the GENI procedure proposed by ( ) with some specifically created moves for the MC-TTRP. Tables and present an overview of all the possible insertions for VCs and TCs, respectively. Table 3.1: Possible insertions for VCs in an MC-TTRP. Destination route Destination route = Origin route? Type of insertion Graphical example PTR Origin route - Different route On best position, according to GENI procedure New route Create route only with this customer, if there are not available trailers but there are available trucks PVR Origin route We only contemplate this insertion if the origin route was an MVR and the VC was in a sub-tour Insert this customer on its best position, according to GENI procedure Different route Insert this customer on its best position, according to GENI procedure New route Create route only with this customer, if there is available fleet
3.3. Two-phase heuristic approaches 49 Table 3.1: Possible insertions for VCs in an MC-TTRP (continued). Destination route Destination route = Origin route? Type of insertion Graphical example MVR Origin route This VC could originally be in the main tour or in a sub-tour. We have different insertion possibilities If the VC was originally in the main tour, insert it on an already existing sub-tour, according to GENI procedure. Choose the sub-tour with the cheapest insertion If the VC was originally in a sub-tour, insert it into the main tour, following the GENI procedure Different route Insert this VC in the main tour, according to GENI procedure Insert this VC into an existing sub-tour, according to GENI procedure. Choose the cheapest insertion from all the possible sub-tours New route - Table 3.2: Possible insertions for TCs in an MC-TTRP. Destination route Destination route = Origin route? Type of insertion Graphical example PTR Origin route - Different route On best position, according to GENI procedure New route Create route only with this customer, if there is any available truck
50 L. DAVILA PENA Table 3.2: Possible insertions for TCs in an MC-TTRP (continued). Destination route Destination route = Origin route? Type of insertion Graphical example PVR Origin route This means that now the route is PVR but initially it was an MVR (in the removal phase all subtours have been eliminated, one of which contained this TC) Insert this customer as the only customer of a new subtour. The trailer parking place will be the VC on the main tour for which this insertion is the cheapest, regarding the VC was not the trailer parking place of this TC before the removal phase Different route This route will turn into an MVR after this insertion Insert this customer as the only customer of a new subtour. Choose the trailer parking place for which this insertion is the cheapest New route - MVR Origin route This TC belonged to a sub-tour in this MVR before the removal phase Insert this TC in a different sub-tour, if any, according to the GENI procedure. Choose the cheapest insertion from all the possible sub-tours Create a new sub-tour with this TC. Choose the VC of the main tour for which this type of insertion is the cheapest, as long as this is not the sub-tour of origin Different route Insert this TC into an existing sub-tour, according to GENI procedure. Choose the cheapest insertion from all the possible sub-tours Create a sub-tour only with this TC. Choose the trailer parking place for which this insertion is the cheapest New route -
3.3. Two-phase heuristic approaches 51 Now, for the removed customers, we calculate the increment in the solution cost when we insert them into all their possible routes. The insertion operators we detail below will determine in which routes (from those that are possible) we should insert the customers. Note that most of the insertion operators are myopic: an iterative procedure is followed to insert the customers in the order in which they were removed. When a customer is inserted, the number of possible insertions for the remaining customers is restricted. ‚Greedy: customers are inserted into a route and a position that minimizes the increase in the total cost. ‚Random_i: customers are randomly inserted in one of their possible routes and positions. ‚p-Best: customers are randomly inserted in one of their pcheapest insertions. The selection of pdepends on the number of possible insertions (n_ins) for a customer. If there is only one possible insertion, p“1; if the number of possible insertions is ď10, then p“2; and if there are more than 10 possible insertions, then p“r0.20 ¨n_inss. ‚Regret-2: in this case, customers are not inserted in the order they were removed. For the ˜ φcustomers, we compute the difference between its best insertion and its second best insertion. Let xiq denote the route and position where customer ihas its q-th lowest insertion, and Δi,xiq the cost of inserting customer iinto xiq. The regret value is in this case computed as c˚ i“Δi,xi1´Δi,xi2. The method chooses to insert customer ˆ i“arg maxic˚ iinto xˆ i1. If there is a tie, we first insert the customer with the lowest insertion cost. Once a customer has been selected and inserted, we have to repeat the procedure for the remaining ones. ‚GIN: following ( ), this operator is an extension of the Greedy insertion, in which a degree of freedom is considered when choosing the best insertion position of a certain customer. All the possible insertion costs are added the value cmaxμε, where cmax is the maximum distance between customers, εis randomly selected from the Ur0,1s, and μis a parameter used for diversification of the solution (μ“0.1). ‚RIN: this operator is an extension of the Regret-2 insertion in the same way that GIN is for the Greedy operator. As in ( ), μ“0.1. ‚Greedy_subtours: is an adaptation of Greedy, in which the possible insertions are limited to those options that involve sub-tours.
52 L. DAVILA PENA ‚Random_i_subtours: is an adaptation of Random_i, in which the possible insertions are limited to those options that involve sub-tours. ‚p-Best_subtours: is an adaptation of p-Best, in which the possible insertions are limited to those options that involve sub-tours. ‚Regret-2_subtours: is an adaptation of Regret-2, in which the possible insertions are limited to those options that involve sub-tours. ‚GIN_subtours: is an adaptation of GIN, in which the possible insertions are limited to those options that involve sub-tours. ‚RIN_subtours: is an adaptation of RIN, in which the possible insertions are limited to those options that involve sub-tours. After having applied one of the insertion operators described above, we return a feasible solution where all customers are present. Note that reinserting some customers may not be possible, in which case we output the solution we had before the removal phase. Weight initialization The removal and insertion operators will be selected in each iteration of the ALNS according to some weights. At the beginning of the algorithm, the insertion and removal matrices are initialized. As the procedure is analogous for both matrices, we will explain the initialization of the removal matrix. The dimension of the removal matrix is 4ˆ|R|. Each column corresponds to a removal operator RPRand in the rows we have the number of times operator R has been selected, TimesR, its weight, ωR, its score, πR, and the probability of the operator being selected, pR. Naturally, TimesRand πRare initialized to 0. The weight, ωR, is initially set to 1and the probability of selecting operator Ris computed as pR“ωR řR1PRωR1. Tabu criterion In order to diversify the method, we have considered a tabu criterion that prevents us from choosing the same removal and insertion operators in two consecutive iterations. Thus, at each iteration, we store in a tabu list the selected operators RPRand IPIwith survival counters of 1. That is, in the first iteration of the method we have |R|and |I|removal and insertion operators available, respectively. However, in the following iterations there are only |R|´1and |I|´1.
3.3. Two-phase heuristic approaches 53 Improvement phase We have implemented an improvement function that is carried out at each iteration. After reinserting the customers, the algorithm performs an intra-route local search in the candidate solution. This process consists in applying 2-opt, 3-opt, and 4-opt* moves on the resulting routes, including the sub-tours, individually. For each route, the move that leads to the greatest cost reduction, if any, is implemented. Acceptance criterion If the cost of the candidate solution is lower than the cost of the current solution, the candidate solution is accepted. Otherwise, we use an aspiration criterion based on simulated annealing: we accept worse solutions with a probability of e´pcandidate_cost-current_costq T, where Tdenotes the temperature. At the beginning of the algorithm, the temperature is initialized as T1“´0.005 log 0.5¨current_cost, and it will be updated at the end of each iteration as Titer`1“δ¨Titer, where the cooling rate, δ, has been set to 0.999. Weight updating During the first 100 iterations of the algorithm, the weights for the removal and insertion operators are not updated. In this phase, scores are built for the operators based on the evaluation of the candidate solution obtained in each iteration: ‚If the candidate solution improves the best solution, then the scores of the selected removal Rand insertion Ioperators are incremented by σ1, i.e., πR“πR`σ1and πI“πI`σ1, with σ1“20. ‚If the candidate solution improves the current solution, then the selected removal and insertion operators are incremented by σ2“10. ‚If the candidate solution did not improve the current solution, there is still a probability that the operators get a positive score, and this happens if this worse solution is accepted. The acceptance of a worse solution is determined by the aspiration criterion explained above. In such a case, the selected removal and insertion operators are incremented by σ3“2.
54 L. DAVILA PENA Once we have trained our algorithm for 100 iterations, the weights start to be updated. Throughout the iterations, the removal and insertion operators continue getting scores in the same way as at the beginning of the process. The weights for any operator jare updated as in ( ): ωiter`1 j“λ¨πiter j Timesiter j`p1´λq¨ωiter j, where λhas been selected as 0.1. At each iteration, removal and insertion operators are selected by the use of a roulette wheel (by considering the cumulative probabilities), as long as they are not stored in the tabu list. Stopping criterion The algorithm terminates when either the number of maximum iterations or the maximum time allowed is reached. Comprehensive overview of the proposed ALNS Algorithm outlines our proposed ALNS, of which we will now give a brief description. The input parameters are the solution returned by the CW (cw_sol), which is the initial solution, the sets of removal and insertion operators (Rand I, respectively), and a maximum number of iterations (max_iter) and allowed time (max_time) that will be used as the stopping criteria. In the first lines of the pseudocode (lines – ), all the elements necessary for the proper functioning of the algorithm are initialized. Then, we enter the main loop (lines – ), where the candidate solution is initialized as the current solution. As can be seen in lines – , the candidate solution is transformed at each iteration after having removed and reinserted ˜ φof its customers, according to the selected removal and insertion operators. Then, the intra-route local search previously described is applied to this solution (line ). As presented in lines – , the current solution will be updated by the candidate solution as long as the latter has a lower cost, and if not, there is a certain probability that it will be updated as well (see the aspiration criterion explained above). Lines – check whether the current solution can update the best overall solution. After this, removal and insertion matrices are updated, as well as the temperature (lines and ). Finally, the algorithm terminates when the stopping conditions are fulfilled, and it outputs the best solution found during the search.
3.3. Two-phase heuristic approaches 55 Algorithm 3.4 Adaptive large neighborhood search for the MC-TTRP 1: procedure ALNS_MC-TTRP(cw_sol,R,I,max_iter,max_time) 2: best_sol Ðcw_sol 3: current_sol Ðcw_sol 4: iter Ð1,init_time Ðsystem time 5: Initialize removal and insertion matrices, MRand MI 6: Initialize temperature, TÐT1 7: Create new tabu_list “tu 8: while !stopping conditions do 9: candidate_sol Ðcurrent_sol 10: Choose ˜ φrandomly using β(2,5) 11: Select RPRand IPIusing MRand MI, provided they are not stored in tabu_list 12: candidate_sol ÐRemove and reinsert ˜ φcustomers from current_sol, according to pR, Iq 13: Replace the operators in tabu_list with pR, Iq 14: candidate_sol ÐApply intra-route improvement to candidate_sol 15: sol_improved, sol_worsened, best_improved Ð0 16: if cost(candidate_sol)ăcost(current_sol)then 17: current_sol Ðcandidate_sol 18: sol_improved Ð1 19: else 20: diff “cost(candidate_sol)´cost(current_sol) 21: with probability exppp´diffq{Tq,current_sol Ðcandidate_sol,sol_worsened Ð1 22: end if 23: if cost(current_sol)ăcost(best_sol)then 24: best_sol Ðcurrent_sol 25: best_improved Ð1 26: end if 27: Update matrices MRand MIusing pR, Iq,sol_improved, sol_worsened, and best_improved 28: Update T 29: Check stopping conditions using iter, init_time, max_iter, max_time 30: iter “iter `1 31: end while 32: return(best_sol) 33: end procedure 3.3.4 Hybrid ALNS with tabu search (ALNS-TS) Another algorithm that we have implemented for the second phase of our proposal is a hybrid of ALNS and tabu search (TS), which we have called ALNS-TS. This hybrid methodology has the advantage of combining the diversification capability of ALNS with the intensification provided by TS. The ALNS-TS starts from the feasible solution returned by the constructive heuristic described in Subsection . The ALNS detailed in Algorithm is then applied to this initial solution, adding an extra condition at the end of the main loop: every time the best overall solution is improved, or the number of iterations is a multiple of 100, a call is made to the TS presented in Algorithm . The idea is to intensify the search by exploring a large number of neighborhoods, rather than limiting it to a single one, as is done by the ALNS at
56 L. DAVILA PENA each iteration. The TS has the ability to accept slightly worse solutions or to move through the infeasible region, thus also performing a diversification of the search. Furthermore, a tabu list is used to avoid stagnation. While it is true that the TS can navigate through the infeasible solution space, it must return a feasible solution, otherwise our ALNS cannot operate. This has motivated us to design the metaheuristic explained in the following subsection. 3.3.5 Penalized ALNS-TS (PANLS-TS) The fourth of the algorithms implemented for the second phase of our proposal is also ALNS- based. In particular, it is derived from the ALNS-TS introduced in Subsection .An existing issue in MC-TTRPs is that the search often starts from a solution in which there are very few possible moves because the trucks and trailers are heavily loaded. This sometimes leads to stagnation, as the search often returns to the same solutions. For this reason, we have implemented the penalized ALNS-TS (PALNS-TS), a version of the ALNS-TS capable of handling infeasible solutions, intending to increase the number of possible moves in each iteration of the ALNS itself. In this way, to measure the total cost of each route, r, along the ALNS, we consider the following objective function: ˜ OFprq“distprq`˜α¨˜ Exprq, where distprqis the total distance traveled, ˜αa parameter of penalty, and ˜ Exprqdenotes the number of extra compartments that are being used in the vehicle covering route r. The ˜α penalty is calibrated in the same way as αis in equation ( ), considering that violating the constraints now means using more compartments than those available: in the case of feasibility, the penalty is decreased by a factor 1`˜γ. Otherwise, if the current solution is using more compartments than those available, ˜αis increased by 1`˜γ. The parameter ˜γ is set to 0.01 at the beginning of the method. Consequently, this update strategy oscillates between feasible and infeasible solutions. Therefore, at each iteration, the PALNS-TS has to consider whether or not the insertion it chooses produces infeasibility, and this infeasibility will be limited. In our case, the solution cannot have more than four extra compartments. This parameter is certainly configurable, but we decided not to allow a high value for the infeasibility to avoid the search spending too much time exploring the infeasible space. Thus, our proposal will take into account the ˜α¨˜ Exprqscore when selecting the insertion move (except for the Random_i).
3.4. Computational study 63 Table 3.11: Computational results for 21 test TTRPs. Problem number Constructive phase Improvement phase Number of vehicles Our CW Chao Caramia Our ITS Chao Caramia BKS Trucks Trailers 1632.38 646.02 645.72 565.01 565.02 566.80 564.68 5 3 2 711.93 739.90 699.68 635.28 658.07 620.15 612.75 5 3 3 805.34 774.78 770.19 634.16 648.74 632.48 618.04 5 3 4 1002.58 943.47 902.89 809.29 856.20 803.32 798.53 9 5 5 1067.48 1130.85 1035.89 844.46 949.98 842.50 839.62 9 5 6 1193.98 1236.69 1171.50 981.08 1053.23 938.18 933.26 9 5 7899.74 906.31 902.18 852.93 832.26 832.56 830.48 8 4 8 1028.96 971.60 970.45 887.26 900.54 878.87 878.36 8 4 9 1138.93 1106.66 1082.99 958.50 971.62 980.42 934.47 8 4 10 1213.15 1159.78 1151.23 1079.73 1073.50 1060.41 1039.07 12 6 11 1276.23 1288.74 1288.74 1123.43 1170.17 1170.70 1094.11 12 6 12 1408.93 1453.82 1440.12 1224.71 1217.01 1178.34 1155.13 12 6 13 1530.66 1481.40 1480.46 1344.82 1364.50 1288.46 1287.18 17 9 14 1617.71 1624.96 1612.34 1444.89 1464.20 1372.52 1353.08 17 9 15 1706.19 1858.87 1752.94 1499.29 1540.25 1470.21 1457.61 17 9 16 1349.67 1267.87 1060.26 1015.26 1041.36 1004.69 1002.49 7 4 17 1376.31 1261.17 1120.34 1073.77 1090.46 1042.35 1042.35 7 4 18 1439.34 1366.21 1220.25 1205.46 1141.36 1129.16 1129.16 7 4 19 1141.59 969.96 880.22 852.01 854.02 813.50 813.50 10 5 20 1097.47 1140.47 961.25 908.87 942.39 848.93 848.93 10 5 21 1085.61 1174.43 1009.68 930.70 926.47 909.06 909.06 10 5 ered by all routes once an initial feasible solution is achieved. Note that we have considered the objectives reported by when a descent improvement subroutine is implemented. Concerning the solutions obtained by the constructive stage, our savings-based heuristic allowed the creation of feasible routes, improving on the objectives reported by and in some cases, and outperforming both of them in five problems. Furthermore, the next four columns indicate the objective achieved in the improvement phase, where BKS denotes the best known solution values according to ( ). For and ’s algorithms, values represent their best obtained solutions, with no further details given. In our case, we carried out 500 iterations of the ITS and report the best value over 10 runs. Finally, the last two columns indicate the corresponding available numbers of trucks and trailers. With respect to computation times, our algorithm requires from 7 to 200 min to achieve the best solutions reported in Table . Note that our heuristic is efficient to solve the TTRP, but it is actually designed to solve the MC-TTRP. We present the above comparison with existing TTRP solutions in an indicative way to show that our algorithm performs well
64 L. DAVILA PENA Table 3.12: Computational results for 21 test MC-TTRPs. Problem number CW objective ITS objective No. of used vehicles Number of routes Occupancy rate Time (min) Trucks Trailers PTR PVR MVR Trucks Trailers Total 1 662.94 624.74 8 4 4 3 1 0.80 1 0.84 6.00 2 832.60 702.20 8 4 4 0 4 0.86 0.90 0.86 7.79 3 885.79 741.43 8 3 5 0 3 0.98 0.80 0.95 23.23 4 1013.57 895.62 13 8 5 5 3 0.79 0.98 0.84 52.71 5 1154.20 986.80 14 7 7 3 4 0.85 0.83 0.84 25.09 6 1264.09 1089.63 14 5 9 0 5 0.98 0.72 0.94 18.93 7 1013.72 928.40 11 6 5 6 0 0.89 0.87 0.89 58.71 8 1065.40 997.44 12 4 8 4 0 0.85 1 0.87 54.46 9 1357.50 1059.51 11 4 7 0 4 0.96 0.90 0.96 46.89 10 1336.31 1256.32 18 9 9 5 4 0.81 0.84 0.81 55.42 11 1422.93 1339.16 18 7 11 4 3 0.91 0.74 0.89 41.76 12 1683.38 1394.58 18 4 14 0 4 0.96 0.80 0.95 56.74 13 1670.52 1587.07 23 13 10 7 6 0.87 0.94 0.88 60.02 14 1858.74 1721.16 26 12 14 7 5 0.85 0.68 0.83 58.67 15 2072.08 1773.33 25 10 15 0 10 0.93 0.68 0.90 56.45 16 1681.63 1437.49 11 6 5 5 1 0.90 0.87 0.90 59.98 17 1891.04 1549.24 11 5 6 0 5 0.91 1 0.92 56.53 18 1968.90 1522.39 11 4 7 0 4 0.95 1 0.96 58.90 19 1026.90 876.95 12 8 4 4 4 0.74 0.80 0.75 47.02 20 1125.28 965.85 13 4 9 0 4 0.76 1 0.78 29.98 21 1115.85 960.92 12 4 8 0 4 0.86 0.80 0.85 22.32 on problems that may be similar. Returning to the specific problem of interest, Table shows the performance of the proposed heuristic, on the 21 instances of the MC-TTRP described in Table , considering the compartments properly. The first columns indicate the problem number and the objective of the constructive phase. The remaining columns refer to the ITS solution, which corresponds to the best solution found for this method in the computational study of Subsection . Columns 3 to 8 show the objective of the improvement phase (after running the ITS for 1 hour, reporting the best value over 10 runs), vehicles used, and different routes created. The next columns list the vehicle occupancy rate. Column 9 shows the number of truck compartments used divided by the total number of truck compartments in the solution. For instance, the total number of truck compartments in problem 1 was 160 (eight trucks used with 20 compartments each). Column 10 is analogous, considering trailers instead of trucks. The “Total” column is the quotient of the sum of used truck and trailer compartments divided by the total number of compartments in the solution. That is, for problem 1, the total number is 200 (160 truck plus 40 trailer compartments). Finally, the last column refers to the time (in minutes) in which the best reported solution was reached.
3.4. Computational study 65 To complement the analysis presented in Table , it should be noted that the occupancy rates are relatively high, with averages of 88%, 86%, and 88% for trucks, trailers, and total, respectively. To provide a better interpretation of the results, we calculated the average rates for groups G1, G2, and G3. The values obtained for trucks were 83%, 86%, and 95%, respectively; thus, we can see that there is a growth in the truck occupancy rate as the number of truck customers increases. The opposite applies in the case of trailers: the rates are 90%, 88%, and 81% for groups G1, G2, and G3, respectively. These results are promising because feasible solutions were achieved at low computational cost. Application to real-world data To evaluate the quality of our heuristic algorithm, we considered the data of the real-world example described in Subsection . We solved a set of different-sized problems by combining customers of the agricultural cooperative: P1, P2, and P3 have four customers of each type; P4 and P5 have nine customers, five of which are VCs; and P6, P7, and P8 involve 10 customers, five VCs and five TCs. All of these instances imply two trucks with 13 hoppers that can contain up to 1.5 tons each and one trailer with 15 hoppers with a maximum capacity of 2 tons. Given this information, Table gives a comparison between the solutions of both methods. Furthermore, Table provides the lower and upper bounds and relative gaps for the exact formulations of those 8 problems by setting a time limit of three hours. It can be seen that problems with 10 customers present a positive gap, which in the particular case of P8 is relatively large. Table shows that our algorithm achieved the exact objective for problems P1, P3, P4, and P5, although the loading procedures were not always the same. Our heuristic did not achieve the exact optimal values for the remaining instances, but there was an increase of at most 2.90% in the objective (which occurred for P8). However, the execution times of the heuristic were significantly shorter (by several orders of magnitude) than those of the exact method. Although optimality convergence was not achieved for all problems, these results are promising because a feasible solution (close to the optimal one) was obtained at a much smaller computational cost (in less than 10 s). For a fair comparison of the times reported in this table, both the model and the heuristic have been run on the Intel i7 mentioned above. Moreover, the number of vehicles and types of routes were the same for both methods in every problem, except for P5; in this case, our approach served all VCs in an MVR, while TCs were served by a PTR. However, the exact solution allocated one of the TCs to a subtour with customer 3 as the trailer parking place. Figure illustrates the results for this instance.
66 L. DAVILA PENA Table 3.13: Results obtained by the exact model versus results obtained with our heuristic algorithm (after 100 iterations of the ITS). Problem number Size Method Objective Occupancy rate Time (s) Trucks Trailers Total P1 8 Exact 189 0.92 0.80 0.88 309.27 Heuristic 189 0.88 0.87 0.88 5.03 P2 8 Exact 140 0.81 0.73 0.78 6733.20 Heuristic 142 0.81 0.73 0.78 3.88 P3 8 Exact 106 0.77 0.67 0.73 1275.75 Heuristic 106 0.77 0.67 0.73 3.90 P4 9 Exact 256 0.85 0.80 0.83 16,766.70 Heuristic 256 0.81 0.87 0.83 5.58 P5 9 Exact 109 0.81 0.80 0.80 17,511.00 Heuristic 109 0.62 1 0.76 4.72 P6 10 Exact 222 0.96 0.67 0.85 221,019.00 Heuristic 223 0.92 0.67 0.83 6.48 P7 10 Exact 237 0.92 0.80 0.88 671,316.00 Heuristic 238 0.88 0.87 0.88 7.97 P8 10 Exact 207 0.96 0.67 0.85 112,389.00 Heuristic 213 0.69 1 0.80 6.09 Table 3.14: Lower and upper bounds and gaps for the exact formulation. Problem number Lower bound Upper bound Relative gap P1 189 189 0 P2 140 140 0 P3 106 106 0 P4 256 256 0 P5 109 109 0 P6 198 222 0.11 P7 185 237 0.22 P8 73 207 0.65 As another illustrative example of the difference between the exact solution and the heuristic, we show the route configuration for P8 in Figure . The customers of the subtour presented in the optimal solution, 2–9–7–8–2, are part of a PTR in our algorithm’s result. Customer 5 was selected the trailer parking place for the sub-tour of the heuristic solution, 5–10–6–5. Table also indicates that, as opposed to the exact result, the heuristic approach gives preference to the loading of trailers, having an average occupancy rate of 86%, while the trucks are 78% full on average. The total occupancy rate does not differ significantly between
3.5. Conclusions and further research 67 Figure 3.10: Solutions obtained by Gurobi (left) and the two-phase heuristic (right) for problem P5. Figure 3.11: Solutions obtained by Gurobi (left) and the two-phase heuristic (right) for problem P8. these two methods. 3.5 Conclusions and further research This part of the thesis considered a routing problem for trucks and trailers divided into compartments, called the MC-TTRP. In Chapter , we proposed a novel mathematical formulation of this model as an MILP problem and presented a detailed explanation of its constraints. A real-world example of a Spanish agricultural cooperative that distributes feed to its customers was considered to verify the proposed model. Given that exactly solving the problem for large-sized instances is computationally expensive, the use of operational research approximate techniques is necessary to obtain solutions. Therefore, in the present chapter, we introduced and implemented four heuristic algorithms to reduce computation time. Our proposals are two-stage approaches: the first phase iteratively builds an initial solution, based on the savings method of , and then the second phase aims to refine the solution. To achieve this, metaheuristics based on tabu search and large neighborhood search were designed: the iterated tabu search (ITS), the adaptive large neighborhood search (ALNS), the hybrid ALNS with tabu search (ALNS-TS), and the penalized ALNS-TS (PALNS-TS). We
68 L. DAVILA PENA conducted a thorough computational study on different datasets. First, we suitably adapted the 21 TTRP benchmark problems of ( ) to consider compartments, leading to 21 challenging test instances. Our heuristics always generated feasible solutions to the test problems, and the objectives obtained showed that our methods can effectively and efficiently solve the MC-TTRP. A comparative study of the four proposed metaheuristics was carried out and it was found that ITS produced better results. Accordingly, an in-depth analysis of the ITS was performed. First, we tailored our method to the TTRP. ’s benchmark problems were examined and the solutions reported by both ( ) and ( ) were compared to ours. We also conducted a more detailed research on the generated instances. Furthermore, this algorithm was applied to the previously mentioned real-world case of a cooperative. A comparison between our results and those provided by the exact formulation showed a significant decrease in computational cost, achieving goodquality solutions to the problems. Considering this, we believe that the proposed heuristic is a promising solution approach for the MC-TTRP. There is still much room for further research on this variant of the VRP. It would be interesting to apply the model and solution algorithms to other feed producing companies similar to that considered in this study as well as other businesses, such as milk collection and fuel distribution companies. Another open research direction is to extend the model to include modifications, such as stochastic demands, time windows, or heterogeneous vehicle fleets, to address other similar real-world problems. Moreover, in view of the different ingredients that make up our model, including route design, assignment of customers to vehicles, and loading of compartments, exploring the performance of decomposition techniques for solving it could provide good results. In addition, future work could be to investigate more thoroughly the four proposed algorithms from a comparative point of view. For the 21 generated instances, the ITS was found to be preferable to the other methods. Nevertheless, these instances may not cover the whole instance space. Thus, one possible line of research could be to apply the Instance Space Analysis (ISA, , ) methodology, creating new test problems to fill empty regions in the instance space and see whether ITS is actually superior over the entire area or depends on the specific features of each problem. For this purpose, the Melbourne Algorithm Test Instance Library with Data Analytics (MATILDA) tool ( , ) can be of great support. The code and instances required to reproduce the results reported herein are available at .
Part II On game theory in classification problems
Introduction to game theory and classification problems Part of this dissertation deals with the evaluation of the influence that certain features have on a classification problem. This part is organized in a single chapter that proposes an influence measure based on game theory ideas. There are many situations in which we need to anticipate a certain output by knowing specific inputs. These types of problems arise in a wide range of fields such as science, economics, or health care. For instance, we may be interested in predicting the profits of a certain company, or in knowing whether or not a given patient suffers from a disease. The latter case, in which the response is categorical, is framed within classification problems. Aclassification problem consists of predicting the value of a qualitative response variable for one or more individuals, making use of the values we know of certain variables (features) of such individuals. Those predictions are based on the knowledge obtained through a training sample of individuals whose values of the features and of the response variable are known. Classification problems have been extensively studied in the field of statistics, but can also be addressed by using machine learning techniques. Numerous classifiers have been proposed and analyzed in the machine learning literature (see, for example, , ). An important aspect when dealing with classification problems involves identifying the most decisive features for accurately predicting the response. Several methodologies have been adopted to rank these explanatory variables (see , ), most of which are model-dependent, i.e., they rely on the predictor that has been used. Nevertheless, explanation methods that are independent of the classifier in question have been also developed. In particular, ( ) introduced one of those methods using the Shapley value of cooperative games ( , ). Acooperative game is a pair pN,vq, where Nis the finite set of players, and v:2 NÑR is the characteristic function of the game, which satisfies vpHq “ 0. We usually interpret vpSqas the gain that coalition SĎNcan obtain. Also, GpNqrepresents the set of all
72 cooperative games with set of players N. In general, we identify pN,vqwith its characteristic function, v. An extensively addressed problem in cooperative games is how to allocate vpNqamong the cooperating agents. One of the most important allocation rules is the Shapley value, Φ: GpNqÑRN, which represents a fair compromise for the players and it is defined by the following expression: Φipvq“ ÿ SĎNztiu |S|!p|N|´|S|´1q! |N|!pvpSYtiuq´vpSqq, for all vPGpNqand iPN. The Shapley value has many applications in a wide range of fields. Just to give a few instances, ( ) uses the Shapley value for water resource allocation in multinational river basins, ( ) proposes a new quota system for the milk market that is based again on the Shapley value, and ( ) makes use of the Shapley value in their study of alliance formation in an assembly system where several upstream complementary suppliers produce components and sell them to a downstream manufacturer. ( ) is a recent review of the Shapley value, its variants, and its applications. Different axiomatic characterizations of the Shapley value have been proposed through some of its properties. We will not go into detail in the present thesis, but the reader is referred to the work of ( ) for further study of cooperative games and, more specifically, of this value. In Chapter we will propose an influence measure of the different features in a classification problem. To do so, the Shapley value will be used. We provide properties that satisfies such a measure and characterize it axiomatically. In addition, a computational study is conducted and an application of the measure to a COVID-19 database is presented.
4.2. Axiomatic characterization 79 pX, Y, Mq, every aRPAR(RĎK), bPB,TĎK(T‰H), and l, m PTwith l‰m, IlpaR,b,Tq´IlpaR,b,Tztmuq “ ImpaR,b,Tq´ImpaR,b,Tztluq. Now we state and prove the main mathematical result of this section. It provides a characterization and a formal expression of an influence measure that satisfies all the properties introduced above. Theorem 4.2. There exists a unique influence measure for pX, Y, Mqthat satisfies the properties of fM-Efficiency and Balanced Contributions. For all aRPAR(RĎK), bPB, TĎKpT‰Hqand lPT, this measure (that we denote by IΦ) is given by IΦ lpaR,b,Tq“ 1 nb aRÿ pXi,Y iqPMb aR Φlpvb Xi|Tq,(4.2) where Φdenotes the Shapley value, vb Xidenotes the game with set of players Kgiven by vb XipSq“ 1 |AKzS|ÿ a1 KzSPAKzS fM bpXi S,a 1 KzSq´ 1 |A| ÿ a1PA fM bpa1q,(4.3) for all SĎK, and vb Xi|Tdenotes the restriction of the game vb Xito the subsets of T. Proof. Existence. To show that IΦsatisfies fM-Efficiency, take aRPAR(RĎK), bPB, and TĎKpT‰Hq. ( ) proves that the Shapley value of cooperative games satisfies an efficiency property. In our case, this property implies that ÿ lPT Φlpvb Xi|Tq“vb XipTq. Applying this result we obtain that: ÿ lPT IΦ lpaR,b,Tq “ÿ lPT 1 nb aRÿ pXi,Y iqPMb aR Φlpvb Xi|Tq “1 nb aRÿ pXi,Y iqPMb aRÿ lPT Φlpvb Xi|Tq 1The game in ( ) results to be the same as the one used in ( ) to assess the importance of the various features in the classification of a particular individual in a classification problem.
80 L. DAVILA PENA “1 nb aRÿ pXi,Y iqPMb aR vb XipTq “1 nb aRÿ pXi,Y iqPMb aR ¨ ˝ 1 |AKzT|ÿ a1 KzTPAKzT fM bpXi T,a 1 KzTq´ 1 |A| ÿ a1PA fM bpa1q˛ ‚ “1 nb aRÿ pXi,Y iqPMb aR fM bpXi,Tq, which equals expression ( ). To show that IΦsatisfies Balanced Contributions, let aRPAR(RĎK), bPB,TĎK pT‰Hq, and l, m PTwith l‰m. ( ) proves that the Shapley value of cooperative games satisfies a property of balanced contributions. In our case, this property implies that Φlpvb Xi|Tq´Φlpvb Xi|Tztmuq“Φmpvb Xi|Tq´Φmpvb Xi|Tztluq. Applying this result we obtain that: IΦ lpaR,b,Tq´IΦ lpaR,b,Tztmuq “1 nb aRÿ pXi,Y iqPMb aR Φlpvb Xi|Tq´ 1 nb aRÿ pXi,Y iqPMb aR Φlpvb Xi|Tztmuq “1 nb aRÿ pXi,Y iqPMb aR`Φlpvb Xi|Tq´Φlpvb Xi|Tztmuq˘ “1 nb aRÿ pXi,Y iqPMb aR`Φmpvb Xi|Tq´Φmpvb Xi|Tztluq˘ “1 nb aRÿ pXi,Y iqPMb aR Φmpvb Xi|Tq´ 1 nb aRÿ pXi,Y iqPMb aR Φmpvb Xi|Tztluq “IΦ mpaR,b,Tq´IΦ mpaR,b,Tztluq. Uniqueness. We show uniqueness by induction on the size of T. Suppose that I1and I2are two influence measures satisfying fM-Efficiency and Balanced Contributions. If |T|“1,by fM-Efficiency, I1paR,b,Tq“ 1 nb aRÿ pXi,Y iqPMb aR vb XipTq“I2paR,b,Tq. Assume now that I1paR,b,Sq“I2paR,b,Sqfor all SĎTwith 1ď|S|ă|T|. Then, by
4.3. Empirical results 81 Balanced Contributions, for all l, m PT,l‰m, I1 lpaR,b,Tq´I1 mpaR,b,Tq“I2 lpaR,b,Tq´I2 mpaR,b,Tq.(4.4) Using fM-Efficiency, ÿ lPT I1 lpaR,b,Tq“ÿ lPT I2 lpaR,b,Tq.(4.5) By ( ) and ( ) it is obtained that: I1 lpaR,b,Tq“I2 lpaR,b,Tqfor all lPT. This last expression gives the uniqueness. 4.3 Empirical results In this section, we show the performance of the proposed influence measure ( ) by means of a computational study. Three different experiments have been carried out using the software R. The objective of such simulations is to corroborate that the results obtained by the methodology introduced in the current work are in accordance with the expected ones. Furthermore, these results are compared with those obtained by the influence measure introduced in ( ), which counts the number of times that a modification in a feature results in a different classification. We provide the formal definition of such an influence measure below. Definition 4.3. Given a training set M“tpXi,Yiqun i“1and a classifier fM, the influence of the j-th feature is χjpfMq“ ÿ a1PtXiuÿ ajPAj: pa1 ´j,ajqPtXiu min "ˇˇˇˇ arg max bPB fM bpa1 ´j,a jq´arg max bPB fM bpa1qˇˇˇˇ ,1*, where pa1 ´j,a jqdenotes the vector pa1 1,...,a 1 j´1,a j,a 1 j`1,...,a 1 kq,BĂN, and tXiudenotes tpXi 1,...,Xi kqun i“1. The classifier used in this chapter is ’s random forest classifier ( , ), implemented in Weka and used through RWeka . This choice is motivated by the excellent result of the random forest type classifiers (see, for example, , ). The code was run on a quad-core Intel i7-8665U CPU with 16GB RAM. 2 . 3 .
82 L. DAVILA PENA The procedure adopted in the experiments is as follows. We start from a sample of individuals from which their attributes and response are known, M“tpXi,Yiqun i“1. Right after, such sample is used to train a previously chosen classifier, obtaining fM. To evaluate the influence of feature Xjon the response Ytaking the value b, the quantities IΦ jpaj,b,Kq and řlPKIΦ lpaj,b,Kqare computed and analyzed for all ajPAj. For the first experiment, a sample of 1000 instances with four binary features was generated, tX1,X 2,X 3,X 4u. Such attributes take the values 0and 1with probability 0.5(hence, ajPAj“t0,1u,jPK). In half of the instances, the value of Ycoincides with the value of X1, while in the remaining instances the value of Ycoincides with the value of X2; note thus that bPB“t0,1u. The following step is to select those observations whose assigned class was b“1. Afterward, for each attribute Xj,jPK, and each of its possible values, we study the influence that such feature had on the response when it took such value. Since the procedure by which the class has been generated is known, it is evident that the influence of attributes X3and X4should be independent of their values. Furthermore, the value 1 for features X1and X2should have a stronger influence in the classification than the value 0.Table and Figure present the results obtained for this simulation, which took a runtime of 9.3minutes. Table 4.1: Results for simulation 1. Xj,j PK ajřlPKIΦ lpaj,b,KqIΦ jpaj,b,Kq X1 0 -0.002 -0.250 1 0.344 0.247 X2 0 -0.019 -0.260 1 0.361 0.260 X3 0 0.268 0.000 1 0.268 0.000 X4 0 0.258 -0.010 1 0.277 0.010 Indeed, it can be observed that for attributes X1and X2the value IΦ jpaj,b,Kqis positive when aj“1and negative when aj“0, which means that features X1and X2taking the value 1works in favour of the response resulting in 1, unlike what happens if these features are worth 0. Note also that řlPKIΦ lpaj,b,Kqis the total influence of the four features on the response being 1when feature Xjtakes the value aj. In view of the results obtained, for features X1and X2the quantities IΦ jpaj,b,Kqand řlPKIΦ lpaj,b,Kqare closer when aj“1 than when aj“0. Thus, the total influence on the response being 1when either X1or X2is
4.3. Empirical results 83 ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ●● ●● ●● Figure 4.1: Influence and total influence for the features (Simulation 1). 1is in fact due to these specific attributes taking the value 1. In the case of features X3and X4, their influence is near 0whatever value they take. Applying the procedure in ( ) to the previous experiment, we obtain the measure p0.50,0.50,0.25,0.25q. As expected, features X1and X2present a higher influence than X3and X4. Just as we have already mentioned, ’s procedure measures the number of times that a change in a specific attribute produces a different response. Thus, it only takes positive values, which prevents us from knowing the direction of the influence. In our case, setting features X1and X2to 0works against the response being 1, and this is made clear by the negative sign of their influences. The second experiment differs from the previous one in the procedure to assign the class to the instances. The response is now generated as a binary vector that takes the values 0and 1with probability 0.5, independently of the attributes. The goal of this simulation is to show that the influence of the features in the classification of the instances with response b“1
84 L. DAVILA PENA does not depend on the features’ values. Table and Figure present the results obtained for this simulation. The computational time was 12.4minutes. Table 4.2: Results for simulation 2. Xj,j PK ajřlPKIΦ lpaj,b,KqIΦ jpaj,b,Kq X1 0 -0.001 -0.009 1 0.017 0.011 X2 0 -0.012 -0.019 1 0.026 0.023 X3 0 0.007 -0.002 1 0.010 0.006 X4 0 0.002 -0.003 1 0.014 0.005 ● ● ● ● ●● ● ● ● ● ●● ●● ●● ●● ●● ●● ●● Figure 4.2: Influence and total influence for the features (Simulation 2). Again, the outcomes are as expected: for each feature, there are barely any differences in
4.3. Empirical results 85 the values IΦ jpaj,b,Kqand řlPKIΦ lpaj,b,Kqwhen ajchanges. In this case, ’s measure resulted in p0.375,0.375,0.375,0.375q. The response is not influenced by any one attribute more than the others. However, because the class was generated independently of the features, one would expect their influence to be zero. Finally, we have considered the non-binary case. Now, the four attributes can take the values 0, 1 and 2 with equal probability, and the class of the response is computed as follows: in 1{3of the instances, it is the value of attribute X1that determines the response; while in the remaining 2{3, it is attribute X2that determines it. Table and Figure illustrate the results. This took a runtime of 13.3minutes. Table 4.3: Results for simulation 3. Xj,j PK ajřlPKIΦ lpaj,b,KqIΦ jpaj,b,Kq X1 0 0.364 -0.091 1 0.455 0.233 2 0.360 -0.120 X2 0 0.105 -0.172 1 0.495 0.445 2 0.005 -0.245 X3 0 0.421 -0.012 1 0.391 0.012 2 0.424 0.016 X4 0 0.410 0.042 1 0.385 -0.041 2 0.435 0.020 The outcomes obtained show that changes in features X3and X4do not affect the response being b“1, and their influence is almost zero whatever their values. Nevertheless, the value 1 of attributes X1and X2has a positive influence, which is larger in the case of the latter. On the contrary, when these attributes take the values 0and 2, their influence is negative. This speaks against the class resulting in 1. In this case, the influence measure of is p0.321,1.827,0.296,0.296q. This result shows that X2is the most influential feature, and that X1is more relevant than X3and X4. Nevertheless, this measure does not properly capture the magnitude of how much more influential attribute X1is in comparison to X3and X4. In view of the previous results, our methodology seems to be appropriate to study the influence that the different feature values have on the classification of individuals. Since the experiments are satisfactory, this analytic tool can be applied to real-life problems. Consequently, this procedure has been employed on a real dataset concerning COVID-19 patients,
86 L. DAVILA PENA whose results are presented in the next section. Figure 4.3: Influence and total influence for the features (Simulation 3). 4.4 Application of our influence measure to COVID-19 data This section analyzes a database of 10,454 patients from Galicia (a region in the northwest of Spain) infected with COVID-19 from March 6, 2020 to May 7, 2020. The objective is to study the influence of various patients’ characteristics in three binary response variables of special interest: the need for hospitalization, the need for ICU admission, and the eventual decease. The emphasis is not on the predictive classification of new patients, but on the analysis of the characteristics that influenced the patients whose complete history is known to have a positive response in the binary variables indicated. On the other hand, what follows is not intended to be an exhaustive study of these data to draw definitive conclusions about
4.4. Application of our influence measure to COVID-19 data 87 the evolution of COVID-19, but simply an illustration of some of the uses of the measure of influence we introduced in Section . The features that have been considered in this study are the following: ‚Sex: 0 (woman), 1 (man). ‚Age: 0 (0–49 y/o), 1 (50–64 y/o), 2 (65–79 y/o), 3 (80 y/o and over). ‚Cardiovascular diseases: 0 (no diseases), 1 (mild diseases), 2 (severe diseases: ischemia with angina, infarction, stroke). ‚Respiratory diseases: 0 (no diseases), 1 (mild diseases), 2 (severe diseases: malignancy, COPD, pneumonia). ‚Metabolic diseases: 0 (no diseases), 1 (mild diseases), 2 (severe diseases: malignancy, insulin-dependent diabetes). ‚Urinary diseases: 0 (none or mild diseases), 1 (severe diseases: malignancy, kidney failure). The binary response variables considered in this application are: ‚Decease (exitus): 0 (no), 1 (yes). ‚ICU admission: 0 (no), 1 (yes). ‚Need for hospitalization: 0 (no), 1 (yes). Next, we applied the methodology outlined in Section to measure the influence of the features in the classification with respect to the binary response variables. For instance, the interest would reside in selecting those individuals who resulted in decease (that is, decease “1) when our purpose is to know the most influential attributes for the exitus. Note that to estimate the influence of feature Xjon Y, we use the influence that Xjhas in the classification of the elements of the sample Musing an excellent classifier since it is precisely trained with the sample M. As in the previous section, we use the random forest classifier introduced by ( ) and implemented in Rthrough the RWeka library. Let tX1“sex,X 2“age,X 3“cardi,X 4“resp,X 5“meta,X 6“uriube the set of features. We start the analysis by presenting Figures , and , which display the influence and total influence of the different features’ values on the three classification problems. Let us explain in more detail what the graphics in the figures show. In each of the graphics a response variable is chosen and set its value to 1, and also a feature is chosen. The graphic shows in red (solid) the measure of influence of the chosen feature when we set its value to each of the possible values it can take (feature influence), and in blue (dashed) the
88 L. DAVILA PENA sum of the measures of influence of all the features (total influence). The objective of these figures is to identify what we call influence scenarios. An influence scenario is detected when the total influence shown in the corresponding graphic deviates noticeably from zero. ● ● ● ● ●● ● ●● ● ● ● ● ● ●● ●● ● ●● ● ●● ● ● ● ● ● ● ●● ●● ● ● ● ● ●● ● ● ● ● ●● Figure 4.4: Influence and total influence for the features on the decease.
Part III On cooperative Operations Research problems
Introduction to cooperative sequencing and minimum cost spanning tree problems Part of this dissertation is based on a specific multi-agent cooperative Operations Research problem, called the graph machine scheduling problem (GMS-problem). It is organized into two closely linked chapters that study the aforementioned problem from an optimization and cost allocation point of view, respectively. The GMS-problem arises from combining ideas of both the minimum cost spanning tree problems and sequencing problems, of which we will give a brief introduction below. The objectives pursued in dealing with each of these situations will also be outlined. In minimum cost spanning tree problems (MCSTPs), several agents, located at different geographical areas, are interested in a certain service, which will be provided by a common supplier, called the source. The agents are served by means of connections that have an associated (positive) cost, and it is not relevant whether they are connected to the source directly or indirectly. The objective of the MCSTP is to connect all the agents to the source at the lowest possible cost. In this way, the focus is on determining the so-called minimum cost spanning trees (MCSTs). A tree is a set of edges such that there is a single path from the source to each of the agents, and the cost of a tree is the sum of the costs of all the edges belonging to it. There are numerous real-world situations that can be modeled as an MCSTP. For example, when a set of people are connected to a central computer or to a cable television system ( , ). In ( ), a problem is presented in which a group of inhabitants requires the construction of a water supply network coming from a common reservoir. MCSTs can be computed in a polynomial time and the most common methods are ’s algorithm ( , ) and ’s algorithm ( , ). In deterministic one-machine sequencing problems, a set of jobs needs to be processed on a machine. Each of these jobs is identified with one agent and has associated with it: a processing time, i.e., the time needed by the machine to process that specific job, and a cost function, which indicates how costly it is for that agent to spend a unit of time in the system.
98 The completion time is defined as the total time that a certain agent spends in the system until it is processed. The main objective in sequencing problems consists in finding an optimal order, i.e., an order on the jobs that minimizes the total aggregated cost of all agents. The cost of an agent will naturally depend on its completion time, and this dependence is linear in the classical model ( , ). There are, however, numerous variants of sequencing problems that allow for an adaptation to real situations. One of them is the sequencing problem with precedence constraints, where some jobs need to be processed before others. ( ), ( ), and ( ) analyze this type of situations. ( ) studies the problem where jobs have ready times and due dates. This latter feature is also incorporated in ( ). In ( ), a problem in which the machine can process more than one job is addressed. The above works are restricted to a single machine, but sequencing problems with multiple machines are also treated in the literature, see ( ), ( ), ( ), ( ), ( ), and ( ). More recently, sequencing problems have been considered in the field of robotics. ( ) is a survey on this latter topic. As we have just discussed, for both MCSTPs and sequencing problems, solving an optimization problem is fundamental. However, a further issue of great relevance in a cooperative setting is the allocation of costs among the different agents involved. This serves to establish and maintain cooperation between the agents. In the case of MCSTPs, ( ) is the first to consider this issue. ( ), ( ), and ( ) introduced different rules that are still very popular today. Nevertheless, other rules have been subsequently proposed (see , ). Numerous works have focused on approaching the cost allocation problem from the game theory perspective. ( ) associated a cooperative game with transferable utility to each MCSTP, leading to the MCST games. Works such as ( , ), ( ), ( ), ( ), ( ), ( ), and ( ) were devoted to studying this class of games. Furthermore, ( ), ( ), ( , ), ( , ), and ( ) introduced and axiomatically characterized cost allocation rules for MCST games. Examples of papers that study MCST cost allocation rules without relying on an intermediate cooperative game include ( ), ( ), ( ), ( ), ( ), ( , ), and ( ,
99 ). ( ) is a recent review. In most cooperative sequencing problems, an initial order is assumed as a starting point and the focus is on the allocation of cost savings with respect to this initial order. For the classical model, ( ) introduces and axiomatically characterizes an allocation rule, the equal gain splitting rule (EGS-rule), based on neighbor switches to derive an optimal order from the initial one, which was later generalized in ( ). ( ) and ( ) propose allocation rules for sequencing situations with non-linear cost functions. Sequencing problems have been extensively dealt with from a game-theoretic approach: as in MCSTPs, we can associate a cooperative game with a sequencing problem, resulting in sequencing games. Papers that address sequencing games include ( ), ( ), ( ), ( , ), ( ), ( ), ( ), ( ), ( ), ( ), ( ) and ( ). As already mentioned, the GMS-problem as considered in this part of the thesis stems from a combination of concepts taken from the MCSTPs and sequencing problems. In our setting, we start from a graph pNYt0u,Eqwhere Nis the set of nodes corresponding to the agents, 0is the source node that must serve all agents, and Eis a set of edges connecting the nodes. Each edge has a connection time, and each agent has a cost depending on the time it gets connected. We will aim, on the one hand, to find the optimal ordering of the agents such that the total connection costs are minimized; and on the other hand, to find a fair allocation of these costs. In Chapter , the GMS-problem is tackled from an optimization perspective. Firstly, a situation from the field of logistics is presented which fits into our model. We illustrate that, for general GMS-problems, finding an optimal order is complex even for very simple situations, which leads us to consider specific subproblems that can explicitly be solved. These happen to be particular cases of sequencing problems with precedence constraints, as analyzed in ( ). We propose a variant of ’s algorithms to solve particular cases. This variant will contain specific features that will be essential for the cost allocation analysis in Chapter . Chapter focuses on the allocation issue: an allocation rule (the κrule) is introduced to distribute the costs of an optimal order among the players involved. This rule relies on its construction on the algorithms described in the previous chapter. The calculation of this rule is illustrated by means of several examples of GMS-problems. Both chapters are collected in ( ).
Chapter 5 The graph machine scheduling problem (GMS-problem) This chapter studies a new Operations Research problem, which we have called the graph machine scheduling problem (GMS-problem). The GMS-problem combines ideas from the minimum cost spanning tree problem and sequencing problem. Given that solving a general GMS-problem is complex, we restrict attention to GMS-problems on trees and propose a recursive method to solve these tree GMS-problems. The recursive procedure is described in detail, and examples are used to illustrate various aspects of the procedure. The contents of this chapter are collected in ( ). Contents .................................101 ....................103 ..........106 .....................107 .....................121 ........................127 5.1 Introduction As argued in ( ), there are many real-life problems that require the construction of infrastructures to connect a set of agents to a source, either directly or indirectly. One of them is the urban supply of water from a general reservoir to certain points of interest (agents), which involves building pipelines throughout a city. Installing pipes between two points takes a certain amount of time. The first problem that arises in this kind of situation is the question of where the pipelines should go. The objective will thus be to connect all the agents to the network in such a way that the total time involved is minimized. To address this
102 L. DAVILA PENA problem, the standard MCST setting has been widely applied (see, for example, , or , ). However, it is often essential for the agents to be provided with water at all times (e.g., a hospital), so they have to contract an external service company for as long as the water supply does not reach them. Thus, each agent has an associated coefficient that indicates the cost per unit of time in the system, i.e., per unit of time for which the pipes that connect it to the source are not yet constructed. Therefore, the cost of an agent will be determined by its coefficient cost per unit of time multiplied by the total time required to connect that specific agent. This total time will depend on when this agent is connected to the source: for example, if agent 2 is connected to the source via agent 1, then the pipeline connecting the source to agent 1 must be constructed first, followed by the pipeline connecting agent 1 to agent 2. Hence, the total time required to connect agent 2 to the source would be the sum of the construction times of the pipelines connecting the source to agent 1, and agent 1 to agent 2. Thus, the issue is to minimize the total aggregate costs instead of just the total construction time for the project as a whole. Situations such as those described above result in a new type of problem, which we have called the graph machine scheduling problem (GMS-problem). One issue we would like to highlight is the proximity of our problem to two other problems already studied in the literature. First, the GMS-problem is closely related to the MCSTP. However, in a GMS- problem the costs are computed in a completely different way. In particular, the order in which the edges are constructed has a substantial effect on the cost in our setup, whereas this order is irrelevant in calculating the costs in an MCSTP. Second, the GMS-problem is deeply linked to sequencing problems with precedence constraints. Although sequencing problems with precedence constraints have been treated in the literature before (see , ), the approach under which we will study them here has, to the best of our knowledge, never been adopted. The remainder of this chapter is organized as follows. Section motivates the GMS- problem through a particular example and describes the general problem in detail. The difficulty in obtaining an optimal order for the general model results in the consideration of 2´lines, n´lines, and tree GMS-problems. Section provides solution algorithms for specific subproblems, along with proofs of their optimality. Several examples are presented to illustrate these procedures.
5.2. Problem description and motivation 103 5.2 Problem description and motivation The challenge of optimally designing a water supply system is to determine the order in which to install the pipelines, connecting each of the agents to the source, so that the total costs are minimized. We will now summarize the situation we are facing, as well as the specific problems we want to tackle. Further on, we will formally define the GMS-problem. The problem we address in this part of the dissertation is the following. There is a node 0 that provides a certain service, a set of nodes Nthat must be (directly or indirectly) connected to 0in order to receive the service, and a set of edges EĎtti, ju|i, j PNYt0u,i‰jusuch that pNYt0u,Eqis a connected graph. The edges are initially “inactive” and each has an activation or connection time. In addition, each node has an associated parameter indicating the unit cost of its connection time to node 0. The objective pursued is twofold: (i) First, we intend to choose an activation order on the nodes of Nso that the sum of the costs over all nodes, the total connection cost, is as low as possible. This order will imply a set of edges to be activated that connects all nodes to 0. Once we have found an optimal solution to the previous question, we know the costs required to connect each node of Nto 0according to that solution. Let us call the sum of such costs the optimal connection cost. (ii) The second objective is to propose a fair allocation of the optimal connection cost among the nodes of N. Issue ( ) will be tackled in the present chapter, leaving issue ( ) for Chapter . However, let us now treat a simple example that motivates the need to address these two issues, and also to better appreciate the complexity of the problem at hand. Example 5.1. Consider a GMS-problem with three cities that need to be connected to a node providing a service as soon as possible. The graph in Figure presents the possible connections between the nodes and the times required to activate each of these connections. The cost parameters associated with the three cities are 1, i.e., the cost that corresponds with the connection time of each city coincides with such time. As mentioned above, the first objective is to connect the three cities to the service node (the 0node) while minimizing the total connection cost. Table displays the possible orders on the nodes, along with their corresponding edges to be sequentially activated, the individual cost vector (whose coordinates represent the cost of cities 1, 2, and 3, respectively), and the total aggregated costs. By considering the 6 possible orders, one sees that the optimal order is p213q. Correspondingly, the edges are
104 L. DAVILA PENA 1 3 0 2 7 6.5 5.5 6 5 1 Figure 5.1: Example of a GMS-problem. Table 5.1: Possible orders for the GMS-problem from Figure . Order Edges to be activated Individual cost vector Total cost p123q t0,1u,t1,2u,t0,3up6.5,7.5,12.5q26.5 p132qt0,1u,t0,3u,t1,2up6.5,12.5,11.5q30.5 p213qt0,2u,t2,1u,t0,3up7,6,12q25 p231qt0,2u,t0,3u,t2,1up12,6,11q29 p312qt0,3u,t0,1u,t1,2up11.5,12.5,5q29 p321qt0,3u,t3,2u,t2,1up11.5,10.5,5q27 activated in the order t0,2u,t2,1u,and t0,3u. The optimal connection cost is 25, which is obtained by adding the costs of the nodes, i.e., 6for player 2, 6`1for player 1, and 6`1`5 for player 3. The fact that p213qis optimal is somehow surprising. The most natural choice, from the point of view of a central planner, would be to assume that the sequence of edges to be activated should be t0,3u,t3,2u, and t2,1u, i.e., to select at each step the edge with the lowest time. This however results in the order p321q, which has an associated cost of 27. As we can see, taking this myopic approach does not yield an optimal order in general. Nevertheless, as mentioned above, optimal cost allocation is an objective to be pursued. In this way, this myopic order could be used as a reference order for cost allocation by appropriately subtracting the savings 27 ´25 “2from the reference costs p11.5,10.5,5q. Below we will formally present the proposed problem, as well as some essential definitions to address it. AGMS-problem can be summarized by a tuple pN,0,E,γ,αq, where Nis a finite set of jobs or players, 0represents the machine (source), Eis a set of available (precedence) edges between players and source, i.e., EĎtti, ju|i, j PNYt0u,i“ ju, such that pNYt0u,Eq is a connected graph, γ:EÑR`with γij representing the activation time of the edge ti, juPE, and, finally, α:NÑR`, with αpiqrepresenting the linear cost coefficient to spend one time unit in the system for player iPN. The main assumption is that a player iPNcan only be processed by the machine if all players on a path in Efrom ito the machine have been processed before. A processing order
5.3. Solving GMS-problems on trees: a recursive approach 111 Example 5.3. Let us consider the 2´lines GMS-problem presented in Figure . We start by initializing k“1,i“1. a12.2 a23 0 b1 2 b2 2.8 a31b3 2.5 a43.4b4 2.4 a52.1 5 3.43.5 3.2 1.9 3 4.9 4 4.8 Figure 5.4: Example of a 2´lines GMS-problem. First iteration 1. Consider the aforementioned 2´lines GMS-problem. Initialize l“1,l 1“1. Note that: γpa1q αpa1q“3.4 2.2ă3.5 2“γpb1q αpb1q, hence select P1“ta1u. 2.1. Since P1ĎA, take l“2. Consider R12 “tb1,b 2u, and note that: CATpP1q“3.4 2.2ą3.5`3.2 2`2.8“CATpR12q. Then, i“2and we change the pivot to P2“R12. 2.2. Since P2ĎB, take l1“2. Consider Q12 “ta1,a 2u. Note that: CATpP2q“3.5`3.2 2`2.8ă3.4`5 2.2`3“CATpQ12q, so we maintain the pivot. 2.3. Since P2ĎB, take l1“3. Consider Q13 “ta1,a 2,a 3u. Note that: CATpP2q“3.5`3.2 2`2.8ă3.4`5`1.9 2.2`3`1“CATpQ13q, so we maintain the pivot.
112 L. DAVILA PENA 2.4. Since P2ĎB, take l1“4. Consider Q14 “ta1,a 2,a 3,a 4u. Note that: CATpP2q“3.5`3.2 2`2.8ą3.4`5`1.9`3 2.2`3`1`3.4“CATpQ14q. Then, i“3and we change the pivot to P3“Q14. 2.5. Since P3ĎA, take l“3. Consider R13 “tb1,b 2,b 3u. Note that: CATpP3q“3.4`5`1.9`3 2.2`3`1`3.4ă3.5`3.2`4.9 2`2.8`2.5“CATpR13q, so the pivot does not change. 2.6. Since P3ĎA, take l“4. Consider R14 “tb1,b 2,b 3,b 4u. Note that: CATpP3q“3.4`5`1.9`3 2.2`3`1`3.4ă3.5`3.2`4.9`4.8 2`2.8`2.5`2.4“CATpR14q, so the pivot does not change. 2.7. Since P3ĎA, take l“5. Note that lą˜ t“4, so we have already compared the CAT of our pivot, which belongs to branch A,totheCATs of all possible heads from branch B. 3. M1“P3, so we merge our pivot to the source. Since M1ĎAand AzM1“ta5u “H, we need to renumber the nodes and take k“2,i“4. This ends the first iteration. Second iteration 1. Consider the 2´lines GMS-problem of Figure . Initialize l“1,l1“1. Note that: γpa1q αpa1q“4 2.1ą3.5 2“γpb1q αpb1q, hence select P4“tb1u. 2.1. Since P4ĎB, take l1“2. Note that l1ą˜s“1, so we have reached the end of branch A. 3. M2“P4, so we merge our pivot to the source. Since M2ĎBand BzM2“tb2,b 3,b 4u “ H, we need to renumber the nodes and take k“3,i“5. This ends the second iteration. Third iteration 1. Consider the 2´lines GMS-problem of Figure . Initialize l“1,l1“1. Note that: γpa1q αpa1q“4 2.1ą3.2 2.8“γpb1q αpb1q, hence select P5“tb1u. 2.1. Since P5ĎB, take l1“2. Note that l1ą˜s“1, so we have reached the end of branch A.
5.3. Solving GMS-problems on trees: a recursive approach 113 a12.1 0 b1 2 b2 2.8 b3 2.5 b4 2.4 43.5 3.2 4.9 4.8 (a) Second iteration. a12.1 0 b1 2.8 b2 2.5 b3 2.4 43.2 4.9 4.8 (b) Third iteration. a12.1 0 b1 2.5 b2 2.4 44.9 4.8 (c) Fourth iteration. Figure 5.5: Resulting 2´lines GMS-problems throughout the algorithm. 3. M3“P5, so we merge our pivot to the source. Since M3ĎBand BzM3“tb3,b 4u “H, we need to renumber the nodes and take k“4,i“6. This ends the third iteration. Fourth iteration 1. Consider the 2´lines GMS-problem of Figure . Initialize l“1,l1“1. Note that: γpa1q αpa1q“4 2.1ă4.9 2.5“γpb1q αpb1q, hence select P6“ta1u. 2.1. Since P6ĎA, take l“2. Consider R12 “tb1,b 2u. Note that: CATpP6q“ 4 2.1ă4.9`4.8 2.5`2.4“CATpR12q, so the pivot is maintained. 2.2. Since P6ĎA, take l“3. Note that lą˜ t“2, so we have reached the end of branch B. 3. M4“P6, so we merge our pivot to the source. Since M4ĎAand AzM4“H, then M5“tb1uand M6“tb2u. The algorithm is finished. The algorithm outputs the following merge order: ˆσ“pa1a2a3a4 M1 b1 M2 b2 M3 a5 M4 b3 M5 b4 M6 q,
114 L. DAVILA PENA which has an associated cost of: TCpˆσq“αpa1q¨γpa1q`αpa2q¨`γpa1q`γpa2q˘`αpa3q¨`γpa1q`γpa2q`γpa3q˘ `αpa4q¨`γpa1q`γpa2q`γpa3q`γpa4q˘ `αpb1q¨`γpa1q`γpa2q`γpa3q`γpa4q`γpb1q˘ `αpb2q¨pγpa1q`γpa2q`γpa3q`γpa4q`γpb1q`γpb2qq `αpa5q¨`γpa1q`γpa2q`γpa3q`γpa4q`γpb1q`γpb2q`γpa5q˘ `αpb3q¨`γpa1q`γpa2q`γpa3q`γpa4q`γpb1q`γpb2q`γpa5q`γpb3q˘ `αpb4q¨`γpa1q`γpa2q`γpa3q`γpa4q`γpb1q`γpb2q`γpa5q`γpb3q`γpb4q˘ “2.2¨3.4`3¨8.4`1¨10.3`3.4¨13.3`2¨16.8`2.8¨20 `2.1¨24 `2.5¨28.9 `2.4¨33.7“381.33. Note that -components (see , ) are not the same as merge segments. For this particular example, it can be checked that the order obtained in terms of - components would be as follows: ˆτ“pa1a2a3a4 S1 b1b2 S2 a5 S3 b3b4 S4 q. Next, we will show a series of theoretical results that will allow us to prove the optimality of Algorithm . Remark 5.1. Given a set ZĎN, we will use the notation γrZs“řiPZγpiqand αrZs“ řiPZαpiq. Hence, if Xis a segment we can write CATpXq“γrXs αrXs. Proposition 5.1. Let pN,0,E,γ,αqbe a 2´lines GMS-problem. Let Xand Ybe two segments that belong to the same branch, and let Zbe a segment from the other branch. If CATpXqąCATpYq, then τ“p„,X,Z,Y,„q is not optimal. Proof. Let us consider: τ1“p„,X,Y,Z,„q; τ2“p„,Z,X,Y,„q.
5.3. Solving GMS-problems on trees: a recursive approach 115 Note that TCpτq´TCpτ1q“αrYs¨γrZs´αrZs¨γrYs “αrYs¨αrZs¨γrZs αrZs´αrZs¨αrYs¨γrYs αrYs “αrYs¨αrZs¨pCATpZq´CATpYqq, (5.2) and TCpτq´TCpτ2q“αrZs¨γrXs´αrXs¨γrZs “αrZs¨αrXs¨γrXs αrXs´αrXs¨αrZs¨γrZs αrZs “αrZs¨αrXs¨pCATpXq´CATpZqq. (5.3) Suppose for the sake of contradiction that τis optimal. Then, both τ1and τ2cannot have lower total costs than τ. This means that TCpτq´TCpτ1qď0and TCpτq´TCpτ2qď0. From ( ), this would imply that CATpZqďCATpYq;(5.4) while from ( ), this would lead to CATpXqďCATpZq.(5.5) By combining ( ) and ( ), CATpXqďCATpZqďCATpYq, leading to CATpXqďCATpYq, which is a contradiction. Thus, τcannot be optimal. Definition 5.7. Let ˆσ“pM1,M 2,...,M mqbe the output of Algorithm for a 2´lines GMS-problem. And let τbe a feasible order. Let kPt1,2,...,mu.Acomponent of Mkin τis a maximal connected subset of Mkwith respect to τ. Denote by MkLτthe set of components of Mkin τ, and let MkLτ“tG1,G 2,G 3,...,G mkube the different
116 L. DAVILA PENA components in the order they appear in τ, that is: τ“p„,G 1,...,G 2,...,G 3,...,G mk,„q. Naturally, all merge segments and their components are segments. Lemma 5.1. Let ˆσ“pM1,M 2,...,M mqbe the output of Algorithm for a 2´lines GMS- problem. Take kPt1,2,...,musuch that |Mk|ą1. Let τbe a feasible order such that ˇˇMkLτˇˇą1. Then, the following holds: i) CATpGmkqăCATpG1YG2Y¨¨¨YGmk´1q; ii) CATpGmkqăCATpMkq; iii) CATpGmkqăCATpG1q. Proof. If |Mk|ą1, then Mkis not the first pivot of Algorithm . In order for Mkto become the new pivot and hence, the merge segment, it must have lower CAT than the previous pivot. Furthermore, the CAT of the previous pivot is less or equal to the CAT of the combination of the first mk´1components of Mk. This might be a direct comparison, but it could also be an indirect comparison via several other pivots. That is, CATpMkqăCATpG1YG2Y¨¨¨YGmk´1q.(5.6) Then, CATpMkq“γrG1s`γrG2s`¨¨¨`γrGmk´1s`γrGmks αrG1s`αrG2s`¨¨¨`αrGmk´1s`αrGmks ă ( ) γrG1s`γrG2s`¨¨¨`γrGmk´1s αrG1s`αrG2s`¨¨¨`αrGmk´1s “CATpG1YG2Y¨¨¨YGmk´1q, which can be rewritten, by using cross-multiplication, to: pγrG1s`γrG2s`¨¨¨`γrGmk´1s`γrGmksq¨pαrG1s`αrG2s`¨¨¨`αrGmk´1sq ăpγrG1s`γrG2s`¨¨¨`γrGmk´1sq¨pαrG1s`αrG2s`¨¨¨`αrGmk´1s`αrGmksq. Consequently, γrGmks¨pαrG1s`αrG2s`¨¨¨`αrGmk´1sq ăpγrG1s`γrG2s`¨¨¨`γrGmk´1sq¨αrGmks,(5.7)
5.3. Solving GMS-problems on trees: a recursive approach 117 and hence, γrGmks αrGmksăγrG1s`γrG2s`¨¨¨`γrGmk´1s αrG1s`αrG2s`¨¨¨`αrGmk´1s. Thus, CATpGmkqăCATpG1YG2Y¨¨¨YGmk´1q, proving i). To prove ii), we add γrGmks¨αrGmkson both sides of equation ( ): γrGmks¨pαrG1s`αrG2s`¨¨¨`αrGmk´1sq`γrGmks¨αrGmks ăpγrG1s`γrG2s`¨¨¨`γrGmk´1sq¨αrGmks`γrGmks¨αrGmks, which results in γrGmks¨pαrG1s`αrG2s`¨¨¨`αrGmk´1s`αrGmksq ăpγrG1s`γrG2s`¨¨¨`γrGmk´1s`γrGmksq¨αrGmks. Consequently, γrGmks αrGmksăγrG1s`γrG2s`¨¨¨`γrGmk´1s`γrGmks αrG1s`αrG2s`¨¨¨`αrGmk´1s`αrGmks, and thus CATpGmkqăCATpG1YG2Y¨¨¨YGmkq“CATpMkq, proving ii). To prove iii), note that CATpGmkqăCATpMkqăCATpG1q, where the first inequality follows from ii) and the second inequality from Algorithm , see also equation ( ). Lemma 5.2. Let ˆσ“pM1,M 2,...,M mqbe the output of Algorithm for a 2´lines GMS- problem. Take kPt1,2,...,musuch that |Mk|ą1. And let τbe a feasible order such that ˇˇMkLτˇˇą1. Then, there exists kPt2,3,...,m kusuch that CATpGk´1qąCATpGkq. Proof. Suppose for the sake of contradiction that CATpGk´1qďCATpGkqfor all kP t2,3,...,m ku. That is, CATpG1qďCATpG2q﨨¨ďCATpGmk´1qďCATpGmkq. This implies that CATpG1qďCATpGmkq, contradicting iii) of Lemma . Hence, there exists kPt2,3,...,m kusuch that CATpGk´1qąCATpGkq. Lemma 5.3. Let ˆσ“pM1,M 2,...,M mqbe the output of Algorithm for a 2´lines GMS- problem. It holds that the elements of Mk,k Pt1,...,mu,are consecutive in any optimal order. Proof. Let τbe an optimal order. Let us suppose that there exists kPt1,...,musuch that players from Mkare separated by other players in τ. Let us also consider the set of
118 L. DAVILA PENA components of Mkin τ, i.e., MkLτ“tG1,G 2,...,G mku, so we would have: τ“p„,G 1,...,G 2,...,G mk,„q. From Lemma , we know that there exists ˜ kPt2,...,m kusuch that CATpG˜ k´1qą CATpG˜ kq. Let us rewrite τas follows: τ“p„,G ˜ k´1,Z,G ˜ k,„q, where Zis a segment from the other branch. From Proposition ,τis not optimal, which is a contradiction. Hence, ˇˇMkLτˇˇ“1for all kPt1,...,mu, that is, the nodes in Mkmust be consecutive in τ. Proposition 5.2. Let pN,0,E,γ,αqbea2´lines GMS-problem. Let ˆσ“pM1,M 2,...,M mq be the output of Algorithm for such problem. There always exists an optimal order that starts with M1. Proof. Let us consider τPFpAYBqsuch that τdoes not start with M1. We will first prove that there always exists τ˚starting with M1such that TCpτ˚qďTCpτq. We distinguish between two cases: i) |M1{τ|“1and ii) |M1{τ|ą1. Let us assume w.l.o.g. that M1ĎA. During Algorithm , we compared the CAT of this pivot (which ended up being a merge segment) with the CATs of all possible segments R1l,l Pt1,...,˜ tu. It holds that: CATpM1qďCATpR11q; CATpM1qďCATpR12q; . . . CATpM1qďCATpR1˜ tq. (5.8) In the first case, M1is a connected component in τ.Ifτdoes not start with M1, then it must start with some players from branch B, followed by M1: τ“pR1,M 1,„q, where 1ďď˜ t. Now, consider the following order: τ1“pM1,R 1,„q,
5.3. Solving GMS-problems on trees: a recursive approach 119 in which we have swapped the positions of M1and R1. Then, TCpτq´TCpτ1q“αrM1s¨αrR1s¨CATpR1q´αrR1s¨αrM1s¨CATpM1q “αrM1s¨αrR1s¨pCATpR1q´CATpM1qq ě ( )0,(5.9) and hence, τis not better than τ1. In the second case, if |M1{τ|ą1, then we can write τas τ“p„,G 1,...,G 2,...,G 3,...,G m1,„q, with m1ą1, where M1Lτ“tG1,G 2,G 3,...,G m1udenotes the set of components of M1 in τ. From Lemma ,τcannot be optimal since the elements of M1are not consecutive. In particular, we know there exists a bijection ρ:t1,2,...,muÑt1,2,...,mu iÞÑ ρpiq“j, such that τ1“pMρp1q,...,M ρpmqq is an optimal order. Takeˆ iPt1,...,musuch that ρpˆ iq“1. Let us consider τ˚“pMρpˆ iq,M ρp1q,M ρp2q,...,M ρpˆ i´1q,M ρpˆ i`1q,...,M ρpmqq. We know that TCpτ˚qďTCpτ1qăTCpτq, where the first inequality follows from ( ) and the second inequality from Lemma . Thus, there always exists an optimal order starting with M1. Proposition 5.3. Let pN,0,E,γ,αqbea2´lines GMS-problem, and let ˜σN“pM1,...,M mq be the output of Algorithm . Let τNbe an optimal order. If τNstarts with M1, it holds that τN|NzM1is an optimal order for the subproblem with NzM1players. Proof. W.l.o.g., let us assume that M1ĎA.IfM1“A, then it is clear that τN“ pM1,b 1,b 2,...,b ˜ tq, where τN|NzM1“pb1,b 2,...,b ˜ tqis the optimal order of the 1´line GMS-problem with set of players NzM1“tb1,b 2,...,b ˜ tu. Let us suppose now that M1ĹA. For the sake of contradiction, assume that τN|NzM1is not an optimal order for the aforemen-
120 L. DAVILA PENA tioned subproblem. Then, there would exist ˆτNzM1such that TCpˆτNzM1q´TCpτN|NzM1qă0.(5.10) Let us consider the following order: ˆτN“pM1,ˆτNzM1q. Note that TCpˆτNq´TCpτNq“TCpˆτNzM1q´TCpτN|NzM1qă ( )0, which is a contradiction because τNis optimal. Thus, τN|NzM1is an optimal order for the problem with set of players NzM1. Lemma 5.4. Let pN,0,E,γ,αqbea2´lines GMS-problem, and let ˜σN“pM1,...,M mqbe the output of Algorithm . Let τNzM1be an optimal order for the problem with players set NzM1. It holds that τN“pM1,τNzM1qis an optimal order for pN,0,E,γ,αq. Proof. From Proposition , we know there exists an optimal order ˆτNfor pN,0,E,γ,αq that starts with M1,soˆτN“pM1,ˆτN|NzM1q. From Proposition ,ˆτN|NzM1is an optimal order for the subproblem with set of players NzM1. For the sake of contradiction, let us suppose that τNis not optimal. In such a case, TCpˆτNq´TCpτNq“TCpˆτN|NzM1q´TCpτNzM1qă0, which contradicts τNzM1being optimal for the problem with set of players NzM1. Thus, τN is an optimal order for pN,0,E,γ,αq. Theorem 5.8. Let pN,0,E,γ,αqbea2´lines GMS-problem, and let ˆτbe the order provided by Algorithm . Thus, TCpˆτqďTCpτqfor all τPFpAYBq. Proof. In order to prove this, we will apply induction in the number of players, |N|. Let us first suppose that |N|“2. We present this situation in Figure . In such a case, a1 αpa1q 0 b1αpb1q γpa1qγpb1q Figure 5.6: A 2´lines GMS-problem with 2players.
5.3. Solving GMS-problems on trees: a recursive approach 127 pN,0,E,γ,αqthat maintains the induced relative order in branches A1and A2, it will also be an optimal order for the pn´1q´lines GMS-problem in which A1and A2have been converted into A12 τ. Thus, TCpˆτq“TCp˜τqăTCpτ˚q, contradicting the induction hypothesis. 5.3.3 The tree GMS-problem Once we have proven the optimality of Algorithm , let us now turn to trees. A GMS- problem pN,0,E,γ,αqis called a tree GMS-problem if pNYt0u,Eqis a tree. Clearly, the problems we have seen above are particular cases of this one. The methodology proposed so far will be the basis for solving an optimization problem in these more general structures. Definition 5.10. Let pN,0,E,γ,αqbe a tree GMS-problem. We define the degree of a node aPN,degpaq, as the number of edges reaching that node. Definition 5.11. Let pN,0,E,γ,αqbe a tree GMS-problem. A sub-source will be either the source, 0, or a node that is reached by three or more edges. Let Sbe the set of sub-sources, S“t0uYtsPN|degpsqě3u. Given the sub-sources of a tree, we are interested in knowing their level. Definition 5.12. Let pN,0,E,γ,αqbe a tree GMS-problem. The level of a sub-source sPS is the number of sub-sources in the path between 0and s, including 0. Thus, the sub-source 0is the only sub-source with level 1. The level function, , is defined as follows: :SÑN sÞÑ psq“|tsub-sources from 0to suYt0u|. We assume an ordering on the sub-sources, from level 1to the highest, v. Given a level lPt2,...,vu, there are mlsub-sources. Thus, we can write S“t0,s 2 1,...,s 2 m1,s 3 1,...,s 3 m2,...,s v 1,...,s v mvu, where sl kdenotes the k´th sub-source from level l. Figure provides an illustration of the sub-sources of a tree and their levels. That is, we have the set of sub-sources in increasing order by their level. The theoretical results seen for the n´lines GMS-problem can be extended to the general case of trees. In particular, given a tree GMS-problem, the elements of the merge segments obtained when
128 L. DAVILA PENA 0 s2 1 s3 1 s2 2 s3 2 s2 3 s3 3 sub-source of level 1 sub-sources of level 2 sub-sources of level 3 Figure 5.10: Sketch of the sub-sources of a tree and their levels. solving a 2´lines GMS-problem of the highest level remain consecutive in any optimal order. Furthermore, there always exists an optimal order that maintains the order induced by the aforementioned subproblem. With all these ingredients, it is immediate to prove the optimality of Algorithm , in which we present a brief outline of a proposed solution for the tree GMS-problem. As can be observed, a recursive methodology is adopted, starting with the n´lines GMS-problems at the highest level. For each of them, the 2´lines GMS-problems that comprise it are solved recursively until these n´lines are converted into a single line, thus reducing the dimension. Precisely, an iteration of this algorithm consists in reducing by 1 the highest level of the problem. Therefore, in view of Algorithm , a tree GMS-problem can be solved in viterations. Algorithm 5.3 Algorithm to solve a tree GMS-problem 1. Consider the tree GMS-problem pN,0,E,γ,αq. 2. Repeat for all kPt1,...,m vu(i.e., the sub-sources from the highest level). Consider the nv k´lines GMS-problem arising from sv k. Apply Algorithm to obtain τsv k. Replace the nv kbranches arising from sv kwith one branch maintaining the order of τsv k. Note that we have a new tree GMS-problem with one level less since all the subproblems of the highest level have been converted into lines. Renumber the nodes adequately. The highest level has now been reduced by 1. 3. (a) If S“t0u, go back to step 1. (b) If S“t0u, solve the resulting n´lines GMS-problem with Algorithm . The order obtained is the solution. The following example shows how to solve a tree GMS-problem by applying Algorithm .
5.3. Solving GMS-problems on trees: a recursive approach 129 Example 5.5. Let us consider the tree GMS-problem presented in Figure . 0 a1 2 a11 3 a12 2 b12.1 b2 3 b21 1.8 b22 1 b23 1.5 b221 3 3 2.5 1.8 3.5 2.3 2 3 1.7 1 c1 2 c11 2.7 c12 2.6 c111 3.1 c112 2 2.6 2.5 3 4 3.6 Figure 5.11: Example of a tree GMS-problem. As can be seen, there are five sub-sources: 0, which is the only sub-source of level 1; a1,b2, and c1, which are the sub-sources of level 2; and c11, which is the sub-source of level 3, the highest level of this problem. Let us apply Algorithm to solve it. First, we select c11, which is the only sub-source of the highest level, and consider the 2´lines GMS-problem arising from it, as shown in Figure . We apply Algorithm and obtain τc11 “pc111c112q. We need to replace these two branches with one branch maintaining the order of τc11 . Figure shows the resulting tree GMS-problem, whose highest level is now reduced to 2. c111 3.1 c11 c112 2 4 3.6 Figure 5.12: 2´lines GMS- problem of level 3. 0 a1 2 a11 3 a12 2 b12.1 b2 3 b21 1.8 b22 1 b23 1.5 b221 3 3 2.5 1.8 3.5 2.3 2 3 1.7 1 c1 2 c11 2.7 c12 2.6 c111 3.1 c112 2 2.6 2.5 3 4 3.6 Figure 5.13: Resulting tree GMS-problem after the first iteration.
130 L. DAVILA PENA Now, we need to consider the 2,3,2´lines GMS-problems arising from a1,b2, and c1, respectively, which are the sub-sources of level 2. Figure shows these problems. a11 3 a1 a12 2 2.51.8b2 b21 1.8 b22 1 b221 3 b23 1.5 2 3 1 1.7 c11 2.7 c1 c12 2.6 c111 3.1 c112 2 2.5 4 3 3.6 Figure 5.14: n-lines GMS-problems of level 2. By applying Algorithm to these problems, we obtain the orders τa1“pa11a12q,τb2“ pb22b221b21b23q, and τc1“pc11c12c111c112q. Thus, we replace each of these subproblems with one branch following the order specified by τa1,τb2, and τc1, resulting in the 3´lines GMS- problem of Figure . 0 a1 2 a11 3 a12 2 3 2.5 1.8 b1 2.1 b23 b22 1 b221 3 b21 1.8 b23 1.5 3.5 2.3 3 1 2 1.7 c1 2 c11 2.7 c12 2.6 c111 3.1 c112 2 2.6 2.5 3 4 3.6 Figure 5.15: Resulting 3´lines GMS-problem after the second iteration. Now, apply Algorithm to solve this problem. The result will be: ˆτ“pa1a11a12b1b2b22b221c1c11b21b23c12c111c112q, which is the output of Algorithm . Theorem 5.13. Let pN,0,E,γ,αqbe a tree GMS-problem, and let ˆτbe an order provided by Algorithm . Thus, TCpˆτqďTCpτqfor all feasible order τ. Proof. This proof can be done by induction on v, following similar arguments to those seen in the proof of Theorem .
5.3. Solving GMS-problems on trees: a recursive approach 131 This result proves the optimality of Algorithm . As we have already anticipated, the study of the GMS-problem comprises two approaches: the first one, from the optimization point of view, has been treated in this chapter; and the second one, from the allocation perspective, will be addressed in Chapter .
Chapter 6 An allocation rule for GMS-problems The main objective of this chapter is to introduce a cost allocation rule for the tree GMS- problem described in Chapter to distribute the cost of an optimal order among the players involved. The allocation mechanism we are going to present follows an algorithmic approach, and it will be based on the solution algorithms presented in Section . We will consistently and recursively use myopic reference orders to determine potential cost savings, which will then be appropriately allocated by our method. Interestingly, the transition process from the reference order to the optimal one will be smooth using the switching of blocks of agents based on the notion of fine-tuned merge segments. The contents of this chapter are partially collected in ( ). Contents .................................133 ..................................135 ...................................140 .....................154 6.1 Introduction When building a water supply network, cost minimization is the first problem to be addressed. Knowing in which order to optimally connect certain agents to a source, a second task consists in sharing the costs of this network among all the agents involved. The allocation of these costs is usually accomplished by proposing general allocation rules, which is the purpose of the present chapter for the GMS-problem. The following section will introduce the κrule as a cost allocation rule for tree GMS- problems. The κrule takes as a reference point a myopic order and is closely tied to the algorithmic approaches presented in Chapter . In particular, the merge segments that appear when solving a 2´lines GMS-problem will be the foundation of the cost sharing that we will
134 L. DAVILA PENA discuss. Below, we illustrate the calculation of the κrule for Example without dwelling on the details. Example 6.1. Consider the GMS-problem of Figure . The reference order is p321q, with an associated cost of 28. However, the optimal order is p213q, with cost 25. Going from the reference order to the optimal one leads to a gain of 3that needs to be split among players 1, 2, and 3 in a certain way. The myopic reference costs for these agents are p12,11,5q, respectively, and the κrule will determine the compensations for each one. The first step is to identify the merge segments obtained by applying Algorithm , which are M1“t2,1uand M2“t3u. Note that these merge segments are misplaced in the reference order with respect to the optimal one. Thus, by switching them, the optimal order is obtained. The saving of 3 is divided equally between both merge segments, and proportionally to the number of agents within each of these blocks. Therefore, a saving of 1.5goes for the agents in M1(0.75 for player 1 and 0.75 for player 2), and a saving of 1.5goes for player 3 (the only player in M2). Hence, the κrule leads to the allocation p11.25,10.25,3.5q, resulting from subtracting the above gains from the reference costs. The above example illustrates how to calculate the κrule for a simple GMS-problem. Our method takes a myopic starting point and involves determining compensations. As shown in Example , one aspect that plays a fundamental role in determining these compensations is the switching of merge segments. This is similar to the ideas behind the EGS-rule ( , ). There are other features of the κrule that arise when the agents of the merge segments are not consecutive in the reference order or when there are several sub-sources. Next, we explain the ideas behind the κrule in more detail. The order that we will use as a reference is an endogenous and myopic order since it will depend on the particular problem we are considering, in the following way: at each step, the machine selects the agent that has a higher urgency, always taking into account the existing precedence relations. To compute the κrule we will follow a recursive procedure like the one in Algorithm , starting with the n´lines GMS-problems of the highest level. Here, a methodology akin to that of Algorithm will be used, also recursively solving the 2´lines GMS-problems that comprise it. The approach taken to address each of these 2´lines GMS-problems starts from a reference order and “repairs” it until the optimal order found by Algorithm is reached. We will see that it is not possible to always obtain non-negative savings when going from this reference order to the optimal one by simply swapping pairs of consecutive agents. Instead, we will need to exchange blocks of agents chosen in a certain way, and these blocks will be 1This was one of our primary motivations to modify the algorithm of ( ).
6.2. The κrule 135 related to the merge segments. The theoretical results of Section and Algorithm , play a key role in this task. The remainder of this chapter is structured as follows. Section describes in detail the procedure of obtaining the κrule for tree GMS-problems, drawing on results seen in Chapter . Section illustrates through several examples how to compute the κrule on 2´lines, n´lines, and general tree GMS-problems. Finally, Section summarizes the main conclusions of this work. 6.2 The κrule Let pN,0,E,γ,αqbe a tree GMS-problem. The starting point of our proposal will be a reference order, τN 0, which is an endogenous myopic order that depends on the problem considered: at each step, the player with higher urgency is selected. For the sake of simplicity, we will assume that αpiq γpiq“ αpjq γpjqfor all i, j PN,i “ j, i.e., all players’ urgencies are different. Thus, τN 0is unique . As already seen, Algorithm provides an optimal order ˆτNfor the problem, thus, the total amount that will be saved is gN“TCpτN 0q´TCpˆτNq. Also, recall that cpτN 0qis defined as the individual cost vector with respect to the reference order. This vector is from which we need to subtract the quantity gNin order to obtain a cost allocation rule of the optimal order. Therefore, we need to know how to fairly subtract gN from cpτN 0q; that is, how responsible each of the players involved is for the resulting savings. Our allocation procedure will try to find a vector fNwhose coordinates indicate, for all possible players, the proportion of gNfor which each one is responsible. We will attempt from now on to determine this vector, for which purpose we will take into account what happens locally at each possible sub-source of our problem. For sPS, we define Ns“FpsqYtsu, where Fpsqis the set of followers of sin the graph pNYt0u,Eq. For every sub-source sPS, one considers an induced n´lines GMS-problem on Ns,pNs,0,E|Ns,γ,αq, where all initial branches with respect to sin E have been recursively replaced by a line that corresponds to an optimal order with respect to this branch. This optimal order is provided by Algorithm . Naturally, if psq“v, then pNs,0,E|Ns,γ,αqis already an n´lines GMS-problem and we call it a subproblem from the highest level. Also, given sPS,τNs 0and ˆτNsrepresent the reference order and the optimal order provided by Algorithm for pNs,0,E|Ns,γ,αq, respectively. Considering this, we determine the stand-alone cost savings, that is, the gains that can be saved when we do not 2In case of ties, any possible reference order is considered with a certain probability. Section will elaborate on this issue.
136 L. DAVILA PENA take into account unrelated sub-sources to s: wpsq:“TCpτNs 0q´TCpˆτNsqě0. Thus, wpsqcould be seen as local savings made at sub-sources. It should be noted that the sum of them is not equal to the total savings we may have, that is, řsPSwpsq “ gN.However, we will be able to use these numbers to infer the importance of the different sub-sources (and, mainly, of the players involved in the problems they induce) in the final savings obtained. As already mentioned, an induced n´lines GMS-problem is tackled on Ns. To obtain our cost allocation rule we will follow a recursive procedure, by first solving the subproblems of the highest level. Once these problems have been solved, the highest level of the tree GMS-problem has been reduced by 1, and we repeat the process. Hence, we will always start from an n´lines GMS-problem, for which we will consider a branch-order, πs, that will be determined by the reference order τNs 0in the following way: the branches are selected in the same order as they appear in τNs 0. A branch-order simply indicates the numbering of each branch assuming we originally labeled them as A1,...,A n. For instance, if n“3and πs“p2,3,1q, then the first, second, and third branches are A2,A 3,and A1, respectively, for all applicable purposes. Let us assume we are in an n´lines GMS-problem pNs,0,E|Ns,γ,αqsuch that psq“v. What we first do is to obtain the reference order, τNs 0. As already stated, this induces a branch order, πs. We will denote the (ordered with respect to πs) branches by A1,πs,...,A n,πs. Thus, we start by selecting branches A1,πsand A2,πsand obtain the reference order as well as apply Algorithm to get an optimal order of this particular 2´lines GMS-problem. This results in local savings (for the considered sub-source), which we must distribute among the players involved. Once these savings have been allocated, we follow the same recursive approach as in Algorithm : convert branches A1,πs and A2,πsinto one, A12,πs, and apply Algorithm to the 2´lines GMS-problem induced by A12,πsand A3,πs. Again, for this problem, we obtain the reference order as well as the optimal order provided by Algorithm and allocate the gains achieved, and so on. To facilitate the understanding of the general cost allocation procedure, we will later elaborate on the method by which the resulting savings from solving a 2´lines GMS-problem are obtained. Furthermore, to avoid making the notation cumbersome, we will henceforth omit to indicate the sub-source we are considering, but note that we have fixed one. Given π(former πs), there will exist τ2,π 0,...,τn,π 0, the reference orders obtained when recursively considered 2´lines GMS-problems in the order specified by π. For instance, if n“3and π“p2,3,1q, then τ2,π 0 is the reference order for the 2´lines GMS-problem pA2YA3,0,E|A2YA3,γ,αq, and τ3,π 0 will be the reference order for the 2´lines GMS-problem pA23 YA1,0,E|A23YA1,γ,αq. That