CDX Technologies

Discussions related to CDX Technology products and services

Route Optimization in Excel using Bing Maps

CDXZipStream, our Microsoft Excel add-in for location-based data, now offers a route optimization function that uses mapping data from Bing Maps. Up to 25 destinations (waypoints) can be optimized, resulting in the most efficient order of destinations; you have the option to choose the route based on either the shortest distance or quickest time of travel, with or without traffic taken into account.


When Microsoft decided to discontinue its desktop software MapPoint in favor of the web-based Bing Maps, they unfortunately did not include route optimization capability as a built-in function. As a result, we decided to build that functionality into CDXZipStream using ant colony optimization algorithms. These are modeled on how ants in nature search out and find optimal paths to food sources, and can be applied to solving vehicle routing problems. The end result is that basic mapping and routing data are provided by Bing, but the computational algorithms for finding the optimal route reside in CDXZipStream. This results in a fast and efficient routing analysis.


CDXZIPStream route optimization output calculates travel time, distance, provides the optimized list of waypoints, directions, and can provide a route map as well. And it’s easy to use from within your Excel worksheet. To get started, right–click on an empty worksheet cell, and under the “CDXZipStream Functions” menu, select “Insert CDXRouteBing function”. You’ll see the following dialog:

The address range in the first text box represents the range of cells that contain the list of destinations to be optimized. These should be in a single line format (all in one worksheet cell) such as “123 Main Street, Springfield, USA 55555”, or can also be in latitude|longitude format, such as “39.994245|-75.082304”. Also select the route option (quickest, shortest, quickest with traffic), the desired route calculation output, and travel type.


Now click on the “Bing Maps Settings” button above to ensure route optimization is enabled, by checking the box “Optimize Routes (3 or more stops)”:

Here you also select avoidance options (such as highways and tolls), the output and route map style, whether the waypoints are validated (found in Bing Maps) before routing, and whether a map and waypoint list is included in any trip summary output. If an end point for the route is fixed, the optimized route will both begin and end with the same locations provided in the original list. If the endpoint is not fixed, optimization will select an endpoint that generally facilitates return to the beginning of the route. Once all the desired options have been selected, click “OK” to get back to the original dialog. All of these settings will be saved for future use.


When you are returned to the original dialog, click “OK” once more to start the optimization process. Once completed, the requested route calculation data will be returned to the worksheet. Here is an example of an optimized trip summary:

Using the Bing Maps route optimization feature requires a Bing Maps license key that is entered into CDXZipStream from the “Settings” option on the main CDXZipStream commandbar.   Please see the blog post How to Get a Bing Maps License Key for instructions on getting a free basic key directly from the Microsoft website, or an enterprise key from Microsoft partners.

We also offer a free Microsoft Excel template for performing route optimization with CDXZipStream, which completely automates the process for you.  It works with either Bing Maps or Microsoft MapPoint.  Here’s a quick look at how it works:

 

On a final note, CDXZipStream continues to support the desktop software Microsoft MapPoint, which does have built-in functionality to optimize 100+ destinations.  Since MapPoint was discontinued in 2013 and its data has not been updated since, it will eventually become outmoded for many applications.  But Microsoft still does provide access to the MapPoint free trial here, and for more information about how to use it with CDXZipStream, please view the short tutorial Route Optimization in Excel.

 

How to Reinstall CDXZipStream on a New or Reformatted Computer

Our software CDXZipStream, a Microsoft Excel add-in for geocoding, routing, and other location-based analyses, can easily be reinstalled on a new or reformatted computer using the steps listed below.

(Note:  These instructions apply to the 64-bit version of CDXZipStream which was released in November 2015.  If you currently use the older 32-bit version, you can obtain a free upgrade to the new version with purchase of a data subscription, which also provides monthly data updates and technical support for one year.  You can purchase a subscription under the "CDXZipStream Classic - Buy Data Update" menu option of your account.  If you do not wish to upgrade, you can reinstall the 32-bit version using the instructions here.)

Instructions for CDXZipStream (64-bit) Reinstallation:

1. Download and install on your computer the trial version of CDXZipStream.

2. When installation is complete and Microsoft Excel opens, press the "Account" button on the CDXZipStream commandbar:

3.  Press the "Register/Upgrade Product" button:

4.  Enter the username and password associated with your CDX Technologies account.  These were provided in the email you received after purchasing CDXZipStream.  The user name is usually your email address.  You can also retrieve these using the links provided in the account login area of CDXTech.com.

5.  After you input your username and password, press the "Register" button.  CDXZipStream is now activated on your computer.  (If you were provided a fixed registration code which is usually used for multiple purchases, please input that in the box provided before registering.)

You may also need to install databases associated with your CDXZipStream version.  After registration, press the "Check for Available Database Updates" button on the Account input box, and the databases you need will be listed.  Press the "Update" button next to each database to download and install them.  This process may take several minutes.

How to Get a Bing Maps License Key

Our Microsoft Excel add-in CDXZipStream contains Bing-related functions that can do driving and route calculations, geocode and reverse geocode, look up postal codes and verify address information. To use Bing Maps as the source of mapping data for these functions, the first step is to get a Bing Maps license key. Free basic keys for evaluation purposes can be created from the Microsoft website, or you can purchase an enterprise version from Microsoft resellers such as Onterra Systems.

To get a free basic key:

1. Go to the Bing Maps Dev Center and sign in with your Microsoft Account. (You can use the same sign-in credentials you may already use for Office, Outlook, or Skype.) If you don't have an account, you have the opportunity to create one from the sign-in page; there is no cost or obligation associated with having a Microsoft account.

2. After signing in, you will be forwarded to a page with a "My Account" menu. Select "My Keys" and on the next page click on the link for creating a new key.

