使用超级运动数据优化救护车响应时间

介绍 (Introduction)

The efficiency of Emergency Medical Services (EMS) is a major indicator of a well-functioning health system. In this report, I compare various ambulance fleet management strategies to minimize their response time. Based on real-life data, I analyze then compare the findings of the simulation against the benchmark of EMS response time in London. Furthermore, I test the effect of varying the average speed of ambulances as well as the impact of the closure of the London Tower Bridge in the last quarter of 2016 on the average response time.

紧急医疗服务(EMS)的效率是健康系统运作良好的主要指标。 在这份报告中,我比较了各种救护车队管理策略,以最大程度地缩短响应时间。 根据实际数据,我将分析结果与伦敦EMS响应时间基准进行比较,然后进行比较。 此外,我测试了改变救护车平均速度的影响以及2016年最后一个季度伦敦塔桥关闭对平均响应时间的影响。

方法 (Methodology)

Compiling the road grid of London into a network is computationally expensive, so the approach was to coarse-grain the system to have regions (with a mean area of 1.6 km²) as the building blocks. Using the open-source Uber Movement dataset, the city was constructed with roughly 1000 regions of Greater London made up of polygon shapes. Next, creating edges between two given regions relies on the number of coordinates that their polygons share (i.e., if a pair of regions shares at least one coordinates, then they’re adjacent, and thus they’re linked with an edge).

将伦敦的道路网格编译为网络在计算上是昂贵的,因此该方法是对系统进行粗粒度处理,以将区域(平均面积为1.6km²)作为构建基块。 使用开源的Uber Movement数据集,这座城市由大伦敦地区的大约1000个区域组成,这些区域由多边形形状组成。 接下来,在两个给定区域之间创建边取决于它们的多边形共享的坐标数(即,如果一对区域共享至少一个坐标,则它们相邻,因此它们与一条边链接)。

Image for post
Networkx package Networkx软件包生成的大伦敦地区网络

For a more focused analysis, a subsection of London’s regions was selected containing 71 areas around the epicenter of the city. The dataset of the Uber Movement populates the average traveling time between all pairs of regions which then served as edge-weights for the subsection of London’s network (dark grey for high average travel time, light grey for low averages)

为了进行更集中的分析,选择了伦敦区域的一个子区域,其中包含该城市震中周围的71个区域。 Uber运动的数据集填充了所有成对区域之间的平均旅行时间,然后充当伦敦网络子区域的边缘权重( 深灰色代表高平均旅行时间,浅灰色代表低平均时间 )

The probability of requesting an ambulance differs across regions. Using the crime rate index published by the Metropolitan Police of London, each region was given a crime rate metric indicated by the node color in the network (red for high crime rate and blue for low rates). The size of the nodes reflects the area of the region in km². Finally, hospitals in London were located using Google Maps API (green nodes) then associated with their respective region in London’s subsection network. (i.e., if medical center’s coordinates fall within the polygon of a region then it is included into the region’s node).

要求救护车的可能性因地区而异。 使用伦敦都会警察局发布的犯罪率指数,每个区域都有一个犯罪率度量标准,该度量值由网络中的节点颜色指示( 红色代表高犯罪率,蓝色代表低率 )。 节点的大小反映以km²为单位的区域面积。 最后,使用Google Maps API( 绿色节点 )对伦敦的医院进行定位,然后将其与伦敦分区网络中的各自区域关联。 (即,如果医疗中心的坐标落在区域的多边形内,则将其包括在该区域的节点中)。

Image for post
A network of the 71 subregions of London
伦敦71个次区域的网络

假设条件 (Assumptions)

Although the network was constructed to approximate real settings, the following assumptions serve as a prior for interpreting the findings of the simulation:

