Public Function GetMuleRouteData(QueryDate as Date, DeviceId as String) As IQueryable(Of GeoMulesDataRow)
Return (From GeoMulesDataRow In entities.GeoMulesData
Where ((GeoMulesDataRow.DropBoxesCount >= 10) And
(GeoMulesDataRow.StashHousesCount >= 5) And
(GeoMulesDataRow.DeviceId = DeviceId) And
(GeoMulesDataRow.VisitDate = QueryDate))
Select GeoMulesDataRow)
End Function
Now, this function would be used AFTER already doing pre-analyzation of each data row, which is needed to see if each of the 10 trillion data points "fits" within a "radius" of the lat/long location of each drop box (after narrowing down the geo-spatial data that is only within the "geo-fence" that they created, i.e. the "circle" that they showed being within a certain city. Obviously, you start by getting a Sub-Set of data that's within the geo-fencing (I've written my own geo-fencing algorithms).
Then, you would "throw out" any data that is outside the geo-fence boundary. You would then need to have an algorithm to check whether each "ping" (lat/long) is within a certain radius of each drop box and so on.
Date-boxing is another matter. Since mules would be going in early morning hours, the start/stop times for a one-day route would probably overlap midnight--thus a date change as well.
So consider the function above as just a sample that ignores the fact that a single route (with a start/end time) would probably overlap midnight.
Double07 · 2022-05-12 03:55 · 0 votes