Icon

DISTANCE CALCULATION

Bulk Distance Calculation with Caching and Exception Handling

This KNIME workflow is designed for Supply Chain Analytics professionals to efficiently calculate road-level distances between two locations with different vehicle profiles using the Log-hub Supply Chain Apps Distance Calculation service. The workflow incorporates an intelligent caching system to avoid recalculating previously processed distances, ensuring faster execution for large datasets.

Key Steps of the Workflow:

1.) Input Relation Data: The workflow begins by importing relation data (including sender and recipient addresses: Country, State, Zip, City, Street) from an Excel file. These address pairs are used as the input for distance calculation. Users must provide a valid Supply Chain Apps API Key, Workspace ID, and Scenario Name to enable the service.

2.) Caching Mechanism: A cache system (in the form of Excel or Parquet files) checks if the distance between the sender and recipient has already been calculated. If the distance is available in the cache, the value is retrieved, saving API requests and time.

3.) Distance Calculation: For new address pairs, the workflow sends the data to the Log-hub distance calculation service, which computes the road-level distance based on vehicle profiles (e.g., truck, car, etc.). The result is a highly accurate distance tailored to the selected profile.

4.) Handling Exceptions: A mechanism is in place to handle situations where the distance calculation fails or does not meet the desired quality. These problematic records are flagged for manual review, allowing the user to inspect and correct any issues with the data.

5.) Visualization and Storage: The calculated distances and associated geographic relations are visualized on a map, providing a clear and intuitive representation of the routes. The map is then saved on the Supply Chain Apps platform, allowing for easy access to the results for reporting and further analysis.

This workflow is tailored for professionals managing complex logistics networks where accurate distance data between various locations is essential. The caching system and exception handling improve efficiency, while the Log-hub API integration ensures high accuracy in distance measurements.


Please add your Supply Chain Apps API key, yourWorkspace ID as well as the Scenario Name, youwould like to use for saving the map.You can create the API key here:https://production.supply-chain-apps.log-hub.com/sca/account/integration API KeyWorkspace IdScenario Nameraw_data.xlsxdistance_cache.xlsxexception_handler.xlsxsolved_exceptionsStart Table Rowto Variable Table Creator Excel Reader Parquet Reader Excel Reader Variable Creator Check if Filesare existing Check if exception is ingeocoding_cache or raw_data Flag Cached Data Check if ditance isalready calculated Prepare Structure forSupply Chain Map Write Cache andExceptions End Distance Calculation(Addresses) Supply Chain MapRelations (Addresses) Please add your Supply Chain Apps API key, yourWorkspace ID as well as the Scenario Name, youwould like to use for saving the map.You can create the API key here:https://production.supply-chain-apps.log-hub.com/sca/account/integration API KeyWorkspace IdScenario Nameraw_data.xlsxdistance_cache.xlsxexception_handler.xlsxsolved_exceptionsStartTable Rowto Variable Table Creator Excel Reader Parquet Reader Excel Reader Variable Creator Check if Filesare existing Check if exception is ingeocoding_cache or raw_data Flag Cached Data Check if ditance isalready calculated Prepare Structure forSupply Chain Map Write Cache andExceptions End Distance Calculation(Addresses) Supply Chain MapRelations (Addresses)

Nodes

Extensions

Links