OR – Libby Daniells /stor-i-student-sites/libby-daniells STOR-i Student Wed, 20 Sep 2023 16:23:32 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.4 Ambulance Location Models /stor-i-student-sites/libby-daniells/2020/04/28/ambulance-location-models/?utm_source=rss&utm_medium=rss&utm_campaign=ambulance-location-models Tue, 28 Apr 2020 09:57:50 +0000 http://www.lancaster.ac.uk/stor-i-student-sites/libby-daniells/?p=431 As part of the STOR604 course at STOR-i, lecturers from around the world come to Lancaster to give a Masterclass in their area of research. In this blog post I’ll be discussing the use of Facility Location Models in the public sector which was introduced to me through a Masterclass given by Laura Albert from the University of Wisconsin-Madison. In particular I’ll be focusing on models that look to optimize the distribution of ambulances in order to maximize patient survival while balancing cost and the number of paramedics required.

Generally, the performance measure used for patient survival is the response time threshold (RTT). In most countries, including the US, an RTT of 8 minutes and 59 seconds is used. This time is based on research of cardiac arrest patients that suggest that a wait time of longer than 9 minutes severely diminishes their chance of survival. Therefore, our problem is where to locate \(p\) ambulances in order to cover the most calls in under 9 minutes.

In this blog we’ll be focusing on discrete cases in which the ambulances can be located at pre-defined points on a city map which form a set of vertices \(W\). Calls will then come in and be located on a separate set of vertices \(V\). We’ll discuss two of the more basic models that look at locating ambulances, we will not discuss models for dispatching ambulances but I’ll include references for further reading into this topic at the end of this post.

Maximum Coverage Location Problem

The Maximum Coverage Location Problem (MCLP) is one of the most basic models for locating ambulances on a set of vertices. We define the binary variable \(x_j\) equal to 1 if and only if an ambulance is located at vertex \(j\in W\). Similarly, the variable \(y_i\) is equal 1 if and only if vertex \(i\in V\) is covered by at least one ambulance. Let \(W_i\) be the set of location sites covering demand point \(i\). And finally let \(d_i\) be the demand on vertex \(i\). The model is then given as follows:

\begin{array}{lll}
\text{Maximize} & \sum_{i\in V} d_iy_i &\\
\text{s.t} & \sum_{j\in W_i} x_j\; \geq\; y_i & (i\in V),\\
& \sum_{j\in W}x_j\;=\;p,&\\
& x_j\;\in\;\{0,1\} &(j\in W),\\
&y_i\;\in\;\{0,1\} & (i\in V).
\end{array}

This may look rather complex for those of you who have not come across a linear programming model before so I will quickly run through line by line what it means. The first line is the objective function that simply states that we wish to maximize the total demand covered. The first constraint states that call \(i\) can only be covered if at least one of the potential ambulance location sites that covers \(i\) is selected. The next constraint says that we can use only \(p\) ambulances (this is included to limit fixed costs associated with locating more and more ambulances). The final two just mean that \(x_j\) and \(y_i\) are binary.

This model has several associated issues that make it unrealistic. For one, it doesn’t take into account that ambulance response times contain a large amount of uncertainty. This uncertainty can come from traffic delays, the weather or just time of day (Erkut et al. (2009)). It also assumes that the nearest ambulance is always available which may not be the case, instead we need some sort of back-up coverage. This problem stems from the fact that the MCLP only allows a single ambulance to be located at each vertex. Because of these issues several more advanced models have since been proposed that provide a more realistic solution.

The Maximum Expected Coverage Location Problem

The maximum expected coverage location problem is a direct extension of the MCLP that solves the issue of back-up coverage. In this model it allows more than one ambulance at each vertex so we need to adjust the definition of \(y_i\). We now define \(y_{ik}\) to be equal to 1 if and only if vertex \(i\in V\) is covered by at least \(k\) ambulances. In this model, each ambulance has an equal probability \(q\) of being busy and already out on a call. The model is as follows:

\begin{array}{lll}
\text{Maximize} & \sum_{i\in V}\sum_{k=1}^p d_i(1-q)q^{k-1}y_{ik} &\\
\text{s.t} & \sum_{j\in W_i} x_j\; \geq\; \sum^p_{k=1}y_{ik} & (i\in V),\\
& \sum_{j\in W}^px_j\;=\;p,&\\
& x_j\;\text{integer} &(j\in W),\\
&y_{ik}\;\in\;{0,1} & (i\in V,\;k=1,\ldots,p),\\
\end{array}

