« Back to Supply Chain View

Version 0.x warning

I am trying a strategy of "Release early, release often". I am sure there are bugs in the application (as well has having rather basic functionality at the moment. If you let me know, I will try to fix any issues. Thanks for your patience!


When you use this application, none of the data comes to Supply Chain View. Data is communicated to Google in order to render the map, but that should be limited to the latitude and longitude of the points on the map. All calculation of the centre of gravity is done within your own web browser.


Click on the map to add points, representing customers in the distribution network. Once the points are on the map, you can drag them around if you are not happy with their initial position. If you want to delete a customer, click on it and a little bubble will open with a "Delete" button.

Initially all the customers have the same material volume despatched to them, but you can change that by clicking on the customers and entering a numeric value in the "Volume" box you see in the bubble. You could use the number of drops per period, or the number of cartons, or the sales value.

As this is a Google Map, you can navigate around by dragging, panning and zooming. By default the map centres on Oxford, Supply Chain View's HQ.

When you have added the customers to the map, click on the large white button at the bottom of the map labelled "Calculate centre of gravity". A factory icon will appear on the map at the optimal geographical location to serve all your customers.

If you subsequently add, move, or change the volumes going to customers, clicking again on the calculation button will move the factory icon.

About this Centre of Gravity model

I've written this as a proof of concept and as an educational demo rather than a serious supply chain modelling tool. As a proof of concept it shows that with the Google Maps API and less than 150 lines of code you can make a fairly neat application that does something useful. As an educational tool, it is very interactive, and I could see myself using this with clients to demonstrate the basic principles of more sophisticated models.

Having said that, if you did take the trouble to put real customers on the map, you would get absolutely the "right" answer. By which I mean the location that minimises the straight line distances to all points given their weightings.

If I have a little time, I will add an editable table that would allow you to see and name your customer locations. Any other suggestions gratefully received.

How does it work? Well, it takes all the locations you have added, converts their latitude and longitudes into cartesian coordinates on a unit sphere, takes the weighted mean of each of those x/y/z coordinates, and converts back into polar coordinates to get a latitude and longitude for the Google Map to plot. Simple really.

Martin Arrand, 08/06/2011

© 2011 Supply Chain View