mirror of
https://github.com/KeymonSoft/Ruteador-NonUI.git
synced 2026-04-20 22:29:18 +00:00
- Se quitaron unos logs para que sea mas rapido el ruteo.
This commit is contained in:
@@ -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)}'"$)
|
||||
|
||||
Reference in New Issue
Block a user