尽管该网络是为逼近实际设置而构建的,但以下假设可作为解释模拟结果的先决条件:

  • Ambulances are all coordinated with the same provider (i.e., all requests reach a central planner, then ambulances are dispatched given the proximity of the emergency request).

    救护车都与同一提供者协调(即,所有请求都到达中央计划者,然后在紧急请求接近时分派救护车)。
  • The crime rate is a holistic metric that includes crimes that don’t involve hospitalization. In other words, one can make an argument that touristic attractions inflate the crime rate because of pick-pocketing, which doesn’t necessarily imply a high number of ambulance requests.

    犯罪率是一个整体指标,其中包括不涉及住院的犯罪。 换句话说,有人可以说旅游景点由于扒窃而使犯罪率高涨,这不一定意味着要大量的救护车。
  • The average travel time is based on Uber rides measurements, but ambulances can cut through traffic by skipping red lights or when cars move aside to make way for them. The simulation pictures this advantage by introducing the ambulance velocity parameter.

    平均出行时间是基于Uber游乐设施的测量结果,但救护车可以跳过红灯或当汽车驶开为他们腾出地方时,可以切断交通。 仿真通过引入救护车速度参数来体现这一优势。
  • Hospitals are simulated to have an unconstrained number of ambulances.

    模拟医院的救护车数量不受限制。
  • Emergencies are categorized by priority in real-life, but -for the sake of simplicity- all emergencies generated in the simulation have the same priority.

    紧急情况在现实生活中按优先级进行分类,但为简单起见,模拟中生成的所有紧急情况均具有相同的优先级。

建模与仿真 (Modeling and Simulation)

Given the underlying data structure, I designed an object-oriented program that takes the network as an input as well as other parameters (average speed of ambulances, hospital nodes, and the number of emergency requests). The approach is that all requests are generated at once, then the simulation loops through them to compute the average response time.

考虑到底层的数据结构,我设计了一个面向对象的程序,该程序将网络以及其他参数(救护车,医院节点的平均速度和紧急请求的数量)作为输入。 该方法是一次生成所有请求,然后模拟遍历它们以计算平均响应时间。

  • generate_requests: The function generates emergency calls in different regions of the city using a normal random sampler weighted by the normalized criminality rate. (i.e., a region with relatively high criminality rate would have more frequent ambulance calls).

    generate_requests:该函数使用正常的随机采样器对城市的不同区域生成紧急呼叫,该采样器由归一化的犯罪率加权。 (即,犯罪率相对较高的地区会更频繁地拨打救护车)。

  • estimated_travel_time: The function estimates the average travel time using the shortest path sequence between the hospital and the region from which the emergency call was generated. For each edge on the shortest path, a sample is taken from a normal distribution with mean set on the average travel time on the edge, and standard deviation of travel time on the edge. Finally, it returns the sum of the edge samples. (Note: both estimations of mean and standard deviation are extracted from Uber Movement data)

    Estimated_travel_time:该函数使用医院与生成紧急呼叫的区域之间的最短路径序列来估计平均旅行时间。 对于最短路径上的每个边缘,从正态分布中获取样本,并在边缘上的平均行进时间和边缘上的行进时间的标准偏差之间设置平均值。 最后,它返回边缘样本的总和。 ( 注意:均值和标准差的估计均从Uber Movement数据中提取 )

  • shortest_path: The function computes the shortest path between hospital nodes and the node from which the emergency call was generated following this process:

    shortest_path:该函数计算医院节点与按照以下过程从其生成紧急呼叫的节点之间的最短路径:

运行模拟 (Running the Simulation)

The iterative nature of the simulation relies on two variables, the number of requests generated and the number of runs for each simulation. Using the travel time data from the third quarter of 2016, I controlled for the speed of ambulances at 20 Km/h then ran the simulation 500 times, generating 2000 requests in each iteration, which yielded the following histogram for the distribution of response time.

模拟的迭代性质取决于两个变量,即每个模拟生成的请求数和运行数。 使用2016年第三季度的旅行时间数据,我将救护车的速度控制在20 Km / h,然后运行了500次仿真,每次迭代生成2000个请求,得出了以下响应时间分布的直方图。

Image for post

救护车平均速度 (The average speed of ambulances)

According to the NHS London Ambulance Services, ambulances in London are legally constrained with a speed limit of 20 mph (around 32 Km/h). To test the effect of varying speed, I generated 2000 requests for 100 simulations for each speed ranging from 10 to 35 Km/h

根据NHS伦敦救护车服务的规定伦敦的救护车受到法律限制,速度限制为20英里/小时(约32公里/小时)。 为了测试速度变化的影响,我针对10至35 Km / h的每种速度生成了2000个请求,需要进行100次仿真

Image for post

The decrease in average response time is gradual; hence, rising speed has a diminishing return. Starting with 10 Km/h, the response time is centered around 700 seconds, and then it decreases to around 570 seconds for an average speed of 20 Km/h to reach a maximum of 500 seconds at 35 Km/h speed. Notice that the standard deviation of these measurements are roughly the same across different speeds (±25s)

