Understand the Insufficient travel time rule

Overview

The Insufficient travel time rule is one of the core rules that the Rules service can use to evaluate whether schedules are valid. Insufficient travel time rule violations (conflicts) are raised if work items are scheduled such that the allocated resource or resources would not have enough time to travel from their location at the start of their availability to their first work item and between the consecutive work items that follow.

The Rules service calculates the travel time for a work item by analysing the item that precedes it in time; this could be another work item’s location or the resource’s home address.

To evaluate the Insufficient travel time rule between two work items (e.g., A and B), the Rules service performs the following:

  1. Passes the geolocations of items A and B from to a map provider to establish the travel time.
  2. Extends the start time of work item B into the past by the value of the travel time.
  3. Checks if A and B overlap and if they do, then it raises a violation (which can be viewed in the Rule conflicts console).

To evaluate the Insufficient travel time rule for the first work item in a resource’s period of availability, the Rules service performs the following:

  1. Passes the geolocations of the resources home address and the address of the work item to a map provider to establish the travel time.
  2. Extends the start time of job B into the past by the value of the travel time.
  3. Checks if the travel time for the work record overlaps with the resource’s unavailability, and if they do, then it raises a violation (which can be viewed in the Rule conflicts console).

Terminology

Work item A job or activity.
Work item location The co-ordinates (latitude and longitude) from the work item’s Geolocation field.
Resource availability The availability of a resource per availability patterns/templates, or ad-hoc availability.
Resource home address The co-ordinates (latitude and longitude) from the Geolocation field on the resource’s location.
Travel time The time taken to travel between two locations, which assumes driving a car as the mode of transport and does not take the effect of real-time traffic changes into account.

Handling of resource availability

If a resource has a home address set, then the rule takes the resource’s availability into account when evaluating travel time violations.

Resources are assumed to be at their home address during periods of unavailability, so if a period of unavailability is followed by a job allocation, there must be enough time to travel from home to the location of the work item, otherwise an Insufficient travel time violation is raised.

Sufficient travel time from home is evaluated for a resource to reach the first work item following a period of unavailability; however, travel from the last work item to home before a period of unavilability is not evaluated.

Availability is only processed in this way if the resource’s home address is set. If a resource’s home address is not set, travel time violations are evaluated as if the resource was always available.

Recalculation is performed when:

  • The resource’s availability changes (recalculation happens from start of the current day until the extend of the resource’s availability changes).

  • The resource’s home address changes (or gets cleared, or gets set to something). In this case we re-evaluate travel time for all work items from the start of the current day.

Interaction of the Insufficient travel time rule with other scheduling rules

There are 13 core scheduling rules in Skedulo, which can be used to identify and manage common scheduling errors.

A work item can be in violation of a number of scheduling rules simultaneously, however, caution should be applied when there are Work overlap rule violations associated with work items. Since it isn’t meaningful to know that there is not enough travel time between jobs that are overlapping, overlapping work item violations need to be resolved before the Insufficient travel time rule can be properly evaluated. Insufficient travel time rule violations can only be relied upon after co-occurring Work overlap rule violations have been resolved.

What if the location of a work item is not set?

When the geoco-ordinates of a work item are not set, they are inherited from the closest preceding work item on the resource’s timeline, or, if no other work item exists before it in the period availability, then it will inherit the geolocation from the resource’s home address. If the preceding work item has no geoco-ordinates set either, the one before that is tried recursively until an item (work item or home address) with geoco-ordinates is found within a limit of the preceding 24 hours. The inherited location is only used for evaluating the rule and is not set as the location for any work item as a result of this mechanism.

Note that work items with an inactive status are excluded from the location inheritance process.

The outcome of this inheritance mechanism is always dependent on the surrounding work items that do have the location set, making this inheritance mechanism a dynamic process that responds to data changes.

When will the rule and inherited locations be re-evaluated?

The rule will re-evaluate the travel time if there is a change in a work item’s location. This could happen when:

  • A new work item is added to a schedule.
  • A new work item is added, which changes the location of work items in other areas of the schedule because of location inheritance.
  • A work item is deleted from a chain of items where location inheritance is in play.

Maximum travel time limits

The Insufficient travel time rule allows for the configuration of a maximum travel time limit to apply globally to all work items that are scheduled. If set, a violation will be raised when either of the following scenarios occur:

  • The travel time between work items exceeds the time available.
  • The travel time exceeds the max travel time configured, even if there is sufficient time between work items to complete the trip.

Limitations

Violations resulting from disparate map services

The Insufficient travel time rule is designed to not raise violations for valid schedules created by the Optimize feature. This can only be guaranteed, however, if Optimize and the Rules service use the same map provider, which is not currently the case.

Consequently, optimized schedules may have travel time violations raised when there are data discrepancies between the different map service providers.

Violations arising from manually overriding optimized schedules

It is possible to “lock” work items when using the Optimize feature to enhance scheduling efficiency. For example, you can lock the start time of a job so that it falls outside of a resource’s normal working hours. Such manual overrides can result in rule violations being raised.