In this model the objective function is to maximize the expected coverage while the rest of the constraints remain similar to the MCLP model.

Extensions

Neither the MCLP nor the MEXCLP models are best for modelling the real life scenario of ambulance location, however both have been used to good effect to improve patient survival. There are now more advanced models that more realistically model the situation, these models address the following problems:

  • More than one vehicle type may attend a call e.g advance life support (ALS) or quick response vehicles (QRVs) that can provide immediate patient care but cannot transport to hospitals and basic life support (BLS). See Mclay (2009).
  • More than one ambulance may be dispatched on a call.
  • Travel times are non-deterministic i.e. response times contain some level of uncertainty due to traffic, the weather or time of day.
  • Each ambulance should respond to roughly the same number of calls to spread the workload.
  • We also may want to consider models that look at both dispatching and locating ambulances simultaneously. See Ansari et. al (2015).

Thank you very much Laura Albert for introducing me to Public Sector OR, I thoroughly enjoyed your Masterclass!

References & Further Reading

I would highly recommend reading the papers by Brotcorne et. al (2003) and Erkut et. al (2009) as these give a thorough overview of the models I’ve discussed in this post, as well as, further extensions.

  • Ansari, S., McLay L.A., Mayora, M.E., (2015). A Maximum Expected Covering Problem for District Design. Transportation Science 51(1), 376-390.
  • Brotcorne, L., Laporte, G., Semet, F. (2003). Ambulance Location and Relocation Models. European Journal of operational research, 147(3), 451-463.
  • Erkut, E., Ingolfsson, A., Sim, T., Erdogan, G. (2009). Computational Comparison of Five Maximal Covering Models for Locating Ambulances. Geographical Analysis, 41(1), 43-65.
  • McLay, L.A., (2009). A Maximum Expected Covering Location Model with Two Types of Servers. IIE Transactions 41(8), 730-741.
]]>
The Travelling Salesman Problem /stor-i-student-sites/libby-daniells/2020/04/21/the-travelling-salesman-problem/?utm_source=rss&utm_medium=rss&utm_campaign=the-travelling-salesman-problem Tue, 21 Apr 2020 08:28:18 +0000 http://www.lancaster.ac.uk/stor-i-student-sites/libby-daniells/?p=400 The Travelling Salesman Problem (TSP) is a classic optimization problem within the field of operations research. It was first studied during the 1930s by several applied mathematicians and is one of the most intensively studied problems in OR.

The TSP describes a scenario where a salesman is required to travel between \(n\) cities. He wishes to travel to all locations exactly once and he must finish at his starting point. The order in which the cities are visited is not important but he wishes to minimize the distance traveled. This problem can be describes as a network, where the cities are represented by nodes which are connected by edges that carry a weight describing the time or distance it takes to travel between cities.

This problem may sounds simple and using a brute force method in theory it is: calculate the time to transverse all possible routes and select the shortest. However, this is extremely time consuming and as the number of cities grows, brute force quickly becomes an infeasible method. A TSP with just 10 cities has 9! or 362,880 possible routes, far too many for any computer to handle in a reasonable time. The TSP is an NP-hard problem and so there is no polynomial-time algorithm that is known to efficiently solve every travelling salesman problem.

Because of how difficult the problem is to solve optimally we often look to heuristics or approximate methods for the TSP to improve speed in finding the solution and closeness to the optimal solution.

The TSP can be divided into two types: the asymmetric travelling salesman problem (ASTP) where the distance from A to B is different to that from B to A and the symmetric travelling salesman problem (STSP) where the distance from A to B is the same as from B to A. For example, the ASTP may arise in cities such as Lancaster where there are one-way roads that make travelling more varied. In this blog I will be focusing on the STSP and outline two of the most basic heuristic algorithms in which to solve them.

Nearest Neighbor Algorithm

One of the simplest algorithms for approximately solving the STSP is the nearest neighbor method, where the salesman always visits the nearest city. The process is as follows:

  1. Select a starting city.
  2. Find the nearest city to your current one and go there.
  3. If there are still cities not yet visited, repeat step 2. Else, return to the starting city.