平均响应时间的减少是逐渐的; 因此,上升速度的收益递减。 从10 Km / h开始,响应时间以700秒为中心,然后以20 Km / h的平均速度减少到570秒,以35 Km / h的速度达到最大500秒。 请注意,这些测量的标准偏差在不同速度(±25秒)内大致相同

伦敦塔桥 (London Tower Bridge)

One of the compelling reasons for choosing London was to test the effect of the change in infrastructure on the response time of ambulance. During the last quarter of 2016, the London Tower Bridge was coed due to construction and reopened on December 30th, 2016. This serves as a great natural experience to disentangle the causal effect on response time. The comparison was drawn between two networks (the first carrying travel times of the 3rd quarter of 2016, the second contains the data from the 4th quarter).

选择伦敦的一个令人信服的原因之一是测试基础设施的变化对救护车响应时间的影响。 在2016年最后一个季度,伦敦塔桥因施工而被淘汰,并于2016年12月30日重新开放。这是一次很好的自然经验,可以消除因响应时间造成的因果关系。 进行了两个网络之间的比较(第一个是2016年第三季度的旅行时间,第二个是来自第四季度的数据)。

Image for post

Both distributions are approximately normal but centered 10 seconds apart as the response time across the network was 10 seconds faster before the closure of the bridge. The confidence intervals for both distributions have the same range (±13s)

两种分布都近似正常,但以10秒为中心,因为在网桥关闭之前,整个网络的响应时间快了10秒。 两种分布的置信区间都在相同范围内(±13s)

新的救护车基地 (New ambulance base)

Initially, the network simulation has a set of six hospitals scattered around the network of London. A heuristic for adding a new ambulance base was first to sort the nodes with the highest response time. The figure illustrates a network colored based on the average response time for all the requests generated from a given node. We notice that the northeast regions have a high response time compared to the rest of the network.

最初,网络模拟有一组分布在伦敦网络周围的六家医院。 添加新的救护车基地的启发式方法首先是对响应时间最长的节点进行排序。 该图说明了根据从给定节点生成的所有请求的平均响应时间为网络着色的网络。 我们注意到,与网络的其余部分相比,东北地区具有较高的响应时间。

Image for post
A network highlighting simulation result of average response time for each region
网络突出显示每个区域的平均响应时间的模拟结果

Since the traveling time between the five regions is roughly the same, we can pick a node to assign it as a hospital node (say region 155 contains an ambulance base). By doing so, we expect to push down the average response time for the whole network.

由于五个区域之间的旅行时间大致相同,因此我们可以选择一个节点将其分配为医院节点(例如区域155包含救护车基地)。 这样,我们期望降低整个网络的平均响应时间。

Image for post

The two distributions are distinct (not overlapping) as the addition of a base reduced response time by 60 seconds (from 573.52 to 512.96 s).

由于增加了60秒的基本响应时间(从573.52降低到512.96 s),所以两种分布是不同的(不重叠)。

To give a perspective of the comparison, adding one base in region 155 had the same impact as changing the average speed of ambulances from 20 to 30 km/h

为了便于比较,在155区增加一个基地与将救护车的平均速度从20 km / h更改为30 km / h具有相同的影响

结论 (Conclusion)

Response time has a crucial impact on the patient chances of receiving care on time. A slight improvement can prove to be life-saving for many emergency cases. Using simulation, we can not only judge the cost-effective strategy of optimizing response time, but we can also assess and devise ways to mitigate the impact of a change in infrastructure.

响应时间对患者按时接受护理的机会至关重要。 在许多紧急情况下,轻微的改进可以挽救生命。 使用模拟,我们不仅可以判断优化响应时间的经济有效策略,而且可以评估和设计减轻基础架构变更影响的方法。

In the ethical context, choosing between both strategies should account not only for the mean but also the spread of each distribution because using the utilitarian approach to optimize for the majority can hurt the outlier regions. (e.g., we don’t aspire for a distribution where the region with the highest response time is too far from the mean). The findings mentioned that these gaps are at most ±15 seconds, which is a reassuring indicator that the strategies are within a reasonable/feasible range to be included as decisions.

在道德方面,在两种策略之间进行选择不仅应考虑均值,还应考虑每种分布的范围,因为使用功利主义方法对多数进行优化可能会伤害偏远地区。 (例如,我们不希望响应时间最长的区域离均值太远的分布)。 调查结果提到这些差距最多为±15秒,这可以确保该策略在合理/可行范围内作为决策纳入考虑范围。

翻译自: https://towardsdatascience.com/optimizing-ambulance-response-time-using-uber-movement-data-4e6618240b67

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值