Compute travelling time using Bing
This Action also works when accessing the web through a PROXY server: Please consult the section 22.214.171.124. for more details on how to setup the parameter P5 for web-access through a PROXY server.
To use this Action, you’ll first need to get a “BingMaps Key” from the Bing Maps website (parameter P3). Please see the previous section 126.96.36.199 for more details on how to get this key.
Once you have completed the “setup process” described in the section 188.8.131.52, you can use this action. This action computes the travelling time between one source location (Parameter P1) and, possibility, several destination locations (Parameter P2). So, for each row of the input table, we have:
•one source location and several destination locations (maximum number of destinations is around 200)
•one API-call to the BING computation engine
For each (source, destination) pair you get as output a table with these 4 columns:
originIndex, destinationIndex, travelDistance, travelDuration
The parameter P1 is the coordinates of the source: it’s 2 columns: The first column is the latitude and the second column is the longitude (in decimal degree) of the source location.
The parameter P2 contains the coordinates of all the D destinations: It’s 2xD columns: The two first columns are the latitude & longitude of the 1st destination (in decimal degree, in this order). The 2 following columns are the latitude & longitude of the 2nd destination. The 2 following columns are the latitude & longitude of the 3rd destination. Etc.
Let’s assume that you want to compute the minimum “Travel Duration” between the home address of your customers and all your shops. Let’s assume that you have C customers and S shops. The BING invoice is directly proportional to C x S, so it might be a good idea to reduce to the minimum this product. One good idea to reduce this product to a minimum is to use the KNN action (from section 5.15.2.). Basically, the idea is to use the KNN action to find the 2 closest shops to each of your customer “as the crow flies” and then, only sent to BING these 2 shops. In this way, you only have 2 x C routes to compute (instead of C x S routes to compute), the computing-time is reduced, and you get a smaller invoice. Uses these parameters for the KNN action: