# A Districting Application with a Quality of Service Objective

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Literature Review

## 3. Problem Description

- ${\overline{d}}_{x}$ (${\overline{d}}_{y}$) is the average of the distances between the delivery points and the central horizontal axis (central vertical axis);
- ${\widehat{\sigma}}_{x}$ (${\widehat{\sigma}}_{y}$) is the standard deviation of Tpoints;
- ${\widehat{\sigma}}_{x}^{\prime}$ (${\widehat{\sigma}}_{y}^{\prime}$) is the standard deviation of the absolute distance of the delivery points with the central horizontal axis (central vertical axis);
- ${A}_{s}$ is the area of the territory on which the approximation will be made;
- n is the number of delivery points within the territory.

- Each basic unit belongs to a single grouping (i.e., to a single territory);
- The basic units of each grouping generate a related subgraph;
- The sum of the average number of late deliveries in the set of territories is minimized.

## 4. Proposed Solution Methodology

#### 4.1. Constructive Heuristic

Algorithm 1 Description of the constructive algorithm |

Input: Number of territories k; Graph G(V, E); Coordinates of each basic unit. Output: Solution of the problem with k territories. 1: Select k different basic units at random and assign to each territory. 2: repeat3: for each territory $\kappa $ and basic unit v do4: if v is not part of a territory but is adjacent to the territory $\kappa $ then5: Add the pair $(v,\kappa )$ to the list of iteration candidates. 6: Select a candidate pair according to (3) and assign the basic unit v to the $\kappa $ territory. 7: until Base units remain unassigned |

#### 4.2. Local Search Procedure

Algorithm 2 Description of the local search phase |

Input: Initial solution; Number of territories k; Graph G(V, E); Workload of each basic unit. Output: Solution of the problem with k territories. 1: repeat2: Initialize better change to null change 3: for each basic unit v do4: for each territory $\kappa $ do5: if the assignment of v to $\kappa $ is feasible then6: Evaluate balance load, $bl$, according to Equation (4) 7: if the solution is improved and better change is improved then8: Save v and $\kappa $ as better change 9: if better change is not null change then10: Implement change 11: until better change is null change |

#### 4.3. Combination of Solutions through Integer Programming

## 5. Computational Experiments

#### 5.1. Results from the Experiments

#### 5.2. Results from the Case Study

## 6. Conclusions and Future Work

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## References

