# 位置分配模型

位置分配模型是一种运筹学与设施规划方法，它同时为设施选址并将需求点分配给这些设施，从而使某一效率目标——如总需求加权距离或成本——最小化。在地理信息系统（GIS）框架下，输入为提供商品或服务的候选设施，以及消费这些商品或服务的需求点；求解器分析需求点分配给设施的各种方式，并返回所选设施及相应的分配方案。<sup>[1](https://desktop.arcgis.com/en/arcmap/latest/tools/network-analyst-toolbox/solve-location-allocation.htm)</sup> 其核心版本——p-中值问题——在给定设施数量（至少一个）的前提下进行选址，以使需求节点与所选设施之间的需求加权平均成本或距离最小。<sup>[2](https://transportgeography.org/contents/methods/location-allocation-models/)</sup> 因此，该模型有别于仅输出选址位置的方法：每个需求点向某一设施的分配也是解的一部分。<sup>[3](https://gistbok-ltb.ucgis.org/current/concept/AM-05-046)</sup>

| 关键事实 | 详情 |
|---|---|
| 输出 | 设施选址及需求点到设施的分配<sup>[1](https://desktop.arcgis.com/en/arcmap/latest/tools/network-analyst-toolbox/solve-location-allocation.htm)</sup> |
| 典型目标 | 在给定设施数量 p 的情况下，最小化需求加权平均成本或距离<sup>[2](https://transportgeography.org/contents/methods/location-allocation-models/)</sup> |
| 标准形式 | 二元选址变量 \( y_{j} \) 与分配变量 \( x_{ij} \)，作为整数线性规划求解<sup>[3](https://gistbok-ltb.ucgis.org/current/concept/AM-05-046)</sup> |
| 复杂度 | NP难，因此大规模实例需要启发式算法或高级精确方法<sup>[3](https://gistbok-ltb.ucgis.org/current/concept/AM-05-046)</sup> |
| 精确求解器 | 商业软件包（IBM CPLEX、Gurobi、FICO Xpress）与免费软件包（GLPK、COIN-OR）<sup>[3](https://gistbok-ltb.ucgis.org/current/concept/AM-05-046)</sup> |
| GIS实现 | Esri的Network Analyst采用带路径重连的GRASP<sup>[3](https://gistbok-ltb.ucgis.org/current/concept/AM-05-046)</sup> |
| 模型族 | 中值模型、覆盖模型、带容量约束模型与竞争选址模型<sup>[4](https://repositori.upf.edu/bitstreams/2207f5e0-fb95-47b0-9975-6c7e7b1599b6/download)</sup> |

## 工作原理

标准的p-中值位置分配模型通过将全部需求分配给其最近的已选址设施，使服务所有需求的总加权距离最小。选址部分使用二元变量 \( y_{j} \)，若候选点 \( j \) 被选中则等于1；分配部分使用二元变量 \( x_{ij} \)，若需求节点 \( i \) 被分配给设施 \( j \) 则等于1。<sup>[3](https://gistbok-ltb.ucgis.org/current/concept/AM-05-046)</sup><sup> • </sup><sup>[5](https://web.stanford.edu/class/msande312/restricted/klos04facility.pdf)</sup> 目标函数最小化所有需求节点到其最近设施的加权距离之和。三组约束条件构成完整模型：每个需求节点恰好分配给一个设施；只允许分配给已设设施的节点；恰好选择 \( p \) 个站点。<sup>[3](https://gistbok-ltb.ucgis.org/current/concept/AM-05-046)</sup>

一个经典结果证明了将搜索限制在离散候选站点上的合理性：对于凹距离函数，将潜在站点集合限制为网络节点即可。<sup>[5](https://web.stanford.edu/class/msande312/restricted/klos04facility.pdf)</sup> 该模型是一个整数线性规划（ILP）问题，可用通用软件求解，包括IBM CPLEX、Gurobi、FICO Xpress等商业产品以及GLPK、COIN-OR等免费软件包。<sup>[3](https://gistbok-ltb.ucgis.org/current/concept/AM-05-046)</sup>

## 实施方法

一项实际研究按四个阶段进行。首先，在GIS中准备需求点和候选设施，并附上沿网络的出行距离或时间。其次，将问题导出并用AMPL或Mosel等建模语言编写。第三，使用Cplex、Gurobi、Xpress或开源求解器求解模型；此类基于GIS的工作流通常以这种松散耦合的方式进行。<sup>[3](https://gistbok-ltb.ucgis.org/current/concept/AM-05-046)</sup> 第四，将所选站点和分配方案作为GIS图层映射回来。Esri的Location-Allocation求解器将这些步骤打包：它接收候选设施和需求点，找出最有效地供应需求点的设施。<sup>[1](https://desktop.arcgis.com/en/arcmap/latest/tools/network-analyst-toolbox/solve-location-allocation.htm)</sup>

算法选择取决于规模。对所有 \( p \) 站点组合进行完全搜索是组合爆炸性的，即使对小问题也可能需要数年甚至数十年。<sup>[3](https://gistbok-ltb.ucgis.org/current/concept/AM-05-046)</sup> 经典的补救方法是顶点替换启发式算法，每当交换能降低总加权距离时，就将一个候选站点与一个已选站点交换；其最终解是1-最优的，即没有任何单次一对一交换能改进目标函数，实际应用中通常从不同初始解重启数百或数千次。<sup>[3](https://gistbok-ltb.ucgis.org/current/concept/AM-05-046)</sup> 自20世纪70年代以来，模拟退火、遗传算法、变邻域搜索、GRASP和[禁忌搜索](https://www.edgepedia.org/zh/tabu-search)等元启发式算法已被应用。<sup>[3](https://gistbok-ltb.ucgis.org/current/concept/AM-05-046)</sup> Esri的实现结合了这些思想：GRASP生成初始解，顶点替换对其进行改进，路径重连搜索存储在“精英池”中的解的组合。<sup>[3](https://gistbok-ltb.ucgis.org/current/concept/AM-05-046)</sup> 对于覆盖类变体，[拉格朗日松弛](https://www.edgepedia.org/zh/lagrangian-relaxation)被报告为最有效的求解手段，尽管问题是NP难的，通常能在几秒或几分钟内将包含数百个需求节点和候选站点的实例求解至最优。<sup>[6](https://daskin.engin.umich.edu/wp-content/uploads/sites/133/2014/07/daskinchapterfinaltrackchangesoffwithfullcitation.pdf)</sup>

## 起源

位置分配问题及其启发式算法可追溯至[莱昂·库珀](https://www.edgepedia.org/zh/leon-n-cooper)（Leon Cooper）1963年发表于《Operations Research》的论文《位置分配问题》。<sup>[7](https://doi.org/10.1287/opre.11.3.331)</sup> 该论文提出了若干类位置分配问题，给出了精确极值方程和一种启发式求解方法，同时指出需要缩短总计算时间的方法。<sup>[7](https://doi.org/10.1287/opre.11.3.331)</sup> 一篇SIAM综述文章将该论文视为位置分配问题及启发式算法的起源。<sup>[8](https://epubs.siam.org/doi/10.1137/1006005)</sup> 已发表的文献对p-中值形式本身的起点说法不一：<sup>[3](https://gistbok-ltb.ucgis.org/current/concept/AM-05-046)</sup>，而SIAM综述则将位置分配问题及启发式算法追溯至库珀1963年的论文。<sup>[8](https://epubs.siam.org/doi/10.1137/1006005)</sup>

## 变体

选址模型分为四大类：中值、覆盖、带容量约束和竞争。<sup>[4](https://repositori.upf.edu/bitstreams/2207f5e0-fb95-47b0-9975-6c7e7b1599b6/download)</sup> 中值模型最小化客户与最近设施之间的平均成本或时间。覆盖模型则要求客户与设施之间的距离不超过某一临界值；它沿两个主要方向发展：位置集合覆盖和最大覆盖。<sup>[4](https://repositori.upf.edu/bitstreams/2207f5e0-fb95-47b0-9975-6c7e7b1599b6/download)</sup> 位置集合覆盖模型、最大覆盖选址模型和p-中心模型都将服务视为二元的——需求节点要么被覆盖要么不被覆盖；p-中值最小化需求加权总距离或平均距离；p-中心最小化任一需求点到其最近设施的最大距离，而非将服务视为覆盖。<sup>[6](https://daskin.engin.umich.edu/wp-content/uploads/sites/133/2014/07/daskinchapterfinaltrackchangesoffwithfullcitation.pdf)</sup> p-中心模型寻找 \( p \) 个设施的位置，在覆盖所有需求的约束下最小化覆盖距离，解决覆盖所有需求将需要过多设施的情形。<sup>[6](https://daskin.engin.umich.edu/wp-content/uploads/sites/133/2014/07/daskinchapterfinaltrackchangesoffwithfullcitation.pdf)</sup>

**容量与固定成本**以两种方式修改基本模型。带容量约束的p-中值问题在设施站点上添加上限容量 \( c_{j} \)，替换分配约束以使一个设施服务的需求不超过其容量，并用允许部分分配的不等式替换整数性方程。<sup>[9](https://doi.org/10.1111/tgis.12997)</sup> 无容量设施选址问题（UFLP），也称简单工厂选址问题或仓库选址问题，去掉了固定数量 \( p \)，转而最小化由设施建设成本加运输成本构成的总成本，使用二元变量表示开设设施和分配客户，每个客户恰好被服务一次且仅分配给已开设的设施。<sup>[10](https://www.mdpi.com/2227-7390/13/13/2138)</sup> 商业GIS工具直接提供其中若干变体：Esri的求解器提供MINIMIZE_IMPEDANCE（即p-中值问题）和MAXIMIZE_COVERAGE（在指定阻抗截断值内求解消防站选址问题）。<sup>[11](https://desktop.arcgis.com/en/arcmap/latest/tools/network-analyst-toolbox/make-location-allocation-layer.htm)</sup>

## 应用

设施选址模型广泛应用于电信、物流、交通和医疗保健领域，数据被视为确定性的、鲁棒性的或不确定性的。<sup>[12](https://www.sciencedirect.com/science/article/abs/pii/S0305048321000025)</sup> 在基于GIS的服务区规划中，指定阻抗截断值内的覆盖选项用于消防站选址。<sup>[11](https://desktop.arcgis.com/en/arcmap/latest/tools/network-analyst-toolbox/make-location-allocation-layer.htm)</sup> 该类问题还广泛应用于医疗机构和电动汽车充电站等众多设施的选址。<sup>[13](https://link.springer.com/article/10.1007/s10479-026-07110-3)</sup>

## 局限与替代方案

**需求聚合**是文献记载最充分的失效模式。位置分配问题的解容易出错，因为在需求聚合过程中损失了位置信息，而任何消除或减少这种不确定性的方法都必须针对具体解，因而在实践中不可行——对中值类和中心类问题均是如此。<sup>[14](https://onlinelibrary.wiley.com/doi/10.1111/j.1538-4632.1979.tb00692.x)</sup> 确定具有最小误差的聚合方案本身就是一个NP难问题，尽管常用若干聚合误差度量，但对于哪种最佳尚无共识。<sup>[15](https://doi.org/10.2298/yjor140909001i)</sup>

**算法差距**也很重要。p-中值问题是NP难的，而GIS位置分配功能几乎完全依赖启发式算法，即使在最先进的商业优化软件包可以轻松超越启发式算法的情况下也是如此。<sup>[3](https://gistbok-ltb.ucgis.org/current/concept/AM-05-046)</sup> 同样，尽管通过“距离编辑”可以将一种覆盖模型作为等价的p-中值问题求解，但很少有（如果有的话）测试分析过在使用启发式算法时这是否是一种好方法。<sup>[3](https://gistbok-ltb.ucgis.org/current/concept/AM-05-046)</sup>

**邻近方法**服务于不同目的。平面上的连续选址模型允许设施位于任何位置，并用曼哈顿距离或[欧几里得距离](https://www.edgepedia.org/zh/euclidean-distance)等度量来衡量距离；韦伯问题确定单个设施的坐标，使到需求点的加权距离之和最小，其 \( p \) 个设施的网络对应版本即为p-中值问题。<sup>[5](https://web.stanford.edu/class/msande312/restricted/klos04facility.pdf)</sup>

## References

1. [Solve Location-Allocation (Network Analyst), ArcMap Documentation](https://desktop.arcgis.com/en/arcmap/latest/tools/network-analyst-toolbox/solve-location-allocation.htm)
2. [A.9 – Location-Allocation Models | The Geography of Transport Systems](https://transportgeography.org/contents/methods/location-allocation-models/)
3. [UCGIS GIS&T Body of Knowledge [AM-05-046] Location-allocation modeling](https://gistbok-ltb.ucgis.org/current/concept/AM-05-046)
4. [Location modelling and GIS (book chapter, University of Pompeu Fabra repository)](https://repositori.upf.edu/bitstreams/2207f5e0-fb95-47b0-9975-6c7e7b1599b6/download)
5. [Klose & Drexl, Facility location models for distribution system design (EJOR 2004, doi:10.1016/j.ejor.2003.10.031)](https://web.stanford.edu/class/msande312/restricted/klos04facility.pdf)
6. [Location of Health Care Facilities (Daskin, book chapter)](https://daskin.engin.umich.edu/wp-content/uploads/sites/133/2014/07/daskinchapterfinaltrackchangesoffwithfullcitation.pdf)
7. [Leon Cooper (1963). Location-Allocation Problems. Operations Research.](https://doi.org/10.1287/opre.11.3.331)
8. [Heuristic Methods for Location-Allocation Problems (SIAM review article)](https://epubs.siam.org/doi/10.1137/1006005)
9. [Solving location-allocation problems with professional optimization software](https://doi.org/10.1111/tgis.12997)
10. [Network- and Demand-Driven Initialization Strategy for Enhanced Heuristic in Uncapacitated Facility Location Problem (Mathematics, MDPI, 2025)](https://www.mdpi.com/2227-7390/13/13/2138)
11. [Make Location-Allocation Layer (Network Analyst), ArcMap Documentation](https://desktop.arcgis.com/en/arcmap/latest/tools/network-analyst-toolbox/make-location-allocation-layer.htm)
12. [Humanitarian facility location under uncertainty: Critical review and future prospects (EJOR)](https://www.sciencedirect.com/science/article/abs/pii/S0305048321000025)
13. [Insights into the computational complexity of the single-source capacitated facility location problem with customer preferences (Annals of Operations Research, 2026)](https://link.springer.com/article/10.1007/s10479-026-07110-3)
14. [The Aggregation Problem in Location-Allocation (Geographical Analysis, 1979)](https://onlinelibrary.wiley.com/doi/10.1111/j.1538-4632.1979.tb00692.x)
15. [Aggregation and non aggregation techniques for large facility location problems: A survey](https://doi.org/10.2298/yjor140909001i)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026*

Topic: 技术与人造世界 › 工程与制造 › 制造系统与工业工程

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/location-allocation-model

English original: https://www.edgepedia.org/location-allocation-model
