Routing Logic - green-ecolution/backend GitHub Wiki
Green Ecolution provides a service for managing watering planning. Users can create irrigation schedules and select tree groups that need watering. Based on these selections, the system calculates an optimized route, including necessary refill points, to ensure an efficient irrigation process.
Overview
Vroom is used to optimize irrigation points that need to be visited and to implement a refill logic. Essentially, Vroom is responsible for optimizing the irrigation schedule.
To generate the actual route, OpenRouteService or Valhalla are utilized. These services compute the route, which is then formatted as GeoJSON for display in the frontend. Additionally, a GPX file is generated and uploaded to an S3 bucket. This GPX file can be accessed by an external app to enable navigation along the planned route.
Flow
The process begins with Green Ecolution. Here a users can select specific tree clusters that need irrigation. Once the selection is made, Vroom optimizes the sequence of irrigation points, ensuring the most efficient route while incorporating a refill logic. This optimization minimizes travel distance and time, making the process more effective.
Once the optimal waypoints are determined, Valhalla takes over to generate the actual route. It processes the optimized stops and converts them into a navigable path. This route is then exported as a GPX file, a widely used format for GPS track data. The file is uploaded to an S3 bucket or another storage solution, making it easily accessible.
Finally, the GPX (GPS Exchange Format) file can be retrieved by an external device, such as a smartphone or GPS navigation system. This allows users to follow the optimized route seamlessly, ensuring efficient and precise execution of irrigation tasks. By integrating route optimization and navigation, this process streamlines operations while promoting sustainability. GPX is an XML-based file format used for storing and exchanging GPS data. A GPX file contains geographic information such as waypoints, routes, and tracks, which can be used by GPS devices or mapping services like OsmAnd.