View Full Version : MPMileCharter Example: Finding only the Three Closest Stores to each Customer

Richard Marsden
06-07-2011, 10:44 AM
Read http://www.mapforums.com/using-mpmilecharter-create-mileage-charts-microsoft-mappoint-17397.html for an Introduction to MPMileCharter

MPMileCharter comes with two license levels. The ‘Basic’ level includes most of MPMileCharter’s features and supports all of MapPoint’s route options. The ‘Professional’ license adds the ability to pause and restart processing runs (useful if your PC has to be restarted or switched off during a processing run); and the ability to only report the closest destinations. This latter feature is very powerful. Not only does it simplify the output by having the option to sort the destinations closest first, but MPMileCharter is clever enough to know when routes have no chance of being amongst the closest. It can safely skip these route calculations, resulting in huge speedups on large processing runs.

This example demonstrates how to use MPMileCharter to report the route distances from each customer to the three closest stores, ie. to find the three closest stores for each customer. The demonstration map can be found in the MPMileCharter examples file:


The map is called chicago_customers.ptm, and requires MapPoint 2006 North America. The map looks like this:


The roads have been switched off for clarity. The map contains two pushpin sets (groups of pushpins). Sales Offices contains pushpins for a series of sales offices in Illinois and Indiana. Most are in the Chicago area. Customers contains pushpins for each of the customers. We wish to find our three closest sales offices for each customer with upper limits of 50 miles and 70 minutes. Do this by setting MPMileCharter's options as follows:


We want routes that start at our customers and finish at our sales offices. This will result in MPMileCharter reporting the closest Sales Offices for each Customer, and not the other way around. We also wish to see the distances and travel times for each sales office, so check Distances and Travel Times. We also want to see the shortest (rather than fastest) routes, so select Shortest Routes.

To find the closest stores only, check the Only report shortest/quickest routes checkbox. We want the three closest sales offices, so enter '3' in the Find the closest locations box. We also restrict the distance and travel times to 50 miles and 70 minutes, respectively. We also want to list the closest sales offices in order closest-first, so check Rank routes in ascending order.

Press Compute to start processing. The resulting chart of the closest sales offices will look like this:


Notice that the customer 'David Brown' only has one sales office within the specified criteria of 50 miles and 70 minutes.

And that is how simple it is to find the closest destinations from a group of pushpins. For further details and a free 14 day trial download, see the official MPMileCharter website at:

MileCharter: Home Page (http://www.milecharter.com)

09-27-2011, 11:35 AM
I am really interested in this product and downloaded the 14 day free trial....my problem is my data set is about 650 pushpins (although if this works, this one will be small compared to what I would eventually use it for). That creates a matrix of almost 400,000 calculations. MapPoint seems to crash at about 100,000 calculations and I lose the work done.:shaun:
Any ideas?

09-27-2011, 12:46 PM
MapPoint runs slower with large batch route calculations due to memory management that is designed for interactive use.

There are a few options:

- The Pause & Restart functionality was partly added to help solve this problem. Pause a job run as it slows. Exit MPMileCharter and MapPoint. Restart MapPoint, re-load your map file, start MPMileCharter, Restart. (this requires the Professional License)

- Use the "Find Closest" option to only report the shortest/fastest destinations. This is clever enough to skip routes that have no chance of reaching the final result. Hence greater speed and far fewer routes need to be calculated. (this requires the Professional License)

- Use our MPMileage product instead ( MPMileage: Batch calculate mileages with Microsoft MapPoint (http://www.mpmileage.com) ). Rather than bulk group-to-group calculations, this computes a long list of point-to-point routes. This might be more appropriate to your application (for a full matrix table, you would have to create your own list of routes from the source&destination lists). MPMileage is clever enough to restart MapPoint, so avoiding the memory management problem. It can also take advantage of multiple processor machines for large speed improvements.

- Finally, you can split your data into smaller chunks, and run multiple jobs.


09-27-2011, 01:38 PM
Thanks Richard. I have doen the first two suggestions, however the data run times are so larger I let my PC run overnight and in the morning it had crashed. smaller data sizes would be onerous due to the large scale of my task.
I had tried a a VBA MapPoint object model and encountered the same crashing issues....
Regarding the MPMileage Application, is there a short term free trial version available?



09-27-2011, 04:12 PM
Also, does the MPMileage program calculate travel time? That's the number I need, not mileage....thanks!!

09-28-2011, 08:36 AM
Yes there's a 14 day trial - see the web link above.
Yes supports all of MapPoint's routing features, distances, travel times, and costs.
It takes more setting up though, but on a modern PC it can be a lot faster (and a new version in testing is faster still).


11-30-2012, 04:14 AM
A bit urgent
Is the professional licence for 1 year or for a lifetime?

Also, please tell the lifetime of a Map point licence as well

11-30-2012, 08:18 AM
The "Professional License" is lifetime and includes minor version updates (3.1, 3.2, 3.3, etc). Major upgrades may require purchasing a (usually discounted) license upgrade (ie. 2.* -> 3.* upgrades have a fee).
Note that we cannot predict what Microsoft will do with regard to MapPoint, Excel, and Windows; so it is possible that MPMileCharter v3 will not work with future versions of any of these products. Such situations may require an upgrade.

MapPoint licenses are also lifetime and do not include updates or discounted upgrades.