- Gevaers, R.; Van de Voorde, E.; Vanelslander, T. Characteristics and Typology of Last-mile Logistics from an Innovation Perspective in an Urban Context. In City Distribution and Urban Freight Transport; Macharis, C., Melo, S., Eds.; Edward Elgar Publishing: Cheltenham, UK, 2011; pp. 56–71. [Google Scholar]
- Retail e-Commerce Sales Worldwide from 2014 to 2024. Available online: https://www.statista.com/statistics/379046/worldwide-retail-e-commerce-sales/ (accessed on 18 August 2021).
- Chopra, S. Designing the Distribution Network in a Supply Chain. Transp. Res. Part E
**2003**, 39, 123–140. [Google Scholar] [CrossRef] - Cho, J.; Ozment, J.; Sink, H. Logistics Capability, Logistics Outsourcing and Firm Performance in an E-commerce Market. Int. J. Phys. Distrib. Logist Manag.
**2008**, 38, 336–359. [Google Scholar] - Índice Nacional de Satisfacción de Clientes: Informe de Resultados Generales. Available online: Https://procalidad.cl/indice-procalidad/ (accessed on 18 August 2021).
- Servicio Nacional del Consumidor: Un 88% de los Reclamos Recibidos por el SERNAC Fueron en Contra de Grandes Empresas. Available online: Https://www.sernac.cl/portal/604/w3-article-55432.html (accessed on 18 August 2021).
- Servicio Nacional del Consumidor: SERNAC Analiza Reclamos por Compras Online y Exige Compensaciones. Available online: Https://www.sernac.cl/portal/604/w3-article-58698.html (accessed on 18 August 2021).
- Kumar, V.; Reinartz, W. Customer Relationship Management, 3rd ed.; Springer: Berlin/Heidelberg, Germany, 2018. [Google Scholar]
- Gajewska, T.; Zimon, D.; Kaczor, G.; Madzík, P. The impact of the level of customer satisfaction on the quality of e-commerce services. Int. J. Product. Perform. Manag.
**2019**, 69, 666–684. [Google Scholar] [CrossRef] - Madzík, P.; Hrnčiar, M. Accuracy in measuring customer satisfaction. Int. J. Serv. Ind. Manag.
**2021**, 38, 161–187. [Google Scholar] [CrossRef] - Kotzab, H.; Madlberger, M. European retailing in e-transition? An empirical evaluation of Web-based retailing—Indications from Austria. Int. J. Phys. Distrib. Logist Manag.
**2001**, 31, 440–462. [Google Scholar] [CrossRef] - Kalcsics, J. Districting Problems. In Location Science; Laporte, G., Nickel, S., Saldanha da Gama, F., Eds.; Springer: New York, NY, USA, 2015; pp. 585–622. [Google Scholar]
- Hess, S.; Weaver, J.; Siegfeldt, H.; Whelan, J.; Zitlau, P. Nonpartisan political redistricting by computer. Oper. Res.
**1965**, 13, 998–1008. [Google Scholar] [CrossRef] - Hess, S.; Samuels, S. Experiences with a sales districting model: Criteria and implementation. Manag. Sci.
**1971**, 18, 41–54. [Google Scholar] [CrossRef] - Ricca, F.; Scozzari, A.; Simeone, B. Political Districting: From classical models to recent approaches. Ann. Oper. Res.
**2013**, 204, 271–299. [Google Scholar] [CrossRef] - Bucarey, V.; Ordóñez, F.; Bassaletti, E. Shape and balance in police districting. In Applications of Location Analysis; Eiselt, H., Marianov, V., Eds.; Springer: New York, NY, USA, 2015; pp. 329–347. [Google Scholar]
- Dugošija, D.; Savić, A.; Maksimović, Z. A new integer linear programming formulation for the problem of political districting. Ann. Oper. Res.
**2020**, 288, 247–263. [Google Scholar] [CrossRef] - Fleischmann, B.; Paraschis, J.N. Solving a Large-Scale districting problem: A case report. Comput. Oper. Res.
**1988**, 15, 521–533. [Google Scholar] [CrossRef] - Zoltners, A.; Sinha, P. Sales territory design: Thirty years of modeling and implementation. Mark Sci.
**2005**, 24, 313–331. [Google Scholar] [CrossRef] [Green Version] - Salazar-Aguilar, M.A.; Ríos-Mercado, R.Z.; Cabrera-Ríos, M. New Models for Commercial Territory Design. Netw. Spat. Econ.
**2011**, 11, 487–507. [Google Scholar] [CrossRef] - Benzarti, E.; Sahin, E.; Dallery, Y. Operations management applied to home care services: Analysis of the districting problem. Decis. Support. Syst.
**2013**, 55, 587–598. [Google Scholar] [CrossRef] - Lin, M.; Chin, K.; Fu, C.; Tsui, K. An effective greedy method for the Meals-On-Wheels service districting problema. Comput. Ind. Eng.
**2017**, 106, 1–19. [Google Scholar] [CrossRef] - D’Amico, S.; Wang, S.; Batta, R.; Rump, C. A simulated annealing approach to police district design. Comput. Oper. Res.
**2002**, 29, 667–684. [Google Scholar] [CrossRef] - Chen, H.; Cheng, T.; Ye, X. Designing efficient and balanced police patrol districts on an urban street network. Int. J. Geogr. Inf. Sci.
**2019**, 33, 269–290. [Google Scholar] [CrossRef] [Green Version] - Caro, F.; Shirabe, T.; Guignard, M.; Weintraub, A. School redistricting: Embedding GIS tools with integer programming. J. Oper. Res. Soc.
**2004**, 55, 836–849. [Google Scholar] [CrossRef] - Ríos-Mercado, R.; Bard, J. An exact algorithm for designing optimal districts in the collection of waste electric and electronic equipment through an improved reformulation. Eur. J. Oper. Res.
**2019**, 276, 259–271. [Google Scholar] [CrossRef] - Lin, H.; Kao, J. Subregion districting analysis for municipal solid waste collection privatization. J. Air Waste Manag. Assoc.
**2008**, 58, 104–111. [Google Scholar] [CrossRef] - Cortinhal, M.; Mourão, M.; Nunes, A. Local search heuristics for sectoring routing in a household waste collection context. Eur. J. Oper. Res.
**2016**, 255, 68–79. [Google Scholar] [CrossRef] - Jarrah, A.; Bard, J. Large-scale pickup and delivery work area design. Comput. Oper. Res.
**2012**, 39, 3102–3118. [Google Scholar] [CrossRef] - González-Ramírez, R.; Smith, N.; Askin, R.; Camacho-Vallejo, J.; González-Velarde, J. A GRASP-Tabu Heuristic Approach to Territory Design for Pickup and Delivery Operations for Large-Scale Instances. Math. Probl. Eng.
**2017**, 2017, 4708135. [Google Scholar] [CrossRef] - Kalcsics, J.; Nickel, S.; Schröder, M. Towards a unified territorial design approach—Applications, algorithms and GIS integration. TOP
**2005**, 13, 1–56. [Google Scholar] [CrossRef] - Salazar-Aguilar, M.; Ríos-Mercado, R.; González-Velarde, J. GRASP strategies for a bi-objective commercial territory design problem. J. Heuristics
**2013**, 19, 179–200. [Google Scholar] [CrossRef] - Moreno, S.; Pereira, J.; Yushimito, W. A hybrid K-means and integer programming method for commercial territory design: A case study in meat distribution. Ann. Oper. Res.
**2020**, 286, 87–117. [Google Scholar] [CrossRef] - Novaes, A.; Graciolli, O. Designing multi-vehicle delivery tours in a grid-cell format. Eur. J. Oper. Res.
**1999**, 119, 613–634. [Google Scholar] [CrossRef] - Altman, M. Is automation the answer: The computational complexity of automated redistricting. Rutgers K Comput. Technol. Law
**1997**, 23, 81–141. [Google Scholar] - Sandoval, M.; Díaz, J.; Ríos-Mercado, R. An Improved Exact Algorithm for a Territory Design Problem with p-Center-Based Dispersion Minimization. Expert Sys. Appl.
**2020**, 146, 113150. [Google Scholar] [CrossRef] - Maniezzo, V.; Boschetti, M.; Stützle, T. Matheuristics. Algorithms and Implementations, 1st ed.; Springer: New York, NY, USA, 2021. [Google Scholar]
- Novaes, A.; Souza De Cursi, J.; Graciolli, O. A continuous approach to the design of physical distribution systems. Comput. Oper. Res.
**2000**, 27, 877–893. [Google Scholar] [CrossRef] - Beardwood, J.; Halton, J.; Hammersley, J. The shortest path through many points. Math. Proc. Camb. Philos. Soc.
**1959**, 55, 299–327. [Google Scholar] [CrossRef] - Çavdar, B.; Sokol, J. A distribution-free tsp tour length estimation model for random graphs. Eur. J. Oper. Res.
**2015**, 243, 588–598. [Google Scholar] [CrossRef] - Galvao, L.; Novaes, A.; Cursi, E.; Souza, J. A multiplicatively-weighted Voronoi diagram approach to logistics districting. Comput. Oper. Res.
**2006**, 33, 93–114. [Google Scholar] [CrossRef] - Ríos-Mercado, R.; Fernández, E. A reactive GRASP for a commercial territory design problem with multiple balancing requirements. Comput. Oper. Res.
**2009**, 36, 755–776. [Google Scholar] [CrossRef] - Fernández, E.; Kalcsics, J.; Nickel, S. A novel maximum dispersion territory design model arising in the implementation of the WEEE-directive. J. Oper. Res. Soc.
**2010**, 61, 503–514. [Google Scholar] [CrossRef] - Gonzalez-Ramírez, R.; Smith, N.; Askin, R.; Kalashnikov, V. A heuristic approach for a logistics districting problem. Int. J. Innov. Comput. Inf. Control
**2010**, 6, 3551–3562. [Google Scholar] - Lei, H.; Wang, R.; Laporte, G. Solving a multi-objective dynamic stochastic districting and routing problem with a co-evolutionary algorithm. Comput. Oper. Res.
**2016**, 67, 12–24. [Google Scholar] [CrossRef] - Bozkaya, B.; Erkut, E.; Laporte, G. A tabu search heuristic and adaptive memory procedure for political districting. Eur. J. Oper. Res.
**2003**, 144, 12–26. [Google Scholar] [CrossRef] - Tavares-Pereira, F.; Figueira, J.; Mousseau, V.; Roy, B. Multiple criteria districting problems: The public transportation network pricing system of the Paris region. Ann. Oper. Res.
**2007**, 154, 69–92. [Google Scholar] [CrossRef] - Ricca, F.; Scozzari, A.; Simeone, B. Weighted Voronoi region algorithms for political districting. Math. Comput. Model.
**2007**, 48, 1468–1477. [Google Scholar] [CrossRef] [Green Version] - Hopcroft, J.; Tarjan, R. Algorithm 447: Efficient algorithms for graph manipulation. Commun. ACM
**1973**, 16, 372–378. [Google Scholar] [CrossRef] - Garey, M.; Johnson, D. Computers and Intractability: A Guide to the Theory of NP-Completeness (Series of Books in the Mathematical Sciences), 1st ed.; W. H. Freeman: New York, NY, USA, 1979. [Google Scholar]
- Resende, M.; Ribeiro, C. Path-relinking. In Optimization by GRASP; Springer: New York, NY, USA, 2016; pp. 167–188. [Google Scholar]
- Hollander, M.; Wolfe, D.; Chicken, E. Nonparametric Statistical Methods, 3rd ed.; Wiley: Hoboken, NJ, USA, 2014. [Google Scholar]

