1 Introduction

Police services have to fulfill the needs of three interest groups: citizens, service personnel and administrators (Bodily 1978). From a citizen’s perspective, the primary aim is a fast and successful response to calls for service to reduce loss of life, loss of property and injuries (Swersey 1994). From the perspective of the service personnel, the principal objectives are equal risks and workloads (Camacho-Collados and Liberatore 2015). The administrators have to reconcile all objectives. Hence, they aim for an efficient and effective service operation, where ’efficient’ refers to low operational expenses and ’effective’ describes a high quality of service (Shen et al. 1995). However, there is a financial trade-off between an efficient and an effective response (de Souza et al. 2015). Furthermore, administrators often stand under political pressure and resource constraints (Curtin et al. 2005). The improved utilization of information aids police service administrators to meet their objectives while addressing all needs. Districting optimization is a part of this data-driven improvement process. For instance, many police district layouts date back several decades. In the past, administrators designed them manually to run along major streets, highways and regional boundaries (Bruce 2009). An efficient and effective response was usually not a criterion during the procedure (Mitchell 1972). But in recent decades, these layouts attracted the attention of researchers. Through the use of operations research (OR) models, incident records and geographical information, administrators can improve the response of police services without an increase in operational expenses. Besides the optimization of district layouts and patrol beats, OR models help administrators in making strategic decisions regarding the location of new departments or the closure of certain departments because of budgetary constraints (Liberatore et al. 2020; Cheung et al. 2015). Despite these benefits, the adoption of OR techniques to improve the district layouts of police services has been slow (Green and Kolesar 2004).

We contribute to the existing research by allocating police departments and district layouts at the same time. Contrary to previous modeling approaches, we use a new set of constraints to simultaneously address the contiguity and compactness of districts. We further demonstrate in our study that the increased compactness of our novel constraints results in a better distribution of police departments. Furthermore, we examine the complexity of allocating district centers and use a new simulation to evaluate additional factors influencing the police response.

2 Background

For an efficient and effective distribution of resources, police jurisdictions are divided into precincts or command districts with separate departments. These are further divided into patrol beats (D’Amico et al. 2002). In our case studies for police authorities in Germany and Belgium, a part of the police force patrols the streets, and another part is stationed at the departments to respond to calls for service (CFS) of different priorities. The highest priority is assigned to severe incidents, such as murders in progress or hostage-situations. As these incidents are critical, more personnel has to be dispatched because staff shortages put citizens’ and officers’ lives at risk. The lowest priority is reserved for non-critical incidents, such as disturbances of the peace or minor traffic accidents. Dispatchers assign all CFS to vehicles from the corresponding districts and patrol areas, as the officers are familiar with the area and are thus better prepared to respond appropriately (Bodily 1978). To cope with high demands, dispatchers can assign vehicles from nearby districts or beats. However, this can lead to a domino effect, as transferring vehicles from other districts or beats reduces coverage in those locations, making them vulnerable when they need assistance themselves (Mayer 2009). If a dispatcher cannot deploy a response unit, the incident is queued and the dispatch delayed. Depending on the strategic aim, dispatchers can skip CFS with low priorities if the system is under a heavy load to aid high-priority CFS first (de Souza et al. 2015). The worst-case scenario is an overloaded system with long dispatching delays due to staff shortages. In these systems, preventive patrol is hardly possible (Miller and Knoppers 1972) and dispatchers constantly draw on patrol resources when more help is needed.

A central criterion to measure the effectiveness of police services is the response time (Dunnett et al. 2019), whose reduction is the primary goal of our case studies. It measures the time between a call for aid and the arrival at the incident location. It comprises the call length, the dispatch delay and the driving time to the incident location (Kern 1989). A low response time has several benefits: it increases the likelihood of helping citizens, and it improves confidence in the service (Bodily 1978). Other criteria relevant to the police authorities of our case studies include the time spent at the department, the exchange rate between districts and the overall driving time of the vehicles.

3 Related research

Our problem is part of the field of territory design problems (TDP), a subfield of discrete optimization (Ríos-Mercado 2020). It involves the aggregation of small geographic areas, called basic areas (BAs), into geographic clusters, called districts, so that these are acceptable according to predefined planning criteria (Zoltners and Sinha 1983). In recent decades, researchers have made many contributions to the TDP. They have developed these approaches to focus on issues in various areas, such as political districting, service territory design, reserve design and emergency service districting. Almost all models were developed with a case study to account for specific questions. To address this issue, (Kalcsics et al. 2005) summarized and unified different approaches to the TDP to establish a mutual base in the research community.

Three important criteria to assess district layouts are contiguity, balance, and compactness. Contiguous districts allow the movement between BAs without leaving the district (Kalcsics and Ríos-Mercado 2019). Balance addresses the difference in activity measures between districts. The choice of the activity measure depends on the context of the model: it can be profit, workload, travel time, etc. or a combination of several measures (Kalcsics et al. 2005). Compactness has no univocal definition; a district is commonly declared compact if it is ’somehow round-shaped and undistorted’ (Kalcsics et al. 2005). Hence, this is the definition to which we will adhere. Compactness is usually enforced through distance-based measures in the objective function, which can lead to a trade-off between different objectives (Hess et al. 1965; Mehrotra et al. 1998; Shirabe 2009; Salazar-Aguilar et al. 2011; Önal et al. 2016; Wang et al. 2018; Kalcsics and Ríos-Mercado 2019). Various methods to enforce and evaluate compactness are illustrated by Li et al. (2013). Another significant aspect of TDPs is the computation time. Clearly, problems with smaller BAs lead to more accurate results. However, there is a trade-off between a granular solution and a workable calculation time (Mitchell 1972). Specifically, the general graph-partitioning problem most models can be reduced to has been proven to be NP-hard (Garey and Johnson 1979; Reese 2006). Thus, many approaches rely on heuristics to derive a solution. Hess et al. (1965) applied the first model to solve the TDP. They proposed a model based on the warehouse-location problem to design compact and balanced political districts. They developed a location-allocation heuristic to solve it, as the problem was too complex to be solved with commercial solvers. A thorough study of further literature concerning different TDPs and their criteria can be found in the review of Kalcsics and Ríos-Mercado (2019).