Using the nearest neighbor algorithm on the below symmetric travelling salesman problem starting at city A, we would then travel to city B followed by D and C, returning back to A. This gives a total length of 18, which in this case is indeed optimal. However, the nearest neighbor algorithm does not always achieve optimality.

Figure 1

For example if we change the weight slightly:

Figure 2

The solution using the nearest neighbor algorithm starting again at A will result in the Route A -> C -> B -> D -> A, resulting in a route of weight 15. But this is not optimal. If we instead took the route A -> B -> D -> C -> A the weight would be 14, a slight improvement on that obtained by the algorithm. Therefore the algorithm achieved a sub-optimal result.

This algorithm under worst-case performance is \(\mathcal{O}(n^2)\), much better than the brute force method (which is \(\mathcal{O}(n!)\)). It is easy to implement but the greediness of the algorithm does cause it to run quite a high risk of not obtaining the optimal route.

Greedy Approach Algorithm

Before we delve into the next algorithm to tackle the TSP we need the definition of a cycle. A cylce in a network is defined as a closed path between cities in which no city is visited more than once apart from the start and end city. The order of a node or city is the number of edges coming in or out of it.

The greedy algorithm goes as follows:

  1. Sort all of the edges in the network.
  2. Select the shortest edge and add it to our tour if it does not violate any of the following conditions: there are no cycles in our tour with less than \(n\) edges or increase the degree of any node (city) to more than 2.
  3. If we have \(n\) edges in our tour stop, if not repeat step 2.

Applying this algorithm to the STSP in Figure 1, we begin by sorting the edge lengths:

B <-> D = 2, A <-> B = 4, C <-> D =5, A <-> D =6, A <-> C =7, C <-> B =8

We then add the routes B <-> D, A <-> B and C <-> D to our tour without problem. We cannot add A <-> D to our tour as it would create a cycle between the nodes A, B and D and increase the order of node D to 3. We therefore skip this edge and ultimately add edge A <-> C to the tour. This results in the same solution as obtained by the nearest neighbor algorithm.

If we then apply the method to the STSP given in Figure 2 we obtain the optimal route: A -> B -> C -> D -> A. This is an improvement on what was achieved by the nearest neighbor algorithm.

This algorithm is \(\mathcal{O}(n^2\log_2(n))\), higher than that of the nearest neighbor algorithm with only a small improvement in optimality.

References and Further Reading

As said above, these are only two of the most basic algorithms used to obtain an approximate solution to the travelling salesman problem and there are many more sophisticated methods. If you wish to read more about these, I would suggest reading the following two papers:

  • Nilsson, C., (2003). Heuristics for the Traveling Salesman Problem. Linkoping University.
  • Abdulkarim, H., Alshammari, I., (2015). Comparison of Algorithms for Solving Traveling Salesman Problem. International Journal of Engineering and Advanced Technology 4(6).
]]>
STOR-i Conference 2020: Alexandre Jacquillat on Airline Operations, Scheduling and Pricing /stor-i-student-sites/libby-daniells/2020/03/31/stor-i-conference-2020-alexandre-jacquillat-on-airline-operations-scheduling-and-pricing-2/?utm_source=rss&utm_medium=rss&utm_campaign=stor-i-conference-2020-alexandre-jacquillat-on-airline-operations-scheduling-and-pricing-2 Tue, 31 Mar 2020 08:28:12 +0000 http://www.lancaster.ac.uk/stor-i-student-sites/libby-daniells/?p=374 For this weeks blog post I wanted to branch out of the statistics field and into operational research. To do so I am going to focus on the talk given by Alexandre Jacquillat who opened the 2020 STOR-i Annual conference back in early January. For more details on the STOR-i Conference and an in depth look at Tom Flowerdew’s presentation on fraud detection please see my previous blog post.

Alexandre Jacquillat is an assistant professor of OR and Statistics at the MIT Sloan School of Management. His research focuses on applications in transportation systems to promote more efficient scheduling, operations and pricing using predictive and prescriptive analytics. This was the discussion point of his talk given at the 2020 STOR-i Conference, with a particular focus on the airline sector.

Alexandre Jacquillat at the STOR-i Anual Conference 2020

