- Se quitaron unos logs para que sea mas rapido el ruteo.

This commit is contained in:
2024-05-02 15:47:44 -06:00
parent d18a1d7fbd
commit 769eeec5b4
2 changed files with 11 additions and 9 deletions

View File

@@ -495,11 +495,13 @@ Sub ruteoNearestInsertion(ruta As String, matriz As String) 'ignore
If final = "" Then 'Si no esta especificado un destino final, se toman las coordenadas del punto mas cercano al punto de inicio.
Private a As ResultSet = db.ExecQuery($"Select idt, ${punteoLista.Get(0)} as laCol, nombre, lat, lon from ${ruta}_matriz${matriz} join ${ruta}_puntos on idT = id where idT <> '${punteoLista.Get(0)}' order by ${punteoLista.Get(0)} asc limit 1"$)
Log($"Select idt, ${punteoLista.Get(0)} as laCol, nombre, lat, lon from ${ruta}_matriz${matriz} join ${ruta}_puntos on idT = id where idT <> '${punteoLista.Get(0)}' order by ${punteoLista.Get(0)} asc limit 1"$)
Log(a.GetString("idt"))
If punteoLista.IndexOf(a.GetString("idt")) = -1 Then
Log($"Agregamos ${a.GetString("idt")}"$)
punteoLista.Add(a.GetString("idt")) 'Agregamos el punto mas cercano al almacen.
End If
' Log(a.GetString("idt"))
Do While a.NextRow
If punteoLista.IndexOf(a.GetString("idt")) = -1 Then
Log($"Agregamos ${a.GetString("idt")}"$)
punteoLista.Add(a.GetString("idt")) 'Agregamos el punto mas cercano al almacen.
End If
Loop
End If
Private d As ResultSet = db.ExecQuery($"select count(id) as regs from ${ruta}_puntos"$) 'Obtenemos el total de puntos.
@@ -512,7 +514,7 @@ Sub ruteoNearestInsertion(ruta As String, matriz As String) 'ignore
' Log(punteoLista.Size &"|"&d.GetInt("regs"))
Private cuantosPuntos As Int = d.GetInt("regs")
' cuantosPuntos = 21
Log(punteoLista)
' Log(punteoLista)
If punteoLista.Size < cuantosPuntos Then 'Si hay puntos fuera de la ruta ...
For j = 0 To punteoLista.Size - 2
' Log(">>>>>>>>>>>>>>>>>>>>>> ${j} | ${j-2}")
@@ -538,11 +540,11 @@ Sub ruteoNearestInsertion(ruta As String, matriz As String) 'ignore
Next
End If
If elMasCercano <> "" Then
Log($"${elMasCercano}, ${estePar}"$)
' Log($"${elMasCercano}, ${estePar}"$)
punteoLista.InsertAt(punteoLista.IndexOf(elAnterior)+1, elMasCercano)
End If
Next
Log(punteoLista)
' Log(punteoLista)
db.ExecNonQuery($"delete from ${ruta}_punteo"$)
For h = 0 To punteoLista.Size - 1
e = db.ExecQuery($"select * from ${ruta}_puntos where id = '${punteoLista.Get(h)}'"$)

View File

@@ -16,6 +16,6 @@ ModuleClosedNodes2=
ModuleClosedNodes3=
ModuleClosedNodes4=
ModuleClosedNodes5=
NavigationStack=Mapa,generaMatrizRuteoTiempos,85,0,Mapa,tiempos,108,0,rutaCompleta,generaMatrizRuteoTiempos,85,0,rutaCompleta,tiempos,105,0,Main,calculateDistance3,607,0,Ruteador,tiempos,166,0,Ruteador,generaMatrizRuteoTiempos,103,6,Main,ruteo,308,0,Ruteador,Handle,38,0,Main,creaTablas,129,6
NavigationStack=Mapa,tiempos,108,0,rutaCompleta,generaMatrizRuteoTiempos,85,0,rutaCompleta,tiempos,105,0,Main,calculateDistance3,607,0,Ruteador,tiempos,166,0,Ruteador,generaMatrizRuteoTiempos,103,6,Main,ruteo,308,0,Ruteador,Handle,38,0,Main,creaTablas,162,6,Main,generaMatrizLocal,217,0,Main,ruteoNearestInsertion,480,4
SelectedBuild=0
VisibleModules=5,3,4,1,2