3. Next you'll see a box, shown below, with several fields to fill in:

 

4. Click on "Create" and you will see your new Bing Maps key and related details listed. To the right of the key select "Copy key".  If your browser doesn't allow you to use the "Copy key" link, you can also highlight the key with your cursor and use CNTL-C to copy it.

5. Now you can open Excel and from the "Settings" icon on the CDXZipStream commandbar, click on "Bing Maps Settings", then "Set Bing Maps Key", and use the keyboard shortcut CTRL-V to paste the new key into CDXZipStream.

Below is a detailed, step-by-step tutorial on how to get a free Bing Maps key and enter it in CDXZipStream:


To get an enterprise key:

Contact an authorized Microsoft reseller for an enterprise Bing Maps key. Reseller Onterra Systems provides enterprise keys for $300 per year that cover up to 5 users and provide 100k data requests per day. We have found that this license works well for high volume CDXZipStream applications. You can contact Onterra using their on-line order form. If you work for a larger organization, please check with your IT department first to see if you already have access to a key as part of a Microsoft enterprise agreement. Microsoft also provides a good review of Bing Maps licensing options on its website.

Geographic Access Analysis - Customized for You

We currently offer a Microsoft Excel template that, working with our CDXZipStream add-in, performs geographic access analysis.  In general terms it can take a matrix of X and Y locations (these could be stores, customers, warehouses, delivery points, etc.) and create a comprehensive radius report showing which X locations are within a specified radius distance of all Y locations, or vice versa.   In its most common application as a store locator tool, it can identify the stores located within a radius distance of a list of customers.  Here’s a short tutorial showing how it works:

A more detailed description can also be found in our blog article Store Locator and Geographic Access Analysis in Microsoft Excel.


The template can also be customized to fit your particular needs, by incorporating additional data and generating custom reports. Here’s the short list of the kinds of things customization can do:


1. Calculate access performance
Once the radius report is generated it can be used to calculate performance any number of ways. What percentage of customers live within x miles of at least two stores? Which stores within y miles cover the most customers? How many customers must travel at least y miles to a store? These and other measurements can be extremely useful in areas ranging from resource allocation to developing a long-term business strategy.


2. Add demographic or other location-based data to the radius report.
Get demographic data for each location and/or target using one of CDXZipStream’s demographic feeds, and include that data as part of the radius report. For example, access requirements for health care facilities can be dependent on population density. With a radius report showing the closest facilities to each prospective patient, population density for each patient ZIP Code (based on population and land area data obtained from the CDXZipCode Feed) can be used to classify each patient as living in an urban, suburban, or rural area.


3. Add more criteria to the radius report.
The radius report shows locations closest to each target, within a radius distance you specify, but additional criteria can be used as well. Need to find distribution centers within a radius distance of retail stores, but only those within the same state? State location can easily be added as a secondary criterion in the report. These additional criteria don’t have to be based on location; any descriptive data that can be included in the location listing (number of employees, services provided, etc.) can be used in the radius report.


4. Create custom reports based on the radius report
The results of the radius report can be used to produce more detailed reports for each location, or groups of locations. For example, with a radius report showing stores within a radius distance of each customer, additional reports can be built showing customers (within the radius distance) associated with each store. Similar reports can also be generated across stores groupings, showing customers associated with full service stores, stores within a single state, etc.


5. Add billing and other numerical data

Any numerical data associated with targets or locations, such as billing and cost data, can be included as part of the radius report or other custom reports described in the point above. These values can then be summed or averaged, for example, for a group of targets and/or locations. Numerical-based reports such as these can often replace time-consuming manual processes as well as provide hard numbers for facility planning purposes.


For more information about our customization services, please call 1-877-CDX-TEC1 (239-8321) or email customsolutions@cdxtech.com. If you are a current CDXZipStream client, you can purchase the standard, un-customized template by signing into your on-line account and selecting "Buy Data Updates". Select the Geographic Access Analysis Template from the drop-down list and proceed through the purchasing process. You must already own the CDXZipStream Bing, Basic, or one of the premium demographic versions to see this template as a purchasing option.

The Versatility of Bing Maps When Working with Address and Location Data

Our Microsoft Excel add-in CDXZipStream can now use the Bing Maps web service to geocode, reverse geocode, perform routing calculations, and check address information, all for long lists of location data in a worksheet. Especially noteworthy is the ability of Bing Maps to accurately retrieve “best match” addresses or points of latitude and longitude, even when working with problematic source addresses or locations. Here are a few examples:

Incorrect or Missing ZIP or Postal Codes

Incorrect or missing ZIP or postal codes is a very common issue with address data. Bing Maps can provide correct ZIP Code data that matches the provided street, city, and state, as shown below:

Here's a short tutorial showing how it works:

Intersections
Bing Maps can identify the intersection of two roadways, providing both the name of the roads as well as geocoded (latitude and longitude) coordinates. This can be valuable for first responders, since accident locations are often associated with intersections rather than specific street addresses.

No Commas or other Delineation
Addresses compiled from other data sources may be missing commas or other delineation between street, city, state, and ZIP code components. Once the addresses are in Excel, it can be very difficult to accurately parse these components from a single text string, using Excel text functions and formulas. Bing Maps can provide the standard address format with commas, or can provide individual parsed components:

Landmarks
Bing Maps can also locate landmarks that do not have conventional addresses:

Missing Street Numbers
In cases where street numbers are missing, Bing Maps can return the street location as well as the geocoded location of the approximate centerpoint:

Other Text Corrections 

Bing Maps can correct other issues with address text such as misspellings, missing or incorrect directional data, and missing or incorrect street designations:

To check and correct problematic address data that may have issues like the ones described here, use the Bing version of CDXZipStream or higher. Please refer to our pricing page for current pricing information for this and other versions.