-> Depot Reload / Multi Tours

Allow vehicles to do more than one tour

Description:

In certain use cases, it is necessary to allow vehicles to do more than one tour a day and to perform a reload between the tours.

Our software supports a loading (for deliveries) and an unloading (for pickups) time at the depot in the morning before the first tour, between tours during the day and after the last tour. The loading and unloading time can be defined globally (valid for all vehicles) in the query parameter or individually at a vehicle level.

In general, it can be differentiated between three use cases.

  1. A driver loads the vehicle by himself in the morning and unloads the vehicle by himself after the last tour.
  2. A driver does not load the vehicle by himself in the morning and does not unload the vehicle by himself after the last tour.
  3. Both use cases can be combined as well:
    1. A driver loads the vehicle by himself in the morning but does not unload the vehicle by himself after the last tour.
    2. A driver does not load the vehicle by himself in the morning but unloads the vehicle by himself after the last tour.

Note that the duration of the loading and unloading time will have an impact on the drivers working hours and the departure and return time of the vehicle based on the use case and how it is configured. The driver's working hours can be defined in the parameter max_tour_duration for each vehicle or vehicle type. The departure and return times can be defined by the parameters departure_time_from, departure_time_to and return_time_to.

The loading and unloading times between tours will always be considered as the driver's working hours.

How to implement:

All parameters can be found in the API Reference: calcrouteoptimizedtimewindow

  1. Define the global settings in the query parameter:
    1. To activate this feature set the parameter depot_reload= true.
      If nothing is set the feature is not active, due to the default is set to false.
    2. Set initial_loading_is_working_time= true, if the loading time shall be considered as the drivers working hours or
    3. Set initial_loading_is_working_time= false, if the loading time shall NOT be considered as the drivers working hours.
    4. Set final_unloading_is_working_time= true, if the unloading time shall be considered as the drivers working hours or
    5. Set final_unloading_is_working_time = false, if the unloading time shall NOT be considered as the drivers working hours.
    6. Set depot_loading_time= <seconds>, for the duration of the loading.
    7. Set depot_unloading_time= <seconds>, for the duration of the unloading.
  2. On a vehicle level the loading and unloading times can be defined individually as fixed + variable els seconds per load in the depot_els_config object:
    1. Set loading_els_config-> fixed_els_seconds = <seconds>, for the fixed loading time.
    2. Set loading_els_config-> variable_els_seconds_per_load = <seconds>, for the variable loading time per load.
    3. Set unloading_els_config-> fixed_els_seconds = <seconds>, for the fixed unloading time.
    4. Set unloading_els_config-> variable_els_seconds_per_load = <seconds>, for the variable unloading time per load.

The load defines the actual used amount of the capacity.

The total loading time is then calculated:
total loading time = fixed_els_seconds + (variable_els_seconds_per_load* load)

The same logic is applied for calculating the unload time.

An example can look like:

{
  "query_parameters": {
    "depot_reload": true,
    "initial_loading_is_working_time": true,
    "final_unloading_is_working_time": true,
    "depot_loading_time": 1800,
    "depot_unloading_time": 600
  },
  " body": {
    	"deliverydata": [...],
    	"vehicles": [
      {
        "name": "Vehicle_1",
        "depot_els_config": {
          "loading_els_config": {
            "variable_els_seconds_per_load": [
              0,
              120,
              0
            ],
            "fixed_els_seconds": 1200
          },
          "unloading_els_config": {
            "variable_els_seconds_per_load": [
              0,
              120,
              0
            ],
            "fixed_els_seconds": 900
          }
        }
      }
    ]
  }
}

*In this example the depot_els_configwill overwrite the depot_loading_timeand depot_unloading_timefrom the query parameter.