One of the subproblems in territory design involves emergency services. Here, the problem arises in the context of emergency medical services, fire stations and police services. Research on emergency medical services usually involves the operational issue of allocating and reallocating ambulances based on covering problems (Mayorga et al. 2013; Regis-Hernández et al 2018). The research on fire stations is mainly centered on the allocation of the fire stations (Badri et al. 1998; Yang et al. 2004; van den Berg et al. 2017). The police districting problem (PDP) specifically addresses the objectives and constraints of police services and aims for an optimal partition of a territory under the jurisdiction of a police department. The optimization models employed to solve the PDP are mainly modifications of the warehouse-location problem or the maximum-coverage problem (Liberatore et al. 2020). The first application of the PDP was developed by Mitchell (1972). He formulated a mixed-integer problem to plan the patrol beats for police vehicles according to several objectives, including low driving times and equal workloads. To solve the problem, he had to resort to a heuristic. Different important criteria for patrol sectors were proposed by Liberatore and Camacho-Collados (2016), including risk and mutual support. Liberatore et al. (2020) wrote an excellent summary of further literature regarding the PDP. Our problem addresses issues of the PDP, but differs in the aspect that most PDP contributions search for the optimal layout of patrol beats. We aim to find the optimal department locations and their contiguous and compact district borders, a problem that is the main objective of many TDPs.

Apart from the optimization, our framework includes a police service operation simulation to evaluate the resulting districts. The major contributions in this area date back many decades. A research group developed them to optimize the efficiency and effectiveness of police services in the United States. Larson (1974) developed the hypercube queuing model (HQM) to analyze vehicle location and district design problems in multi-server queuing systems. Kolesar and Walker (1975) developed a program to simulate the activities of police patrol cars to allocate capacities. The same year, Chaiken and Dormont (1978) proposed the Patrol Car Allocation Model (PCAM), a less accurate but less resource-intense program. They based it on approximate equations and dispatch queues with the aim to improve the resource allocation as well. Afterward, Kern (1989) developed a simulation allowing for complex dispatching rules and inter-sector exchanges. Simultaneously, Green and Kolesar (1989) helped to design a revised version of the PCAM with a multiple-car dispatch queueing model. Later, several researchers used the PCAM in subsequent contributions to the PDP to provide feedback during heuristic approaches to the design of patrol beats (D’Amico et al. 2002; Zhang and Brown 2013, 2014). Dunnett et al. (2019) developed a framework to help police administrators to dispatch the optimal number of officers for incident responses and validated it with a discrete event simulation. Recently, Zhu et al. (2021) proposed an optimization framework based on the HQM by assigning 81 fixed patrol beats to 6 precincts, aiming to balance their workload while improving other criteria.

Despite the prior research on the TDP and the PDP, we believe that our contribution to the existing literature is of value. First, we contribute by introducing a novel set of constraints, that can address contiguity and geometric compactness simultaneously on any districting problem with a hexagonal grid. With these constraints, we can compute contiguous and compact district layouts with a commercial solver on instances with up to 2040 BAs within hours. Second, we prove the NP-completeness of the contiguous p-median problem with fixed centers, a common problem in the field of TDPs. As far as we are aware, the proof has not existed before. Third, we expand upon previous emergency service simulation models to support districts, inter-district exchanges, follow-ups after incidents, resource planning, additional dispatching rules and a flexible approach to priority handling, to evaluate our resulting district layouts.

4 Framework

4.1 Core problem statement and complexity analysis

Before developing a mathematical model, we formulate the two core problems solved in this work and analyze their computational complexity. The foremost goal of the optimization is to minimize response times over all incidents coming from CFS. As previously stated, response time is composed of the call length, the dispatch delay and the driving time to the incident location. We assume that the average call length is fixed and depends on the police line operator. The dispatch delay is mainly a consequence of scarce capacities and not directly affected by district layouts. However, by minimizing the driving time, we reduce capacity utilization of unproductive times and thereby indirectly lower the dispatch delay in addition to its direct effect on response times. Subsequently, we refer to the response time as its variable components: the sum of the dispatch delay and the driving time to an incident. We further adopt the assumption of Curtin et al. (2010), that all vehicles are dispatched from the department responsible for the district. This is reasonable, as in our two case studies, incidents should be covered by vehicles dispatched from departments. Patrol cars have the task to mainly handle incidents discovered on patrol and are not considered in our model. In addition, vehicles have to drive to the department regularly after incidents to transport suspects and complete paperwork, or at the end of the shift. We also consider that CFS are not evenly distributed among districts and that CFS might require multiple vehicles at once.

Let \(e_{pj}\) denote the average number of CFS with priority \(p \in {\mathcal {P}}\) that have taken place in BA \(j \in {\mathcal {J}}\) for some fixed time horizon in the past (e.g., 1 year) and \(c_{pj}\) denote the average number of requested cars per CFS of priority p over the same period in BA j, then \(e_{pj} \times c_{pj}\) represents the demand intensity for priority p of a BA j. In addition, let \(d_{ij}\) denote the average expected driving time between all BAs \(i \in {\mathcal {I}}\) which could serve as department location and all BAs j for a single vehicle and CFS. Finally, let \(w_p\) represent weights for the different incident priorities p to underline the importance of fast responses to severe incidents, as proposed by Mitchell (1972). Then, we can determine the total weighted driving time as:

$$\begin{aligned} t_{ij} = 2d_{ij} \times \sum _{p \in {\mathcal {P}}} e_{pj} \times c_{pj} \times w_p{} \quad \forall i \in {\mathcal {I}}, \forall j \in {\mathcal {J}} \end{aligned}$$
(1)

i.e., as the sum of all weighted driving times \(d_{ij}\) from the potential department locations i to the incidents in BA j and back with \({\mathcal {J}}\) referring to the set of all BAs and \({\mathcal {I}} \subseteq {\mathcal {J}}\) denoting the set potential department locations (district centers). Note that this calculation includes all CFS and requested vehicles in the time horizon, including the CFS that were not fulfilled. Thus, neither the available staff nor the response time in the past exert an influence. If we further assume that all BAs can be represented in a graph of a given structure, we can define the core problem which needs to be solved to determine department locations and district layouts as a contiguous p-median problem.

