1. 计算最短路径的时候,经纬度的精度保持在小数点后三位的情况下报错的问题。
2. 计算最短路径的时候,将经纬度拓展到小数点后六位也同样会报错的问题。
如:经纬度为:当前xy:113.226558,25.978002:113.226613,25.978446
的两个点进行计算的时候,遇到如下错误;
java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
java.net.SocketException: Connection reset
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:203)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:179)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132)
at $Proxy6.findPath(Unknown Source)
at com.supermap.server.components.NetworkAnalystServiceSAC.findPath(Unknown Source)
at com.copote.LineRouting.basicObjects.LineRouting_FindPathBySuperMap.findPath(LineRouting_FindPathBySuperMap.java:321)
at com.copote.LineRouting.basicObjects.LineRouting_FindPathBySuperMap.findPath_BetweenTwoSellPointByDate(LineRouting_FindPathBySuperMap.java:101)
at com.copote.LineRouting.basicObjects.LineRouting_FindPathBySuperMap.main(LineRouting_FindPathBySuperMap.java:41)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
at java.io.DataInputStream.readByte(DataInputStream.java:241)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:189)
... 8 more
同时,iServer的控制台报崩溃并重启,iServer崩溃日志摘录如下:
Heap
def new generation total 9152K, used 3123K [0x029e0000, 0x033c0000, 0x078a0000)
eden space 8192K, 31% used [0x029e0000, 0x02c6d950, 0x031e0000)
from space 960K, 52% used [0x031e0000, 0x0325f310, 0x032d0000)
to space 960K, 0% used [0x032d0000, 0x032d0000, 0x033c0000)
tenured generation total 121024K, used 2027K [0x078a0000, 0x0eed0000, 0x429e0000)
the space 121024K, 1% used [0x078a0000, 0x07a9ad78, 0x07a9ae00, 0x0eed0000)
compacting perm gen total 12544K, used 12333K [0x429e0000, 0x43620000, 0x469e0000)
the space 12544K, 98% used [0x429e0000, 0x435eb4d0, 0x435eb600, 0x43620000)
No shared spaces configured.
3. 最短路径计算存在返回值为空的情况,这种问题是在什么情况下发生的?这个时候应该判断两点不可达还是??
4. 在进行旅行商算法的时候,如果当时正在进行旅行商算法,其计算过程无法由用户终止,调用stop或者restart方法都无效,必须等待本次计算完成方可。当重新创建一个INetworkAnalystService对象的时候,也不可以马上进行旅行商计算,无路如何,都必须等待上次旅行商算法结束。
5. 在进行旅行商算法的时候,返回结果可能为空的情况,这种问题是否也是由于最短路径计算返回值为空而导致的?
6. 旅行商算法中无法指定起点和终点的问题。如:
在isEndNodeAssigned=true的情况下,在point2Ds的数组中,将point2Ds数组长度加2,数组的第一位和最后一位加入同一个位置,表示从这个位置出发,最终回到该位置,TSPPathParam中传入的nodeIDs顺序为S0、p1、p2、p3、p4、S1的时候,旅行商算法返回的结果是S1、p2、S0、p1、p3、p4,结果将终点变成了结果线路的起点,而将起点变成了结果线路中的一个中间点。在isEndNodeAssigned=true的情况下,在point2Ds的数组中,将point2Ds数组长度加1,数组的最后一位直接指定终点,表示最终回到该位置,TSPPathParam中传入的nodeIDs顺序为p0、p1、p2、p3、S1的时候,旅行商算法返回的结果是p2、p0、p1、p3、S1,结果是将预计的终点,但是无法指定起点,即不能保证旅行商算法的出发点。目前做法是在该计算结果的基础上,加入起点到计算结果的第一个点之间的最短路径计算结果来拼凑数据,即拼凑出S0、p2、p0、p1、p3、S1的结果,但是这样产生的结果并不是理想的结果,p2并不一定是旅行商算法的最佳结果