Sort Workers Based on Travel Time

 

By default, CFSWorX's worker lookup activity sorts workers by distance and time. As a new option in 10.97, the worker lookup activity can sort workers based on travel time and physical distance in Azure Maps in addition to Bing Maps support. It can optionally take traffic data into account.

 

To Enable Travel Time Sorting:

  1. Follow these instructions to get a Bing Maps key: https://github.com/Microsoft/BingMapsRESTToolkit/blob/master/Docs/Getting%20Started.md#CreatingABingMapsKey

Follow these instructions to get an Azure Maps account: https://docs.microsoft.com/en-us/azure/azure-maps/quick-demo-map-app

 

NOTE: Create either a Bing maps or an Azure maps account. If you have keys for both Bing maps and Azure maps, Bing maps will be used for distance and time calculation.

  1. Log into Windows as the user configured as the identity of the ICONICS Connected Field Services services. This is very important, as we will be adding a user environment variable, and if it is added under the wrong user then travel time sorting will not function.

  2. Open Windows Settings.

  3. Search for Environment Variables.

  4. Select Edit environment Variables for your account.

  5. Add a new user variable.

  6. For Variable name, enter Ico_Cfs_BingMapsKey if you plan to use Bing Maps.

Enter Variable name as Ico_Cfs_AzureMapsKey if you plan to use Azure Maps.

  1. For Variable value, enter the Bing Maps or Azure Maps key you obtained earlier.

  2. Select OK twice.

  3. If desired, you may log into Windows as a different user at this time.

  4. Restart the ICONICS Connected Field Services Point Manager service if it was running. When it restarts, worker lookup activities will automatically sort based on travel time.

    1. Note, if the CFSWorX Workers Point Manager is not configured to run out-of-process, restart the ICONICS FrameWorX service instead. This is not a common configuration.

  5. Open Workbench and create or edit your Connected Field Services template.

  6. Select your worker lookup activity.

  7. In the Worker Lookup section, check Apply Location Restrictions and ensure the Location Data expression is properly filled with location data.

  8. Set Distance Measurement Type to Time.

  9. If desired, check Apply Traffic Calculation. This will apply traffic data to the travel time calculations.

  10. Apply the changes.

To discontinue using Bing Maps travel time, delete the Ico_Cfs_BingMapsKey environment variable and restart the ICONICS Connected Field Services Point Manager service, or simply change the Distance Measurement Type to Distance or Radius in the worker lookup activity.

 

To discontinue using Azure Maps travel time, delete the Ico_Cfs_AzureMapsKey environment variable and restart the ICONICS Connected Field Services Point Manager service, or simply change the Distance Measurement Type to Distance or Radius in the worker lookup activity.

 

See Also:

Worker Lookup

Templates

Workers