Contiguous p-median problem Let \(G=({\mathcal {J}}, {\mathcal {E}})\) be an undirected graph and \({\mathcal {I}} \subseteq {\mathcal {J}}\) the set of potential district centers. Further, let \(t:{\mathcal {I}} \times {\mathcal {J}} \rightarrow \mathbb {N}\) denote the total driving times between potential district centers and BAs. Select a set of district centers \({\mathcal {I}}^s \subseteq {\mathcal {I}}\) with cardinality P and find a partition of the nodes of G into P connected subgraphs \(U_i\), with \(i \in U_i \; \forall i \in {\mathcal {I}}^s\), \(U_i \cap U_{i'} = \emptyset \; \forall i, i' \in {\mathcal {I}}^s, i \ne i'\), such that \(\sum _{i \in {\mathcal {I}}^s} \sum _{j \in U_i} t_{ij}\) is minimized.

In general, p-median problems have been shown to be NP-hard in the strong sense even in planar graphs of maximum vertex degree 3 and if all nodes of the graph are adjacent to the p-medians in the optimal solution (see Kariv and Hakimi 1979). As a consequence, imposing standard contiguity or compactness constraints will typically not improve worst-case performance of exact algorithms and the problem version of the contiguous p-median problem studied in this work can readily be shown to be NP-hard based on the same reduction as in Kariv and Hakimi (1979). Nevertheless, the typical lifespan of a police department is long enough that it makes sense to adapt district layouts occasionally to reflect structural changes. This naturally leads to a contiguous districting problem for a given set of fixed departments (district centers), which can be formulated as follows:

Contiguous p-median problem with fixed centers (CPMFC) Let \(G=({\mathcal {J}}, {\mathcal {E}})\) be an undirected graph and \({\mathcal {I}}^s \subseteq {\mathcal {J}}\) be a set of given district centers with cardinality P. Further, let \(t:{\mathcal {I}}^s \times {\mathcal {J}} \rightarrow \mathbb {N}\) denote the total driving times between district centers and BAs. Find a partition of the nodes of G into P connected subgraphs \(U_i\), with \(i \in U_i \; \forall i \in {\mathcal {I}}^s\), \(U_i \cap U_{i'} = \emptyset \; \forall i, i' \in {\mathcal {I}}^s i \ne i'\), such that \(\sum _{i \in {\mathcal {I}}^s} \sum _{j \in U_i} t_{ij}\) is minimized.

Many versions of such districting or graph tree partitioning problems have been shown to be NP-hard. For instance, Altman (1997) shows that contiguous districting is NP-hard in the strong sense if population equality constraints are enforced. Cordone and Maffioli (2004) show, among other results, that contiguous districting with inclusions constraints is NP-hard on grid graphs for min-sum and min-max objectives over edge weights. In this work, we will prove a complementary result that shows that contiguous districting is NP-hard in the strong sense for p-median objectives even without inclusion constraints and even for typical objective values that can be derived from regular road networks as long as district intensities are considered and driving times are subject to traffic influences. To the best knowledge of the authors, this has not yet been demonstrated for districting problems and given that the result concerns a rather basic districting problem, it might have a wide range of applicability. The following theorem for the decision version of CPMFC (CPMFC-d) is proven in the appendix.

Theorem 1

CPMFC-d is NP-complete in the strong sense, even if \(P=2\) and G is a grid graph.

Proof of Theorem 1

See appendix. \(\square\)

The above result can be readily extended to cover standard compactness constraints, so that both core problems solved in this work are NP-hard in the strong sense. Still, that doesn’t necessarily mean that practice relevant problem sizes cannot be solved in a reasonable time. To the contrary, we will show in the following that solution performance is more than adequate for real-world problem sizes, as long as contiguity and compactness constraints are modeled appropriately.

4.2 Mathematical model

The first task for the mathematical model is to transform the considered area of police operations into a well-defined graph of BAs. So far, territory design problems often make use of squares, irregular-shaped polygons or streets as BAs. Given the complexity result of the previous section, the exact graph structure will not impact worst-case algorithmic performance (given that even grid graphs are hard), we base our choices on other considerations and divide the underlying area into regular, same-sized hexagons. Unlike with squares or irregular polygons, the distances to all neighboring centroids in a hexagonal grid are identical. This reduces the sampling bias from edge effects (Wang and Kwan 2018). Moreover, it gives us a more accurate representation of the driving time \(d_{ij}\) between the BAs, as we adhere to the common approach to use the centroid of each BA as a place of departure and arrival (Curtin et al. 2005; Cheung et al. 2015; Liberatore and Camacho-Collados 2016). In addition, we will utilize the special properties of hexagons to enforce compactness.

We make use of the following sets and parameters in the model:

$$\begin{aligned} {\mathcal {J}}&: \text {set of BAs, indexed by } j \text { and } v,\\ {\mathcal {I}}&: \text {set of potential district centers } ({\mathcal {I}} \subseteq {\mathcal {J}}), \text { indexed by } i,\\ {\mathcal {I}}^s&: \text {set of current departments } ({\mathcal {I}}^s \subseteq {\mathcal {I}}),\\ {\mathcal {J}}_i&: \text {sets of BAs assignable to } i ({\mathcal {J}}_i \subseteq {\mathcal {J}}),\\ {\mathcal {A}}_j&: \text {sets of BAs adjacent to BA } j ({\mathcal {A}}_j \subseteq {\mathcal {J}},)\\ p&: \text {the number of district centers (departments),}\\ {\bar{d}}&: \text {maximum feasible driving time between center } i \text { and BA } j,\\ \bar{d^q}&: \text {maximum feasible driving time for a support center of district center } i,\\ q&: \text {minimum number of other district centers around district center } i,\\ \delta&: \text {maximum number of reallocated district centers,}\\ a_{ij}&: \text {Euclidean distance between the BA } i \text { and BA } j \text { and}\\ t_{ij}&: \text {total weighted driving time between BA } i \text { and BA } j.\\ \end{aligned}$$

We define the following variable:

$$\begin{aligned} X_{ij}&= \text {1, if BA } j \text { is assigned to district center}\\&\quad \quad \text {(department) BA } i \text { (otherwise } X_{ij}=0). \end{aligned}$$

The mathematical model can thus be formulated as follows:

$$\begin{aligned} \text {minimize} \quad \sum _{i \in {\mathcal {I}}}\sum _{j \in {\mathcal {J}}_i} t_{ij} \times X_{ij} \end{aligned}$$
(2)

subject to:

$$\begin{aligned}&{\sum _{i \in {\mathcal {I}} | j \in {\mathcal {J}}_i} X_{ij}= 1}{} & {} \forall j \in {\mathcal {J}} \end{aligned}$$
(3)
$$\begin{aligned}&\sum _{i \in {\mathcal {I}}} X_{ii} = p{} & {} \end{aligned}$$
(4)
$$\begin{aligned}&X_{ij} \le X_{ii}{} & {} \forall i \in {\mathcal {I}}, \forall j \in {\mathcal {J}}_i \end{aligned}$$
(5)
$$\begin{aligned}&X_{ij} \in \{0,1\}{} & {} \forall i \in {\mathcal {I}}, \forall j \in {\mathcal {J}}_i \end{aligned}$$
(6)

In our objective function (2), we minimize driving time weighted by the requested number of cars in each BA. (3) guarantees that each BA j is allocated to exactly one district center. (4) fixes the number of district centers. (5) ensures that BAs can only be assigned to realized district centers. (6) is the variable domain. Moreover, we enforce a maximal driving distance \({\bar{d}}\) to mitigate a system overload through long driving times with the sets \({\mathcal {J}}_i\) where \(j \in \{{\mathcal {J}}_i|a_{ij} < {\bar{d}}\}\). Note, that we also tested the p-center problem and the maximal covering location problem for our case studies, but found that the p-median solutions yielded better results in our simulation.

To improve the possibility of inter-district exchanges and prevent isolated departments, we introduce the additional constraints (7) and (8). They ensure that at least q other district centers k are within the radius \(\bar{d^q}\) of a district center i to provide support units, as proposed by Liberatore and Camacho-Collados (2016).

$$\begin{aligned}&\sum _{\begin{array}{c} k \in {\mathcal {I}}|d_{ik} < \bar{d^q} \\ i\ne k \end{array}} X_{kk} \ge q \times X_{ii}{} & {} \forall i \in {\mathcal {I}} \end{aligned}$$
(7)

The strength of (7) depends on the administrators’ preferences and the dispatching rules. Furthermore, we employ constraint (8) to model districts with (partially) fixed departments. It secures that only up to \(\delta\) departments are moved to new locations.

$$\begin{aligned}&\sum _{i \in {\mathcal {I}}^s} X_{ii} \ge p-\delta{} & {} \end{aligned}$$
(8)

4.3 Contiguity and compactness

So far, we do not restrict the districts to be contiguous. Therefore, we introduce (9), which was first proposed by Zoltners and Sinha (1983).

$$\begin{aligned}&X_{ij} \le \sum _{v \in {\mathcal {N}}_{ij}} X_{iv}{} & {} \forall i \in {\mathcal {I}}, \forall j \in {\mathcal {J}}_i \setminus {\mathcal {A}}_i: i \ne j \end{aligned}$$
(9)

Their set \({\mathcal {N}}_{ij}\) comprised the preceding adjacent BAs of j on any branch of a hierarchical adjacency tree for center i. The idea behind the restriction of Zoltners and Sinha (1983) is that each BA j allocated to a district center i has at least one adjacent BA v with a shorter distance to i allocated to the same center i. This ensures contiguity, as there is always a connected path from BA j back to the center i. The BAs in the research of Zoltners and Sinha were polygons of different sizes and shapes. Because our BAs are same-sized hexagons, we can simplify this restriction and use the Euclidean distance \(a_{ij}\) between the centroids of the hexagons to restrict the adjacency through the adjusted set

$$\begin{aligned}&{\mathcal {N}}_{ij}=\{v \in {\mathcal {A}}_j | a_{iv} < a_{ij}\}{} & {} \forall i\in {\mathcal {I}}, \forall j\in {\mathcal {J}}_i. \end{aligned}$$

We chose the restriction (9) because contiguity constraints are responsible for a considerable part of the computational effort in districting problems (Haase and Müller 2014). Wang et al. (2018) have demonstrated that a minimization of distances in the objective function together with restriction (9) contributes to a lower computation time compared to other contiguity formulations.

Moreover, we can use a variation of the approach in (9), abbreviated C1, to ensure contiguity while improving the geometric compactness of the district layouts. We do so by modifying the variable domain of (9) as displayed in (10) and we include the new constraint (11).

$$\begin{aligned}&X_{ij} \le \sum _{v \in {\mathcal {N}}_{ij}}X_{iv}{} & {} \forall i \in {\mathcal {I}}, \forall j \in {\mathcal {J}}_i \setminus {\mathcal {A}}_i:|{\mathcal {N}}_{ij}|\le 1 \wedge i \ne j \end{aligned}$$
(10)
$$\begin{aligned}&2X_{ij} \le \sum _{v \in {\mathcal {N}}_{ij}}X_{iv}{} & {} \forall i \in {\mathcal {I}}, \forall j \in {\mathcal {J}}_i \setminus {\mathcal {A}}_i:|{\mathcal {N}}_{ij}|> 1 \wedge i \ne j \end{aligned}$$
(11)

The combination of both constraints, subsequently called C2, tightens the permissible solution range of the problem and excludes certain contiguous layouts possible with (9) as illustrated in the example in Fig. 1a, b.

A hexagon has six adjacent hexagons, except at the borders of a map. Accordingly, the number of adjacent BAs v closer to the district center i, \(|{\mathcal {N}}_{ij}|\), can only be as high as three. If a BA j has less than two adjacent BAs v closer to the district center i, we actually implement the modified restriction (9) through (10). If a BA j possesses two or three adjacent BAs \(v\in {\mathcal {N}}_{ij}\) nearer to i, we apply (11). This secures that at least two of the BAs \(v \in {\mathcal {N}}_{ij}\) have to be allocated to i, before j can be assigned to i. While this enforces contiguity, it can likewise enhance the compactness of a district layout.

Fig. 1
figure 1

Contiguity constraint comparison

Figure 1 demonstrates three variations (a), (b) and (c) of the same area with three districts and a district center i in BA 1, 12 and 28. Figure 1a illustrates a viable contiguous solution while using constraint (9). In contrast, this layout is not allowed if we employ the restrictions (10) and (11), as BA 18, BA 22 and BA 25 violate constraint (11). They have solely one adjacent BA v closer to the district center i in BA 8. If the objective function minimizes the Euclidean distance,

$$\text {minimize}~\sum _{i \in {\mathcal {I}}} \sum _{j \in {\mathcal {J}}} a_{ij} \times X_{ij},$$

such a result is unlikely, as the objective function itself aims for compact territories. However, in our model we minimize the weighted driving time \(t_{ij}\) in each BA j, which can contribute to distorted district shapes. Even stronger distortions can arise if an optimization problem is subject to additional constraints. Figure 1b presents a potential solution while using constraint (10) and (11). These districts are superior for patrols and police operations, because of their greater compactness and smaller diameter. A resulting benefit is a shorter average driving time, in the case that patrol cars serve as additional backup (Liberatore and Camacho-Collados 2016).

We can formulate a third set of contiguity constraints, called C3, to enhance the compactness even further. First, we establish the set

$$\begin{aligned} \begin{aligned} {\mathcal {M}}_{ij}=\{v \in {\mathcal {A}}_j|\exists v' \in {\mathcal {A}}_{j}: a_{iv} < a_{iv'}\} \\ \forall i\in {\mathcal {I}}, \forall j\in {\mathcal {J}}_i. \end{aligned} \end{aligned}$$

It contains all adjacent BAs \(v \in {\mathcal {A}}_j\) except for the BA \(v' \in {\mathcal {A}}_j\) that is the farthest away from i. Second, we include the constraint (10) and modify the variable domain of constraint (11) as displayed in constraint (12).

$$\begin{aligned} \begin{aligned} 2X_{ij} \le \sum _{v \in {\mathcal {N}}_{ij}}X_{iv} \quad \forall i \in {\mathcal {I}}, \\ \forall j \in {\mathcal {J}}_i \setminus {\mathcal {A}}_i:|{\mathcal {N}}_{ij}|> 1 \wedge |{\mathcal {M}}_{ij}| < 5 \wedge i \ne j \end{aligned} \end{aligned}$$
(12)

Third, we introduce the constraint (13), which includes all combinations of i and j excluded in (12) and (10).

$$\begin{aligned} \begin{aligned} 3X_{ij} \le \sum _{v \in {\mathcal {M}}_{ij}}X_{iv} \quad \forall i \in {\mathcal {I}}, \\ \forall j \in {\mathcal {J}}_i \setminus {\mathcal {A}}_i:|{\mathcal {M}}_{ij}|= 5 \wedge i \ne j \end{aligned} \end{aligned}$$
(13)

Now, our third set of constraints aims to ensure that each BA j allocated to i has at least three adjacent BAs v allocated to the same districts, if possible. (10) and (12) are applied if a BA j with the district center i has fewer than 5 elements in \({\mathcal {M}}_{ij}\). Here, the restrictions ensure the same contiguity and compactness as (10) and (11). If a combination of i and j in \({\mathcal {M}}_{ij}\) has five BAs v, we apply restriction (13). This secures that at least three BAs \(v \in {\mathcal {M}}_{ij}\) are allocated to the same district center as j. While improving the compactness, the constraint still ensures that the resulting districts are contiguous, as the distance \(a_{iv}\) of one of those allocated BAs \(v \in {\mathcal {M}}_{ij}\) is always lower than \(a_{ij}\). An illustration can be seen in Fig. 1c. We intentionally excluded additional constraints to the adjacent BAs \(v \in {\mathcal {A}}_i\) of a district center i, as the current formulation still allows small districts. Nonetheless, it is important to note that the possible district layouts resulting from C1, but especially from C2 and C3, are a subset of the set of all possible contiguous district layouts. Thus, we could find superior objective values with less restricted contiguity constraints at the cost of higher distortions to the compactness of the layouts (Mehrotra et al. 1998).

4.4 Algorithmic experiments

In the following, we will investigate the algorithmic solvability of the presented problem.

Table 1 Benchmark: different instances and their computation time (seconds)

To evaluate it, we implemented our model without constraints (7) and (8) on a computer with an 8-Core AMD Ryzen 5700 G CPU and 32 GB of RAM. For our benchmark, we created four scenarios based on the same rectangular section of an urban area: one with 510 BAs, one with 1008 BAs, one with 1508 BAs and one with 2040 BAs. First, we replaced the total weighted number of requested cars in each BA by the number of street intersections on the underlying street network of each individual BA. Afterward, we set the relative gap between the incumbent solution and the best viable solution to 0% to obtain the optimal solution in each instance. We solved all instances in Julia 1.7 using JuMP 0.22 (Iain et al. 2017) and Gurobi 9.5 aborting the calculation of each instance after 21,600 s. Besides the variation of \(|{\mathcal {J}}|\), we varied \(|{\mathcal {I}}|\) and p. We did not restrict the maximum feasible driving time \({\bar{d}}\), thus assuming that each BA j can be assigned to each BA i. Furthermore, we solved each instance with our new constraints from the sets C1, C2 and C3 as well as without our new constraints (C0). We display the results in Table 1.

Summarized, \({\mathcal {I}}\) and \({\mathcal {J}}\) influence the calculation time in the same direction: larger sets lead to the longer computations. The change caused by a larger number of centers p is not as straightforward. Generally, it seems as if lower p values are more difficult to solve. This can be observed independent of the number of BAs or the different contiguity and compactness constraints. Our new contiguity and compactness constraints increase the calculation time except for one outlier: the stronger the compactness formulation, the higher the calculation time. The outlier occurred with 2040 BAs and potential locations, 3 centers and the constraint set C2. It is the only instance we couldn’t solve within 6 h. If we ignore the outlier, our constraint sets C1, C2 and C3 increase the computation time by a factor of 3.08, 3.38 and 6.73 respectively when compared to the basic problem without contiguity and compactness constraints (C0). Thus, we conclude that our model can be applied to real problems without a heuristic despite the additional computation time caused by our new constraint sets, as long as the problem size is not too large.

4.5 Emergency service operation simulation

We cannot properly judge the quality of our solution based on our model alone, as it is an abstraction of the actual world. It incorporates neither queuing times, priorities and missing cars nor inter-district dispatches. One option would be the evaluation with real-world experiments, but this could lead to issues of safety, risks, and costs (Zhang and Brown 2013). Real scenarios are subject to uncertainties, dynamic interactions and interdependencies between variables. It is difficult to create constant situations for experiments to derive meaningful conclusions (Miller and Knoppers 1972). To address these issues, we evaluated the resulting districts with an emergency service operation simulation. We wrote our simulation in Julia, a high-level programming language with an emphasis on speed (Bezanson et al. 2017). It allows for a fast simulation of real-world incidents, allowing us to simulate around 20,000 incidents per second on each CPU Core. Its structure is influenced by the emergency service simulations of Kolesar and Walker (1975), Kern (1989), Zhang and Brown (2013), Mayorga et al. (2013) and Dunnett et al. (2019) and augments these approaches. Our simulation is flexible and has various adjustable parameters to specify the dispatching rules. Among other things, it accounts for the variability of spatial and temporal incident patterns, multiple vehicle dispatch, shifts, priority handling, rush hours, exchanges between districts, variable driving times and follow-ups after incidents.

Algorithm 1
figure a

Pseudocode of the Simulation

The basic idea is described in the pseudocode of Algorithm 1. Our simulation runs over a specified time horizon and serves the historical incidents during that time. We start with a given number of vehicles per district, which changes over the course of a weekly shift pattern. Each minute, we allocate all new incidents to queues. Afterward, we allocate the number of requested cars to each incident based on the predefined dispatching rules. After vehicles have served an incident, the bound resources enter the pool of available vehicles again, either to be dispatched anew or to work on the deployment follow-up. Besides the simulation of district layouts, our simulation allows for experiments with dispatching rules, shift patterns and personnel resource allocations. Several important factors to our case study, such as the consideration of variable driving times and the computation of the number of vehicles per district, are described in the next section. But to keep our work within a reasonable length, we refrain from describing other factors, such as the dispatching rules, in more detail. For interested readers who would like to know more, we published our framework together with exemplary data and further explanations about the simulation and the dispatching rules on GitHub.Footnote 1

5 Case studies

5.1 Data and parameters

In this section, we apply our framework to improve the districting of two confidential regions in Germany and Belgium. To solve our research questions, the authorities granted us access to two classified incident data sets. The first data set consisted of all CFS in a confidential region in Germany from 2015 to 2019. The second data set included all CFS in Belgium from 2019 to 2020. Because of the confidentiality of the data, incident locations were partly aggregated at street level. All incidents encountered by patrol cars and incidents reported in retrospect were not included in the data sets.

With this foundation, we set up a hexagonal representation of both areas. Except for the driving time \(d_{ij}\) and the Euclidean distances \(a_{ij}\), we could derive all necessary parameters for each BA j from the police data sets or use approximations in consultation with the police authorities. For the computation of the Euclidean distances \(a_{ij}\) necessary for our contiguity and compactness constrains, we use the original centroids of the BAs. The driving time \(d_{ij}\) represents the time to get from the centroid of i to the centroid of j on the underlying street network. We thus moved the centroids to the nearest major street intersection to increase the accuracy of the driving times, as proposed by Shen et al. (1995). In addition, this ensures that remote areas with few streets are still reachable if we impose the maximal allowed driving time \({\bar{d}}\). The street network in Germany was based on OpenStreetMap Data (Geofabrik GmbH and OpenStreetMap Contributors 2020). TomTomFootnote 2 supplied the street network in Belgium. For the computations, we used Dijkstra’s algorithm and took the speed limits of all roads into account. Although the responders are not legally bound by speed limits, they serve as an indicator of the road conditions. For example, police cars within cities usually cannot drive at 90 or 100 km/h, as they must drive carefully. On country roads they can drive much faster, e.g., at 120 or 130 km/h - but even here they must look after animals crossing the street. Thus, they can never really drive unconstrained (except on highways). Now, \(d_{ij}\) represents the driving time without congestion, traffic lights, construction sites or other obstacles. In the real world, these conditions have a substantial influence on the driving time, especially in urban areas (Zhang and Brown 2014). With this in mind, we introduce the traffic flow parameter \(r_t\) to enhance and legitimize our driving time. It is a multiplier for each week-hour \(t \in {\mathcal {T}}\) and describes the additional time required to move between two locations during a “typical week”. In accordance with the available data, we selected a week during springtime that was free of public holidays. To determine \(r_t\), we utilized the Google Maps Distance Matrix APIFootnote 3 to anticipate two driving times for eight different routes between the BAs l and k with \(l \in {\mathcal {I}}\) and \(k \in {\mathcal {J}}\) for each week-hour t during the selected week. The first was an optimistic driving time \(d^o_{klt}\) and the second was the best guess of the driving time \(d^b_{klt}\) generated by the Google Maps forecasting model. We didn’t include the pessimistic forecast, as police vehicles under time constraints move faster than regular vehicles. Furthermore, we estimated that police vehicles arrive on average between \(d^o_{klt}\) and \(d^b_{klt}\).

To determine \(r_t\), we first divided the forecasted driving times of the API through our calculated driving time \(d_{kl}\) from the corresponding route for each week-hour, and averaged the quotients over all routes as expressed in (14).

$$\begin{aligned} r_t = \frac{\sum _k \sum _l {(d^o_{klt} + d^b_{klt})}}{\sum _k \sum _l {2d_{kl}}}{}\quad \forall t \in {\mathcal {T}} \end{aligned}$$
(14)

Next, we used \(r_t\) to derive the improved mean driving time \(d_{ijt}\) for all routes with (15).

$$\begin{aligned} d_{ijt} = r_t \times d_{ij}{} \quad \forall i \in {\mathcal {I}},\forall j \in {\mathcal {J}},\forall t \in {\mathcal {T}} \end{aligned}$$
(15)

Ideally, we would have forecasted the driving times for all routes between our BAs for each week-hour with the API, but this was economically unfeasible due to the cost of each API request.

5.2 Optimization design

Table 2 Optimization summary

Our optimization has an identical structure in both case studies. Because of the partly aggregated incident location data and a strong deviation of requested vehicles between the BAs, we settled for hexagons with a diameter of 750 ms in both case studies, which resulted in 1596 BAs in Germany and 1233 BAs in Belgium. We mapped all natural barriers in the adjacency matrix. In addition, we had to account for the fact that police departments have to fulfill several elements of community demand rather than just CFS (McCabe 2017). We thus discarded all rural BAs without streets or with zero incidents and all BAs where it would not be suitable to locate a police department because of their geography from the set of the potential locations \({\mathcal {I}}\). Thereafter, we were left with 1166 potential department locations \({\mathcal {I}}\) in Germany and 914 potential locations \({\mathcal {I}}\) in Belgium. A summary is displayed in Table 2.

In Germany, we solved three distinct problems: G1, G2, G3. First, we applied our framework to the optimization of the district borders with the current department locations (G1). Next, we allowed the exchange of the location of one police department (G2). Then, we allowed the reallocation of all police departments (G3). We refer to the current layout in Germany as G0. In Belgium, we solved the three separate problems B1, B2 and B3, and focused on different objectives, as the authorities were interested in the optimal location of a new police department. First, we optimized the district borders while fixing the present two department locations (B1). Thereafter, we kept the two present department locations and allowed the model to allocate a third police department freely (B2). Last, we granted the free allocation of three police departments (B3). To refer to the present layout in Belgium, we use the abbreviation B0. We examined all six problems G1, G2, G3, B1, B2 and B3 for each contiguity variation C0, C1, C2 and C3 from Sect. 4.3.

Please note that the datasets analyzed during the case study are not publicly available due to the strict confidentiality of the information. However, we provide sample data sets on GitHub that are close to the structure of the real data.

5.3 Simulation design

We simulated the police service over the entire time horizon of each historic data set to assess the new district layouts. Naturally, the driving time of each incident response exhibits variability in the actual world. Moreover, the variance of the driving time changes over the course of each week, as a lower traffic volume, especially at night, contributes to better predictability. To account for this, we replaced \(r_t\) in our simulation with a normally distributed variable \(q_t \sim N(r_t, \sigma _t)\). To determine \(\sigma _t\), we used the predictions from the Google Maps Distance Matrix API. Furthermore, we estimated that the traffic flow parameter \(q_t\) lies between

$$\begin{aligned} r^b_t = \frac{\sum _k \sum _l {d^b_{klt}}}{\sum _k \sum _l {d_{kl}}}{} \quad \forall t \in {\mathcal {T}} \end{aligned}$$
(16)

and

$$\begin{aligned} r^o_t = \frac{\sum _k \sum _l {d^o_{klt}}}{\sum _k \sum _l {d_{kl}}}{} \quad \forall t \in {\mathcal {T}} \end{aligned}$$
(17)

in 90% of all incidents. Thus, the stochasticity of the traffic and other unforeseen circumstances in the corresponding week-hours were incorporated into the simulation.

In addition, we had to define new plans for the shift pattern in each police department, as our new layouts influenced the required personnel resources. We used a heuristic based on safety stocks to plan the resources based on the accrued workload over the time horizon of each data set. \({\mathcal {H}}\) was the set of all departments and \({\mathcal {K}}\) the set of all week-hours and \({\mathcal {K}}^S\) was a partition of the week-hours \({\mathcal {K}}\) into shifts. First, we calculated the average workload \(\mu _{hk}\) and standard deviation \(\sigma _{hk}\) of each department \(h \in {\mathcal {H}}\) in each week-hour \(k \in {\mathcal {K}}\) based on the district layout. Next, we used equation (18) with the inverse normal distribution to determine the adjusted weekly time demand \(b_{hk}\).

$$\begin{aligned} b_{hk} = F^{-1}_{Z_{hk}}(\alpha _s) \text { with } Z_{hk} \sim N(\mu _{hk},\sigma ^2_{hk}) \end{aligned}$$
(18)

In both case studies, we applied the service factor \(\alpha _s = 0.90\), as departments under pressure could request vehicles from surrounding districts. We then used \(b_{hk}\) to determine the highest demand \(\tau _{hs} = \max _{k \in s} b_{hk} \forall s \in {\mathcal {K}}^S\) of each location h and shift \(s \in {\mathcal {K}}^S\). Afterward, we assigned the total weekly available workforce of the police jurisdiction to each shift, depending on the highest demand \(\tau _{hs}\) of each shift. In addition, we accounted for the minimum workforce that had to be assigned to each district in each shift. Thus, we determined the shift plan in each department a posteriori based on the incidents we later used in our simulation. We fixed the resulting weekly shift plans over the whole time horizon of the simulation. Our focus was neither shift planning nor forecasting; thus we deemed these assumptions acceptable as they allowed us to test our district layouts with good shift plans. The dispatching rules were constant over the entire simulation and were defined in accordance with the police administrators. To ensure stable results, we simulated each layout 100 times and reported the average of each criterion. Both optimization model and simulation ran on the same workstation as before.

5.4 Results in Germany

Table 3 displays the computation time for all six problems and their variations from our two case studies. Except for the outlier problem G3 with contiguity variation C3, we could solve all problems in Germany within 6 min.

Table 3 Computation time for all problem variations in Germany and Belgium (seconds)
Table 4 Germany: results from the simulation (%)

To evaluate the improvements of our new layouts in Germany, we compared selected criteria from our simulation with the present layout G0. In all simulations, we employed the same dispatching rules and resource parameters. We display the results for Germany in Table 4. We focus on the districts from the constraint sets C1, C2 and C3, as the districts without these constraints were non-contiguous. Because of the confidentiality of the data, we can only show the relative change to the present layout G0.

The first criterion represents the improvement of the dispatch time. It shows the average time until the first responding vehicle is assigned to an incident. In our simulation, this time could be decreased by up to 10.53% while using the present department locations in problem G1 with the constraints from C3, and up to 22.56% if we allowed the reallocation of all police departments in G3 while using C3. The second criterion expresses the difference of the average response time of the first responder. Given the established department locations in problem G1, we could shorten it by up to 6.00% with constraint set C3. If we allowed the reallocation of one department in problem G2, the best reduction amounted to 6.47% with C1. The best improvement by 14.52% was achievable in problem G3 with C3. The third criterion shows the difference of the overall driving time in the simulation. The optimization lowered the driving time on average by 4.10% in G1, 4.53% in G2, and 10.34% in G3. While this might seem small at first, an improvement of 1% is roughly equivalent to a weekly reduction of the driving time by 17 h over all departments. The fourth criterion displays the relative change in the time vehicles spent at the department. At the department, vehicles—and thereby the officers—are not assigned to specific tasks. Thus, they can react immediately in case of a call for service. Time spent at the department increased in G1, but the improvement was even greater in G2 and G3. The last criterion covers the exchange rate. During our simulation, an exchange took place, if a district did not have enough resources to dispatch a vehicle. In this case, other districts had to dispatch their cars to help. Our new districts mostly lowered the exchange rate, the best improvement by 4.22% was achieved in problem G3 with C3.

A closer analysis of the contiguity variants shows we could achieve the strongest improvements in G1 with C0, although the gains of C3 were close behind. Furthermore, we could produce the best improvements in G2 with C0 and in G3 with C3. The discrepancy of all criteria between the variants C0, C1, C2 and C3 of each problem remained within 3.5%. The driving time of each simulated problem instance with C0 was the smallest for G1 and G2, although the resulting districts were neither contiguous nor visually compact. In G3, the driving time was the lowest with the constraints from C3. A further analysis showed that the main reason for the reduction was the greater compactness of the districts that allowed for better inter-district exchanges under heavy load. But to benefit from the stricter contiguity constraints, the department locations had to be unconstrained to expand the permissible solution range.

A look at the district visualization in a geographic information system reveals the increased compactness. Note, that we only present the layouts where all departments were relocatable and that we have altered the covered area to protect the confidentiality of the region. This results in some districts, where the district center is outside the displayed area. The district from problem G3 with C0 is displayed in Fig. 2 and G3 with C1 is shown in Fig. 3. Figure 4 displays the best layout G3 with C2, and Fig. 5 illustrates the best layout of problem G3 with C3. It is apparent that the districts in Figs. 4 and 5 exhibit a visibly higher compactness than the districts in Figs. 3 and in 2. Equally important, Fig. 5 shows that the departments are distributed more evenly across the map when compared to the other district layouts.

Fig. 2
figure 2

Optimal solution if all departments are relocatable (G3) without contiguity constraints (C0). Response time reduced by 13.29%

Fig. 3
figure 3

Optimal solution if all departments are relocatable (G3) under contiguity constraint (9) (C1). Response time reduced by 13.60%

Fig. 4
figure 4

Optimal solution if all departments are relocatable (G3) under contiguity and compactness constraints (10) and (11) (C2). Response time reduced by 12.98%

Fig. 5
figure 5

Optimal solution if all departments are relocatable (G3) under contiguity and compactness constraints (10), (12) and (13) (C3). Response time reduced by 14.52%

In addition, the new districts improved the number of unanswered CFS. We classified incidents as unanswered, if they couldn’t be served within 6 h. Except for a few outliers, they belonged to the lowest priority. They were queued and skipped because the vehicles had to attend incidents with a higher priority. After the optimization, the number of missed incidents compared to the present layout was lower in seven of nine instances.

During our work, we also examined the influence of balancing the workloads per department enforced by additional constraints, as the minimum workforce that has to be ensured in each department might lead to unbalanced resource demands during low-workload periods. Our idea was that balanced workloads might contribute to lower dispatch times and therefore to lower response times because of better resource distribution. But there is a trade-off between a restriction to the workload and a reduction of the driving time because further restrictions lower the permissible solution range. Unfortunately, our simulation demonstrated that the longer driving time negated any improvements arising from a better workload distribution.

Fig. 6
figure 6

Current layout in Germany (G0): average number of vehicles per status over the course of 24 h

In addition, our simulation showed that the shift pattern, the resource distribution and the dispatching rules had a strong impact on the criteria. Figure 6 illustrates the average vehicle status per department for each hour of the day over the whole timeframe of the simulation in G0 under an artificial shift pattern. In this example, each shift was 8 h long and new shifts began at 6 a.m., 2 p.m. and 10 p.m. every day. Among other things, the figure shows a spike in vehicles ’at department’ between 4 a.m. and 9 a.m. This spike arose because of suboptimal shift changes, which contributed to wasted personnel resources: the assigned vehicles of the shifts between 6 a.m. and 2 p.m. had to respond to a rising incident volume each hour. At 6 a.m. the departments had around 1.6 vehicles without duty, while the system was under heavy load with only 0.2\(-\)0.4 free vehicles between 11 a.m. and 2 p.m. A similar reversed pattern developed in the shifts from 10 p.m. to 6 a.m. Intensified through the spatio-temporal variability of the incidents and the variability of the driving time, this led to many inadequate responses in our simulation. Overall, the officers spent only 23.27% of the time at the department without a task. This is critical because a part of this time did not serve as a safety buffer but emerged from suboptimal shift plans.

In conclusion, we could improve all five criteria in Germany through our new district layouts. Nevertheless, we have to keep in mind that other factors influence the efficiency and effectiveness of service operations as well.

5.5 Results in Belgium

Fig. 7
figure 7

Current department locations with optimal district borders (B1) in Belgium

In our case study in Belgium, we applied the same framework as in Germany, but we adjusted the dispatching rules to account for the structure of the spatial incident distribution. We could solve all optimization instances in Belgium within 4 min, as disclosed in Table 3.

The district layouts of the contiguity variations C1, C2 and C3 in Belgium were nearly identical in each problem. Hence, the differences between the contiguity variations of each problem were much smaller than in Germany. We illustrate this in Fig. 7 for B1. Note that we have again altered the covered area to protect the confidentiality of the region. These lower deviations can be explained through the lower number of police departments and the geography of the region. In contrast to Germany, the region in Belgium is not a metropolitan area but a cluster of towns with rural areas in between. The district borders of the layouts run through rural regions without sizeable incident volume variations. Nevertheless, our contiguity variations helped to ensure contiguity and to enhance the compactness. Figure 7a displays the optimal solution without our new constraints for the current department locations. Clearly, the solution is neither contiguous nor compact. Figure 7b illustrates that the contiguous solution from C1 results in a non-compact distortion that the identical solution from the more restricted contiguity variations C2 in (c) and C3 in (d) prevented.

Table 5 Belgium: results from the simulation (%)

The simulated improvements of our layouts compared with the present layout B0 are displayed in Table 5. The dispatch time in the three instances in B1 was greater than in the present district layout B0. In particular, assigning three departments instead of two, as in B2 and B3, contributed to an increase in the dispatch time and a sharp rise in the exchange ratio. We expected this, as equal personnel resources had to be shared among more departments, which led to a longer dispatch time under heavy workloads for incidents with a low priority and more exchanges. Nevertheless, the response time was shorter in B2 and B3 because of the strong reduction in driving time. An exception was the non-contiguous district layout from Fig. 7a, which response time was only beat by the layouts in B3. A second benefit of the additional location was more time spent at the department.

In contrast to Germany, our new layouts in Belgium did not improve each criterion. However, our framework showed that a new department can reduce the response time and the driving time significantly. Whether this justifies the drawbacks in other criteria has to be decided by the authorities.

6 Discussion

The results of our case studies are promising, as the simulation demonstrated that our new framework can improve several criteria. A modification of our optimization problem could be applied to the key problem of the PDP: the planning of patrol beats within districts. Besides police services, we could employ an altered version of our framework for fire and ambulance services, as the structure is closely related. Moreover, if requested, we could implement extensions with restrictions on either the workload deviation or the department capacities. These measures would benefit from our newly proposed contiguity constraints, as the likelihood of distortions occurring in the district shapes increases with new constraints. In addition, our newly proposed constraints could be applied to other TDPs to achieve contiguity and compactness within reasonable computation times. Furthermore, additional research can address the current limitation of these constraints to a hexagonal BA structure to support BAs of all shapes.

But our framework has some limitations. First, we assume that the future incident pattern reflects the historic pattern. Moreover, in some instances the district layouts without contiguity and compactness constraints (C0) featured the lowest response time. One reason is that our simulation doesn’t include patrol cars as backup because this wasn’t a research goal in either case study. Nevertheless, these backups might improve the simulated criteria of the new districts resulting from C2 and C3, as these districts exhibit an improved compactness. Police administrators must decide whether giving up these conditions might be worthwhile considering the potentially lower response time, or whether we should expand our simulation in a future study to include these backups. In addition, the resulting districts don’t follow municipal boundaries, as we used hexagons as BAs. Last, spatio-temporal incident patterns change and implementing new district layouts and department locations might influence and advance this process.

Apart from that, our work revealed several other influences on the response time. Smaller shift intervals, an adjustment of shift changes, a better capacity distribution and more personnel could lower the response time and improve other criteria. These influences could be investigated further in future research. To achieve this, we could replace the capacity heuristic with an optimization model, aiming to distribute the overall capacities, shift lengths and shift changes depending on the workload, the legal rules and the officers’ preferences. In addition, we could improve the dispatching rules, as in our case studies dispatchers decide which vehicle to dispatch based on their best knowledge. Our simulation would support experiments with variations to the present rules, and additional research could be conducted to complement the dispatchers with a recommendation system, as proposed by Shen et al. (1995).

Above all, our work and our district layouts have to be questioned thoroughly and with care. We only used CFS for our optimization, and we didn’t model other elements of community demand (McCabe 2017). Furthermore, certain crimes are more likely to be reported, and only recorded crimes become data. In addition, citizens in certain areas can be uncomfortable with the police and thus avoid reporting incidents. Hence, modeling districts and especially patrols beats after historic incidents without further inquiries can lead to blind spots (Vestby and Vestby 2021). Likewise, we cannot ignore that crime expresses discontent in the social system. Our framework does not address the roots of such discontent and solely deals with the surface of the problem. Community work and political approaches have to be addressed simultaneously for sustainable improvements (Peet 1975).

7 Conclusions

In this paper, we introduced a districting framework that helped to provide valuable information to police administrators in Germany and Belgium. The first part of the framework is based on a linear mixed-integer optimization that reduces the driving time of police vehicles using a novel combined approach to compactness and contiguity through a hexagonal grid. The problem with non-fixed centers is valuable in the design phase of a police system. Once the district centers have been built, a reoptimization of districts is an interesting managerial problem in its own right that should regularly be carried out, for instance to react to a change in the frequency of CFS. The second part is a simulation to evaluate the quality of the resulting layouts according to several criteria. The potential improvements are promising and followed from our newly introduced constraints. In Germany, our simulation showed a potential reduction of the response time by 6.00% through a redesign of the present district borders. A substantial response time reduction by 14.52% could be achieved through the reallocation of several departments. In Belgium, we could reduce the response time by up to 8.66% through the introduction of a third police department.

Different other criteria in both case studies could be improved as well. In conclusion, our framework is suited not only for redistricting, but it can also help with strategic planning decisions regarding new department locations. Moreover, our results show that police service administrators could benefit from the use of OR techniques in the planning of department locations and district layouts. The sooner they incorporate such techniques into the planning process, the more room for improvements.