**Figure 1.**Divisions created in a zone of the city studied in the case study. The different groupings are shown in different colors, while the roads used to delimit the territories are highlighted in green. Additionally, the adjacency among basic units are shown through the inclusion of two lines between adjacent territories.

**Figure 2.**Divisions created in a zone of the city studied in the case study (figure (

**a**) shows the north and central area, while figure (

**b**) shows the central and south area). The territories are shown in different colors with the basic units delimited by white lines.

**Table 1.**Average of late deliveries on the worst day by the number of solutions generated during the first phase of the algorithm, Columns ‘50’, ‘100’, ‘200’, ‘500’, ‘1000’, ‘5000’, and ‘10,000’ and instance parameters (number of basic units in column ‘BU’, and number of generated districts in column ‘#’) for instances with low demand.

BUs | # | 50 | 100 | 200 | 500 | 1000 | 5000 | 10,000 |
---|---|---|---|---|---|---|---|---|

43 | 5 | 94.26 | 94.54 | 94.6 | 94.74 | 95.01 | 95.39 | 95.68 |

7 | 99.77 | 99.95 | 100 | 100 | 100 | 100 | 100 | |

85 | 5 | 94.1 | 94.23 | 94.33 | 94.63 | 94.8 | 95.16 | 95.27 |

7 | 99.88 | 100 | 100 | 100 | 100 | 100 | 100 | |

127 | 5 | 94.39 | 94.46 | 94.68 | 94.83 | 95.06 | 95.33 | 95.38 |

7 | 99.97 | 99.98 | 99.98 | 99.98 | 100 | 100 | 100 |

**Table 2.**Average of late deliveries on the worst day by number of solutions generated during the first phase of the algorithm, Columns ‘50’, ‘100’, ‘200’, ‘500’, ‘1000’, ‘5000’, and ‘10,000’ and instance parameters (number of basic units, column ‘BU’, and number of districts generated, column ‘#’) for instances with medium demand.

BUs | # | 50 | 100 | 200 | 500 | 1000 | 5000 | 10,000 |
---|---|---|---|---|---|---|---|---|

43 | 5 | 77.77 | 78 | 78.12 | 78.35 | 78.5 | 78.59 | 78.6 |

7 | 84.9 | 85.21 | 85.4 | 85.49 | 85.58 | 85.78 | 85.83 | |

10 | 94.52 | 94.87 | 95.15 | 95.48 | 95.57 | 95.85 | 95.87 | |

12 | 98.13 | 98.61 | 98.98 | 99.19 | 99.3 | 99.45 | 99.48 | |

85 | 5 | 77.74 | 77.74 | 77.98 | 78.05 | 78.11 | 78.35 | 78.42 |

7 | 84.93 | 84.96 | 85.02 | 85.36 | 85.53 | 85.67 | 85.72 | |

10 | 93.98 | 94.27 | 94.9 | 95.32 | 95.5 | 95.75 | 95.81 | |

12 | 97.73 | 98.14 | 98.73 | 99.26 | 99.41 | 99.65 | 99.68 | |

127 | 5 | 77.58 | 77.77 | 77.82 | 77.87 | 78.05 | 78.09 | 78.17 |

7 | 84.52 | 84.71 | 84.8 | 84.92 | 85.12 | 85.43 | 85.53 | |

10 | 93.54 | 93.95 | 94.11 | 94.52 | 94.97 | 95.6 | 95.71 | |

12 | 95.51 | 96.74 | 97.57 | 98.7 | 99.27 | 99.73 | 99.79 |

**Table 3.**Average of late deliveries on the worst day by number of solutions generated during the first phase of the algorithm, Columns ‘50’, ‘100’, ‘200’, ‘500’, ‘1000’, ‘5000’, and ‘10,000’ and instance parameters (number of basic units, column ‘BU’, and number of districts generated, column ‘#’) for instances with high demand.

BUs | # | 50 | 100 | 200 | 500 | 1000 | 5000 | 10,000 |
---|---|---|---|---|---|---|---|---|

43 | 5 | 70.36 | 70.4 | 70.54 | 70.69 | 70.73 | 70.8 | 70.8 |

7 | 74.25 | 74.27 | 74.48 | 74.61 | 74.63 | 74.66 | 74.67 | |

10 | 79.78 | 79.89 | 80.04 | 80.08 | 80.1 | 80.19 | 80.23 | |

12 | 83.14 | 83.37 | 83.49 | 83.56 | 83.59 | 83.7 | 83.75 | |

15 | 87.86 | 88.12 | 88.35 | 88.55 | 88.62 | 88.8 | 88.82 | |

17 | 90.34 | 90.7 | 90.89 | 91.15 | 91.31 | 91.5 | 91.56 | |

20 | 92.22 | 92.25 | 92.26 | 92.26 | 92.26 | 92.26 | 92.26 | |

22 | 92.26 | 92.26 | 92.26 | 92.26 | 92.26 | 92.26 | 92.26 | |

25 | 92.26 | 92.26 | 92.26 | 92.26 | 92.26 | 92.26 | 92.26 | |

85 | 5 | 70.35 | 70.35 | 70.37 | 70.41 | 70.52 | 70.62 | 70.68 |

7 | 77.8 | 77.83 | 77.98 | 78.15 | 74.38 | 74.48 | 74.51 | |

10 | 79.4 | 79.68 | 79.79 | 79.91 | 79.99 | 80.12 | 80.19 | |

12 | 82.95 | 83.18 | 83.37 | 83.52 | 83.61 | 83.72 | 83.76 | |

15 | 87.59 | 88.17 | 88.41 | 88.65 | 88.74 | 88.91 | 88.97 | |

17 | 90.96 | 91.26 | 91.43 | 91.81 | 91.95 | 92.12 | 92.18 | |

20 | 93.12 | 94.06 | 94.65 | 94.98 | 95.2 | 95.38 | 95.43 | |

22 | 94.74 | 95.35 | 95.64 | 95.93 | 96.09 | 96.22 | 96.23 | |

25 | 95.81 | 96.33 | 96.38 | 96.38 | 96.38 | 96.75 | 96.75 | |

127 | 5 | 70.22 | 70.3 | 70.31 | 70.6 | 70.6 | 70.6 | 70.6 |

7 | 74.02 | 74.09 | 74.11 | 74.14 | 74.28 | 74.44 | 74.47 | |

10 | 79.24 | 79.46 | 79.55 | 79.89 | 80.06 | 80.29 | 80.38 | |

12 | 82.79 | 82.9 | 83.19 | 83.5 | 83.68 | 83.92 | 83.96 | |

15 | 87.31 | 87.78 | 88.29 | 88.67 | 88.94 | 89.2 | 89.25 | |

17 | 88.58 | 90.02 | 91.13 | 91.8 | 92.22 | 92.58 | 92.66 | |

20 | 92.66 | 93.66 | 94.93 | 95.94 | 96.28 | 96.84 | 96.93 | |

22 | 94.55 | 96.21 | 96.82 | 97.4 | 97.7 | 97.97 | 98.05 | |

25 | 96.6 | 97.56 | 98.14 | 98.25 | 98.28 | 98.28 | 98.28 |

**Table 4.**Results of the Wilcoxon, Nemenyi, McDonald, and Thompson test to identify possible improvements associated with the generation of a greater number of solutions during the first phase of the analyzed procedure.

50 | 100 | 200 | 500 | 1000 | 5000 | |
---|---|---|---|---|---|---|

100 | $2.4\times {10}^{-8}$ | - | - | - | - | - |

200 | <$2\times {10}^{-16}$ | $8.6\times {10}^{-8}$ | - | - | - | - |

500 | <$2\times {10}^{-16}$ | <$2\times {10}^{-16}$ | $1.1\times {10}^{-9}$ | - | - | - |

1000 | <$2\times {10}^{-16}$ | <$2\times {10}^{-16}$ | <$2\times {10}^{-16}$ | $2\times {10}^{-6}$ | - | - |

5000 | <$2\times {10}^{-16}$ | <$2\times {10}^{-16}$ | <$2\times {10}^{-16}$ | <2$\times {10}^{-16}$ | $4\times {10}^{-10}$ | - |

10,000 | <$2\times {10}^{-16}$ | <$2\times {10}^{-16}$ | <$2\times {10}^{-16}$ | <2$\times {10}^{-16}$ | $5.7\times {10}^{-14}$ | $0.019$ |

**Table 5.**Percentage of improvement obtained by the use of the second phase of the proposed procedure (number of districts generated, column ‘#’).

# | Solutions | 43 Units | 85 Units | 127 Units |
---|---|---|---|---|

10 | 50 | 12.3 | 3.8 | 0 |

100 | 16.2 | 6 | 0.1 | |

200 | 19.8 | 12.9 | 1.1 | |

500 | 15.6 | 16.6 | 5.4 | |

1000 | 17.3 | 16.5 | 9.1 | |

5000 | 20.5 | 16.4 | 14.7 | |

10,000 | 18.7 | 17.1 | 16.3 | |

12 | 50 | 61.9 | 17.9 | 2 |

100 | 65 | 30.8 | 14.9 | |

200 | 73.4 | 48.5 | 33.6 | |

500 | 73.7 | 65.2 | 54.6 | |

1000 | 73.6 | 69.1 | 57.3 | |

5000 | 73.1 | 75 | 79.4 | |

10,000 | 71.5 | 75.3 | 82.8 |

**Table 6.**Level of service reached by the proposed solution for each of the 19 days where which information is available.

Day | Level | Day | Level |
---|---|---|---|

1 | 100% | 11 | 100% |

2 | 100% | 12 | 98.3% |

3 | 96.7% | 13 | 91.8% |

4 | 100% | 14 | 91.8% |

5 | 100% | 15 | 100% |

6 | 100% | 16 | 100% |

7 | 100% | 17 | 95.5% |

8 | 78.6% | 18 | 82.5% |

9 | 88.9% | 19 | 94.5% |

10 | 100% |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Álvarez-Miranda, E.; Pereira, J.
A Districting Application with a Quality of Service Objective. *Mathematics* **2022**, *10*, 13.
https://doi.org/10.3390/math10010013

**AMA Style**

Álvarez-Miranda E, Pereira J.
A Districting Application with a Quality of Service Objective. *Mathematics*. 2022; 10(1):13.
https://doi.org/10.3390/math10010013

**Chicago/Turabian Style**

Álvarez-Miranda, Eduardo, and Jordi Pereira.
2022. "A Districting Application with a Quality of Service Objective" *Mathematics* 10, no. 1: 13.
https://doi.org/10.3390/math10010013