public class FindLocationService
extends java.lang.Object
选址分区分析服务类。
选址分区分析是为了确定一个或多个待建设施的最佳或最优位置,使得设施可以用一种最经济有效的方式为需求方提供服务或者商品。选址分区不仅仅是一个选址过程,还要将需求点的需求分配到相应的新建设施的服务区中,因此称之为选址与分区。 在分析过程中使用的需求点都为网络结点,即除了各种类型的中心点所对应的网络结点, 所有网络结点都作为资源需求点参与选址分区分析,如果要排除某部分结点,可以将其设置为障碍点。 例子:如下图所示,某个区域还没有邮局,现在想在这个区域内建立邮局,有15个待选地点(如左图所示,蓝色方框代表 15个候选地点),将在这些待选点中选择7个最佳地点建立邮局。最佳选址要满足,居民点中的居民步行去邮局办理业务的 步行时间要在30分钟以内,同时每个邮局能够服务的居民总人数有限,在同时满足这两个条件的基础上,选址分区分析会 给出以个最佳的选址位置,并且圈出每个邮局的服务区域(如右图所示,红色点表示最后选出的7个建立邮局的最佳位置)。备注:下面两幅中的网络数据集的所有网络结点被看做是该区域的居民点全部参与选址分区分析,居民点中的居民数目即为该居民点所需服务的数量。
该类负责将选址分区分析所需的参数传递至服务端,并获取服务端返回的结果,将其存储于 FindLocationResult 类中。
限定符和类型 | 类和说明 |
---|---|
static class |
FindLocationService.FindLocationEventListener
处理选址分区分析结果的监听器抽象类。
|
构造器和说明 |
---|
FindLocationService(java.lang.String url)
构造函数。
|
限定符和类型 | 方法和说明 |
---|---|
FindLocationResult |
getlastResult()
获取选址分区分析结果数据。
|
<T> void |
process(FindLocationParameters parameters, FindLocationService.FindLocationEventListener listener)
根据选址分区分析服务地址与服务端完成异步通讯,即发送分析参数,并通过实现FindLocationEventListener监听器处理查询结果。
|
public FindLocationService(java.lang.String url)
构造函数。
url
- 选址分区分析服务地址public FindLocationResult getlastResult()
获取选址分区分析结果数据。
public <T> void process(FindLocationParameters parameters, FindLocationService.FindLocationEventListener listener)
根据选址分区分析服务地址与服务端完成异步通讯,即发送分析参数,并通过实现FindLocationEventListener监听器处理查询结果。
parameters
- 选址分区分析参数信息。listener
- 处理查询结果的FindLocationEventListener监听器。