The work Jacquillat is doing is particularly vital as the transportation sector is transforming, with new technologies such as electric cars and ride sharing emerging, as well as, an increase in demand which is limited by capacity. His work aims to meet this rise in demand, whilst offsetting the costs of congestion.

In particular, the airline sector is a rapidly growing industry with a limited infrastructure. Most airlines are currently running at or above capacity which is what causes delays in departures and landings, incurs a cost to the airline and wastes valuable resources. The challenges surrounding airline operations, scheduling and pricing is a very current topic in the OR field, with the ultimate goal of improving efficiency and profitability in the industry.

I’ll be breaking this blog post down into the three sections discussed in Jacquillat’s talk: operations, scheduling and pricing within the airline sector.

Operations

The operations within airports are limited in capacity, as stated above, most airlines are operating at or above capacity which can cause severe delays. In order to balance capacity and demand and reduce delays and holding, Air Traffic Flow and Capacity Management (ATFCM) initiatives are implemented. One such initiative is the ground delay program, in which planes are held at departure airports if there is a delay to reduce cost and environmental impact, compared to waiting in the air for landing.

Jacquillat proposes modelling this as an optimization problem, in which our objective function is the cost of aircraft delay plus passenger delays constraint to: flight operating constraints, airport capacity constraints and passenger accommodation constraints. This aims to balance flight-centric vs. passenger-centric delays. It is important to consider both delay types, as there is not a direct correspondence between flight delays and passenger delays. Many passengers are on multi-flight itineraries where one small flight delay could cause them to miss multiple further flights and cause a large passenger delay.

Scheduling

Airlines are scheduled time slots for departures/arrivals through a request process. Some time slots are more in demand than others and this demand is often far greater than the capacity. Due to this, some airlines are not allocated their requested slot and instead a process needs to be implemented to ensure fairness in which alternate slot they receive. There is then a Slot conference in which allocated slots can be traded and changed.

This forms a complex slot allocation problem in which connection times and regularity of slots needs to be considered; but also, decisions regarding priorities in terms of historic slots (same airline allocated the same slot), new entrants and change-to-historic slots needs to be considered.

Jacquillat again proposed an optimization problem to allocate slots. To do so he suggested an objective function that minimizes the displacement of allocated slots from the airline’s original request. This objective is subject to the constraints:

  • Slot displacement: The difference between the slot time requested and those allocated.
  • Flight connections: The time to make a connecting flight is not over or under the allowable threshold i.e. there is enough time to make the connection or not too long to wait between connections.
  • Runway capacity: the allocation does not exceed the total number of flights that can depart or arrive at an airport during the time slot.
  • Terminal capacity: the number of people within the terminals waiting to depart or arriving does not exceed the allowed safety limits.

In order to solve this problem, Jacquillat suggested breaking the requests into subsets using an “Adaptive Destroy and Repair” approach which provides a relatively fast and high-quality solution. For more information about this method I would suggest reading the paper: “A Large-Scale Neighborhood Search Approach to Airport Slot Allocation” whose details I’ll leave in the references below.

During the conference, Jacquillat also presented an integrated approach to scheduling and traffic flow management that took into account the slot requests and airport capacity, as well as, passenger and aircraft itineraries. To do such a problem he proposed a two-stage stochastic integer programming model.

Pricing

The next thing to discuss was how to price airline tickets when compared to competitors. In general, the price of a ticket increases closer to the time of the flight, however a lead-in fare (the starting price) is made public. Good flights will move quickly up the price ladder, whereas less popular flights will stay at the lead-in fare for a longer period of time.

Jacquillat suggested a multi-control-group experimental design conducted on a global airline to test a new practice for airline pricing under competition. This is his current work that is in the process of being published.

I thoroughly enjoyed Alexandre Jacquillat’s presentation, which gave an insight into several solutions within a highly relevant application. I look forward to getting more exposure to OR topics and their applications in the future and in particular at the 2021 STOR-i conference. I’ve listed below some references and further reading into the topic. Thanks again Alexandre!

References & Further Reading

  • Ribeiro, N., Jacquillat, A., Antunes, A., (2019). A Large-Scale Neighborhood Search Approach to Airport Slot Allocation. Transportation Science 53(6).
  • Ribeiro, N., Jacquillat, A., Antunes, Odoni, A., Pita, J., (2018). An optimization approach for airport slot allocation under IATA guidelines. Transportation Research Part B: Methodological.
]]>