pgRouting / vrprouting

Vehicle Routing Problems on the Database
GNU General Public License v2.0
21 stars 6 forks source link

VROOM Category Functions - extend the result columns to provide more information #27

Closed krashish8 closed 2 years ago

krashish8 commented 2 years ago

I think it is a good idea to add the data jsonb field in vrpRouting itself in the jobs, shipments (p_data, d_data), vehicles, breaks corresponding to the VROOM's description field, where one can store any metadata information. Then, we can add the vehicle_data and step_data fields in the result columns.

Also, the current travel_time field denotes the cumulated travel time upon arrival at the step. Will it be a good idea to add a field denoting only the travel time between the last step and the current step?

Other fields like delivery, pickup can also be added in the output that can help one understand the amount of good picked up or delivered at a step.

Obviously, one can get the data, delivery, or pickup in the output using Table JOIN, but joins will be a bit costly, considering this would require a join with 4 tables: jobs, shipments, vehicles, and breaks. Adding the fields in the output directly from the C++ code doesn't have any extra cost, and the user is always at liberty to decide which columns to select in the output, so I feel it is good to extend the result columns to provide more information.

krashish8 commented 2 years ago

This would also save us from the additional cost of doing table joins to get the data field when we use templates in the ICal files.

dkastl commented 2 years ago

Good idea.