Dim i As Integer
For i = 1 To nNode
If (flagMatrix(tempstartno, i) = True And yjdb(i) = False) Then
If distvector(i) > distvector (temp
startno) +distmatrix(tempstartno, i) Then
distvector(i) = distvector(temp
startno) + distmatrix(tempstartno, i)
End If
End If
Next i
End Function
Public Function plotroutin()
'进行逆推,画出最短路径
Dim szdcount As Integer
Dim tem1 As Boolean, tem2 As Boolean, bj1 As Integer, bj2 As Integer
szdcount = 1
ReDim Preserve szdno(szdcount) As Integer
szdno(1) = EndNo
Do While (tempendno <> StartNo)
'从终点逆推到起点时结束
For i = 1 To nNode
If flagMatrix(tempendno, i) = True Then
If (distvector(tempendno) - distvector(i) = distmatrix(tempendno, i) Or
Abs(distvector(tempendno) - distvector(i) –
distmatrix(tempendno, i)) < 0.001) Then
szdcount = szdcount + 1
ReDim Preserve szdno(szdcount) As Integer
szdno(szdcount) = i
oldtempendno = tempendno
tempendno = i
End If
End If
Next i
Loop
Dim ftr As MapXLib.Feature
For i = 1 To szdcount
For Each ftr In
|