作者
crp 算法由微软硅谷研究院三名工程师于2013年提出。
设计目标
- 应用于大陆级别的实际路网数据
- 支持任意类型metric(可以理解为cost function)
- 响应时间满足实时查询的需求
- 快速的路况更新以及定制化metric更新
主要思想
实际路网由拓扑结构和metric属性两部分组成。路网拓扑结构由道路的一系列静态属性组成,包括道路长度,转向类型,车道数,道路类型,最大速度等;metric属性代表经过一条道路或转向时的实际cost。我们认为路网拓扑将结构是各个metric通用的并且很少变化,metric 属性可能会经常变化并且可以是用户定制的。
crp 算法包括以下三个阶段:
- metric-independent processing:处理路网拓扑数据,运行较慢,但是运行频率低
- metric customization:处理每个metric的时候都必须运行,要求执行速度快
- query stage:响应时间需满足实时查询
需要注意的是,针对一个指定的metric,crp算法的响应时间不如像ch等具有很好等级特性的算法,crp 算法的优势是在满足实时查询的基础上可以快速应用各种不同metric。
主流路径规划算法
- 以ch为代表的strong hierarchy 算法,依赖于道路等级特性进行数据预处理,响应时间快,对于等级特性差的metric加速效果变差(最短距离比最短时间慢10倍),缺点是不能很好的支持各种metric
- 以A*,ALT为代表目标启发式算法,算法特点是相比ch,可以更好的支持多种metric,算法缺点是响应时间较慢。
- 基于图分割的路径规划算法,把路网处理为多层overlay graph,算法的特点是图分割和响应时间和metric相互独立,适用于crp算法的设计思路。
overlay graph
关于overlay graph 的概念见 图的覆盖
分割图一些说明
- 一个node 属于且仅属于同一层的唯一一个cell
- 每一层cell 中的node数小于设定的参数U(每层不一样)
- 对于一个cell