No account? →

You need to enable javascript in your browser to see this page working correctly!

Centers-of-Gravity Calculator

This web app determines Centers-of-Gravity, warehouse locations that minimize transport costs* and shows how service distances are affected by the number of warehouses. It helps you to optimize your supply chain network design. It offers extensive optional functionality: you can setup (semi-)fixed warehouse locations, limit capacities, group customers, add supply, and more. It runs fast, especially in Google Chrome.
This web app - with demo data, explained further below - is fully functional, so you can check out how it works. To run with your own data, you need to create a paid account.
* In fact, it minimizes the sum of weighted as-the-crow-flies-distances.

“We have been using this Centers-of-Gravity Calculator for years. It’s better fit for purpose than the other tools we use(d) for this and we like the way Stelling Consulting is constantly improving the tool to make it even better.”

Jeroen Martens
Head of Transport Solutions Design MLE MEA &
Network Design & Supply Chain Consulting Global Practice Lead
DHL Supply Chain
 
Screen view
Show map display settings
Show run options and parameters (linked to optional input data)
Show help text, login form, intro
 

Number of Centers-of-Gravity / warehouses 
Present best solution out of N runs, with N is
i
Distances in kilometers miles
 
Calculate
Save
Reload
Save and Reload: data and settings are saved in your local browser memory, so you can reload those when logged in next time.
Save and Load are not functional in demo mode.
Run
 
Current sum of weighted distances
0
i
Lowest sum of weighted distances
0
 Distance bin width (km)
10 20 25 50 100
 Distance    Demand cum.   Demand   Customers cum.   Customers cum.   Customers 
 

Run scores chart
i


See also detailed output tables further below.

Demo mode is active

In demo mode this web app is fully functional (except buttons Save and Load) but you cannot enter your own supply chain data. Create a paid account via the top of this page, if you want to run with your own data.

About the demo data, and all run options

Demo data is used, sitting in the input tables below. The demo data captures a lot of functionality, which means optional input fields and optional input tables have been filled as well. But this optional data is only used if you check constraints. Just below the map, check "Show run options and parameters" to see those constraints. The more constraints activated, the less freedom, and vice versa. The more freedom, the more solutions may differ from each other, as you will see in the "run score chart" above. Besides (un)checking constraints, you can also adjust the number of Centers-of-Gravity / warehouses. The demo initially starts with three.

Table predefined warehouses (optional)

This table contains two predefined warehouses, one in the UK (Birmingham, cannot move, optional field Move_limit set to 0) and one in Spain (Madrid, can move within a 200km range, optional field Move_limit set to 200). These locations are only activated if you check constraint "predefined warehouse locations". They also have certain capacities (optional field Capacity set to 482500 and 550000), which are adhered to if you check constraint "capacity limits".

Table customers

This table contains 588 customer locations throughout Europe. Customers in UK/Ireland are assigned to the Birmingham warehouse, customers in Spain/Portugal to the Madrid warehouse (optional field Warehouse_ID set to Birmingham or Madrid) if you check constraint "fixed customer-warehouse assignments". All customers have optional field Group set to their country code (AL/AT/BE/CH/CZ/DE/..) effectively meaning all customers of a country are assigned to a single warehouse only if you check constraint "customer groups" (a group is not delivered from multiple warehouses, unless capacity constraints would get violated).

Table suppliers (optional)

This table contains two supply locations, Rotterdam in The Netherlands, and Bologna in Italy, which are only activated if you check "supply". Centers-of-Gravity will tend to move towards those locations, as supply volumes are high compared to individual demand volumes. The higher Supply parameter "supplier transport costs ratio", the more warehouses will move towards those supply locations. Setting this ratio to 0 is effectively the same as unchecking "supply". If "supply" is not checked, then Centers-of-Gravity are based on demand only. Under Supply parameters you can chose from three options of how supply will flow via warehouses to meet demand.


 

Input tables

Though not mandatory, it is advised to express quantities as rounded numbers without thousands or decimal separators, and to filter out all records with a zero quantity beforehand.
Use decimal point - not decimal comma - as decimal separator. Any commas in your data will be removed automatically. You can enter your data semicolon or tab separated. Tab separated data will be converted to semicolon separated data automatically.
CUSTOMERS
Latitude;Longitude;Demand_quantity;Warehouse_ID (optional);Group (optional)
41.1533;20.1683;3430;;AL
46.6333;14.3128;4270;;AT
46.9894;15.5817;4200;;AT
47.252;11.42;4690;;AT
47.5784;12.7305;3550;;AT
47.9911;13.8878;11530;;AT
48.0671;13.1775;3300;;AT
48.2025;16.4186;4600;;AT
48.2049;16.2734;6100;;AT
48.2297;16.4692;2620;;AT
48.3656;13.9771;3340;;AT
43.3319;17.7513;5900;;BA
43.8784;18.3593;2460;;BA
50.2458;4.8519;2720;;BE
50.3753;4.3819;3420;;BE
50.4172;4.447;3220;;BE
50.4555;3.9662;3500;;BE
50.461;4.8498;2940;;BE
50.4797;4.1698;4600;;BE
50.588;5.8602;2840;;BE
50.5882;4.3253;3120;;BE
50.59;3.3922;2960;;BE
50.5942;5.4331;3200;;BE
50.5978;6.1325;3280;;BE
50.6473;5.5832;6550;;BE
50.7237;4.5543;3140;;BE
50.7416;3.2238;2420;;BE
50.7886;4.8612;2980;;BE
50.8137;5.2089;2460;;BE
50.8185;3.2785;2440;;BE
50.849;4.4297;5360;;BE
50.8521;5.6878;3520;;BE
50.8832;4.3551;9200;;BE
50.8903;4.7381;8200;;BE
50.8989;4.391;3200;;BE
50.9316;5.3368;4880;;BE
50.9406;3.1181;6900;;BE
50.9439;4.0442;2920;;BE
50.9676;5.4886;3160;;BE
50.9836;4.821;3280;;BE
50.9894;3.5106;3380;;BE
51.0077;3.368;3080;;BE
51.0293;4.094;2540;;BE
51.0353;4.4665;3280;;BE
51.0532;3.6307;9480;;BE
51.12;4.5734;2780;;BE
51.1462;4.3383;4120;;BE
51.16;4.8277;3440;;BE
51.1695;4.1647;4240;;BE
51.2062;5.3798;2480;;BE
51.212;4.4686;3670;;BE
51.2147;2.919;3280;;BE
51.2211;4.3664;3130;;BE
51.2329;3.2118;3610;;BE
51.2384;5.1949;3280;;BE
51.2706;4.5028;4450;;BE
51.3369;3.3234;3850;;BE
51.3531;4.771;2780;;BE
42.687;23.3273;4660;;BG
42.7266;23.3158;18640;;BG
53.1232;26.5796;7000;;BY
46.0338;8.9719;2940;;CH
46.1258;7.2274;2620;;CH
46.3407;6.1974;3670;;CH
46.5902;6.6716;4600;;CH
46.9374;7.4345;2700;;CH
46.96;9.0552;5800;;CH
46.9652;8.2183;2640;;CH
47.1921;7.5615;3360;;CH
47.3092;7.6031;4560;;CH
47.3475;9.4081;2520;;CH
47.3776;8.5381;5900;;CH
47.4036;8.0374;2820;;CH
47.5567;7.5979;3730;;CH
47.5777;9.0899;3340;;CH
35.0309;33.1374;5960;;CY
49.1812;16.6769;2520;;CZ
49.8397;18.3248;2800;;CZ
49.886;16.471;12610;;CZ
49.8879;14.6555;5000;;CZ
50.0446;14.5616;7790;;CZ
50.1368;14.4601;3000;;CZ
50.224;14.0776;2840;;CZ
47.7487;10.464;2420;;DE
47.8441;12.2004;4060;;DE
47.8484;11.2849;4480;;DE
47.8948;8.0721;3700;;DE
47.9083;9.5446;2560;;DE
47.9821;8.6801;3240;;DE
48.125;11.6005;7370;;DE
48.1827;11.5495;6400;;DE
48.3254;8.9595;2620;;DE
48.3371;10.8477;4870;;DE
48.4342;12.4117;3240;;DE
48.4461;10.1133;3880;;DE
48.4891;11.5684;3560;;DE
48.7264;13.0673;2800;;DE
48.7557;9.1817;3520;;DE
48.7875;9.8422;4630;;DE
48.8183;9.3529;4300;;DE
48.9686;8.2909;6120;;DE
49.0929;12.3527;7240;;DE
49.2842;9.5062;4300;;DE
49.341;7.1115;3370;;DE
49.3578;10.9545;5520;;DE
49.4069;10.9999;5080;;DE
49.425;11.961;3380;;DE
49.4288;8.9278;2440;;DE
49.4619;8.5093;4750;;DE
49.5131;7.989;4630;;DE
49.7477;8.7663;3260;;DE
49.8457;7.7122;5360;;DE
49.9622;10.0166;15520;;DE
50.0564;9.0616;8740;;DE
50.0891;11.9207;2960;;DE
50.113;11.0084;2500;;DE
50.1152;8.6563;4800;;DE
50.2084;8.1902;4600;;DE
50.3019;7.5317;4840;;DE
50.5261;10.6956;3180;;DE
50.5498;12.4075;2980;;DE
50.6064;6.9274;4900;;DE
50.6781;9.7457;2800;;DE
50.7328;11.7088;4840;;DE
50.7774;13.1232;3940;;DE
50.7986;8.6866;3480;;DE
50.8085;6.2872;4160;;DE
50.9001;6.7587;5900;;DE
50.9315;7.9958;2860;;DE
50.9609;7.3826;5360;;DE
51.1753;6.4773;3520;;DE
51.1773;13.7897;5600;;DE
51.1868;10.8303;4840;;DE
51.2019;14.5207;3280;;DE
51.214;6.8136;4280;;DE
51.2161;9.1977;4360;;DE
51.3013;7.5981;3100;;DE
51.3441;12.9357;3840;;DE
51.4942;8.0154;4630;;DE
51.4967;12.0202;4360;;DE
51.5245;9.9208;3520;;DE
51.532;7.3695;5800;;DE
51.5434;6.3875;7500;;DE
51.5557;7.1372;8980;;DE
51.717;6.5946;2400;;DE
51.7568;14.0347;2780;;DE
51.7898;8.6824;5400;;DE
52.1235;7.4302;4200;;DE
52.1595;8.8232;2760;;DE
52.1875;10.683;4420;;DE
52.2455;14.0142;3250;;DE
52.3179;12.7886;2740;;DE
52.3235;10.099;4060;;DE
52.3851;11.6495;2560;;DE
52.4013;9.6957;5000;;DE
52.4594;13.4892;3220;;DE
52.5117;13.4079;3370;;DE
52.5316;7.7278;5700;;DE
52.5878;13.3392;8560;;DE
52.9493;13.1648;3280;;DE
53.0899;8.8441;3060;;DE
53.2082;9.3574;2500;;DE
53.2934;7.7666;4900;;DE
53.3574;11.4806;3360;;DE
53.456;9.808;3520;;DE
53.5625;9.9914;4540;;DE
53.59;13.3337;3060;;DE
53.6327;10.0874;7780;;DE
53.955;10.956;6050;;DE
54.0318;12.4273;4570;;DE
54.3167;9.8918;3550;;DE
54.3256;9.1257;3340;;DE
55.6147;12.3188;7300;;DK
55.6689;12.55;3250;;DK
59.2217;24.187;6810;;EE
35.2931;-2.9492;2420;Madrid;ES
35.8917;-5.3305;3000;Madrid;ES
36.1408;-5.3536;2440;Madrid;ES
36.5295;-5.7554;11200;Madrid;ES
36.8099;-4.6632;12760;Madrid;ES
37.3103;-2.3428;6040;Madrid;ES
37.3968;-3.23;11000;Madrid;ES
37.5034;-6.7991;5800;Madrid;ES
37.5264;-5.5807;14280;Madrid;ES
37.9667;-3.3442;5800;Madrid;ES
37.9718;-4.7691;7300;Madrid;ES
38.073;-1.4702;12160;Madrid;ES
38.3649;-0.4237;18480;Madrid;ES
38.7208;-5.9683;8840;Madrid;ES
38.7359;-1.865;6000;Madrid;ES
38.979;-3.7994;5700;Madrid;ES
39.3672;-0.7361;25920;Madrid;ES
39.6178;2.9067;6920;Madrid;ES
39.7771;-6.2981;4800;Madrid;ES
39.8069;-4.1161;5000;Madrid;ES
39.9488;-2.1217;2880;Madrid;ES
40.2532;-0.1381;5300;Madrid;ES
40.5295;-3.7669;77840;Madrid;ES
40.6066;-0.7299;3320;Madrid;ES
40.6391;-4.9062;2540;Madrid;ES
40.7418;-2.5093;5250;Madrid;ES
40.7762;-6.0096;4690;Madrid;ES
41.0536;0.9218;5000;Madrid;ES
41.1183;-3.9573;3340;Madrid;ES
41.693;-6.1506;3160;Madrid;ES
41.7153;-4.6488;4600;Madrid;ES
41.747;2.0723;57700;Madrid;ES
41.8449;-0.8662;12800;Madrid;ES
42.0671;1.0973;4720;Madrid;ES
42.0734;2.5063;9820;Madrid;ES
42.1097;-0.0637;2960;Madrid;ES
42.1882;-7.5237;5000;Madrid;ES
42.2716;-2.4001;6040;Madrid;ES
42.3387;-3.5794;4520;Madrid;ES
42.3728;-8.3689;8020;Madrid;ES
42.4117;-4.4814;3480;Madrid;ES
42.6085;-1.6054;11160;Madrid;ES
42.63;-5.8945;6850;Madrid;ES
42.8386;-2.7489;4840;Madrid;ES
43.0522;-7.3717;5800;Madrid;ES
43.1264;-3.9952;6100;Madrid;ES
43.1369;-8.4757;15040;Madrid;ES
43.1534;-2.1568;4600;Madrid;ES
43.2274;-2.9412;7930;Madrid;ES
43.254;-5.8255;7320;Madrid;ES
60.1616;24.4844;27040;;FI
42.17;9.0596;2400;;FR
42.6311;2.4388;3520;;FR
43.0339;2.4754;3340;;FR
43.1379;0.164;2700;;FR
43.1855;-0.8778;7150;;FR
43.3118;1.2479;11440;;FR
43.4189;6.295;5440;;FR
43.5424;5.0287;7510;;FR
43.5903;3.363;6760;;FR
43.7836;2.2493;2440;;FR
43.9002;7.1858;10900;;FR
43.951;4.0774;3520;;FR
43.9988;5.216;3790;;FR
44.0016;-0.6842;3300;;FR
44.0659;1.3696;2520;;FR
44.2961;2.6416;2920;;FR
44.3561;0.4815;3240;;FR
44.7237;5.2495;2480;;FR
44.8705;-0.4731;15430;;FR
45.1283;0.7113;2760;;FR
45.2843;5.5725;4600;;FR
45.3313;1.8835;3520;;FR
45.4821;6.4061;2960;;FR
45.6645;0.251;2400;;FR
45.707;-0.6045;3160;;FR
45.7517;4.2417;5480;;FR
45.7648;3.1922;7250;;FR
45.8667;4.7158;8040;;FR
45.9005;1.2659;3640;;FR
46.0596;5.4672;2520;;FR
46.0701;6.4298;3160;;FR
46.3615;3.1238;2760;;FR
46.475;-0.3132;3220;;FR
46.5871;0.5476;3140;;FR
46.6602;4.5432;2800;;FR
46.6798;-1.3315;3400;;FR
46.7656;5.7251;3080;;FR
46.8094;1.5497;3520;;FR
47.0122;2.4347;2680;;FR
47.0558;6.3897;3080;;FR
47.2181;0.7264;4360;;FR
47.3432;-1.7285;6680;;FR
47.3935;-0.5369;3730;;FR
47.4617;4.8003;4840;;FR
47.6285;6.9587;2760;;FR
47.6607;1.4362;2400;;FR
47.8153;-2.8675;3430;;FR
47.8505;3.6084;3460;;FR
47.867;7.2316;3280;;FR
47.9159;2.2866;4090;;FR
48.0176;0.2363;4330;;FR
48.142;-0.6382;3580;;FR
48.1548;6.3145;3240;;FR
48.1559;-1.6391;9960;;FR
48.2314;-4.069;5840;;FR
48.3211;4.147;3440;;FR
48.4526;-2.7761;4090;;FR
48.4557;1.3917;3020;;FR
48.5286;2.2616;7000;;FR
48.5721;0.0739;2920;;FR
48.5815;7.5971;6350;;FR
48.6138;2.9691;5050;;FR
48.763;1.8421;7840;;FR
48.7731;2.4515;6700;;FR
48.8409;2.235;34540;;FR
48.8608;2.3273;8740;;FR
48.9057;2.4519;10500;;FR
48.9459;5.9818;5760;;FR
48.9684;4.2424;6850;;FR
49.0086;5.3814;3340;;FR
49.0145;6.7953;3250;;FR
49.0663;1.0732;2500;;FR
49.0729;2.1066;6200;;FR
49.0903;-1.3387;3580;;FR
49.0927;-0.3537;3910;;FR
49.4129;2.4279;4600;;FR
49.4657;3.6021;3400;;FR
49.6714;0.9306;5650;;FR
49.9746;2.3059;2980;;FR
50.531;3.1643;14560;;FR
50.5375;2.3571;4750;;FR
41.9186;44.3628;2940;;GE
35.3225;25.0298;3490;;GR
37.5319;23.3407;4760;;GR
37.8935;23.7765;2640;;GR
37.938;23.7179;3360;;GR
37.9867;23.7207;6160;;GR
37.9894;23.7376;9750;;GR
38.0038;23.636;6160;;GR
38.0182;23.8641;4640;;GR
38.0829;23.8314;3300;;GR
38.2264;21.8153;3340;;GR
39.5679;20.8495;3520;;GR
39.5716;22.4681;3020;;GR
40.5811;23.0107;3480;;GR
40.6752;22.9383;3340;;GR
40.6986;23.2985;3700;;GR
40.7725;22.9897;3580;;GR
45.7921;16.0251;4600;;HR
47.4768;19.1392;6220;;HU
47.5492;19.0032;3700;;HU
47.6316;19.3811;4360;;HU
51.8969;-8.4863;7960;Birmingham;IE
52.2523;-7.1272;3520;Birmingham;IE
52.2713;-9.6999;2800;Birmingham;IE
52.6541;-7.2448;2640;Birmingham;IE
52.668;-8.6305;4390;Birmingham;IE
53.2706;-9.0567;4150;Birmingham;IE
53.3498;-6.2603;25990;Birmingham;IE
53.7179;-6.3561;3200;Birmingham;IE
54.2766;-8.4761;2880;Birmingham;IE
36.9078;14.6821;2600;;IT
37.0372;15.0897;3520;;IT
37.4942;14.8494;9080;;IT
37.8751;12.7816;3260;;IT
37.8969;13.6601;3920;;IT
38.0551;14.913;4600;;IT
38.3917;16.1125;2860;;IT
38.9736;16.6502;4560;;IT
39.5872;16.3783;3370;;IT
39.6113;9.0092;6530;;IT
40.164;18.1712;3960;;IT
40.2283;9.0985;2460;;IT
40.4187;15.151;4510;;IT
40.5298;15.8913;3120;;IT
40.5583;17.2642;4090;;IT
40.6411;17.7568;2680;;IT
40.7877;14.4594;9910;;IT
40.8184;8.9029;4390;;IT
40.99;15.0829;2860;;IT
41.0328;16.6632;7930;;IT
41.2059;14.142;2420;;IT
41.2296;14.7779;2540;;IT
41.4621;13.1919;2460;;IT
41.5281;15.5969;4280;;IT
41.6198;13.4899;3320;;IT
41.7225;14.5424;3380;;IT
41.8548;12.5014;27680;;IT
42.1057;14.4617;3480;;IT
42.1738;13.6418;2820;;IT
42.3187;14.0083;3240;;IT
42.5055;11.9724;3500;;IT
42.6706;12.4041;2820;;IT
42.6787;13.7479;3600;;IT
42.7657;11.2306;2960;;IT
43.0065;13.5481;3480;;IT
43.1048;12.6;4440;;IT
43.163;11.4531;4060;;IT
43.1698;13.2772;3360;;IT
43.4761;10.622;9560;;IT
43.4872;13.2056;2460;;IT
43.5243;11.919;3520;;IT
43.6923;12.6369;3120;;IT
43.8281;11.2139;5400;;IT
43.9536;7.8298;3200;;IT
44.0325;12.1991;7100;;IT
44.2232;9.7594;2920;;IT
44.2582;8.3252;3380;;IT
44.3448;11.9549;4000;;IT
44.442;11.2898;5760;;IT
44.451;9.0572;4640;;IT
44.4667;7.5591;4600;;IT
44.542;10.9065;4330;;IT
44.6048;10.5067;3670;;IT
44.6927;9.9567;3910;;IT
44.7542;11.7822;2560;;IT
44.8288;9.5974;3380;;IT
44.8353;8.1888;2720;;IT
44.8537;8.647;3100;;IT
44.9671;11.8537;3600;;IT
45.0264;9.0348;4850;;IT
45.1356;10.8501;3260;;IT
45.1736;7.379;12700;;IT
45.1926;9.8936;4270;;IT
45.3923;11.7787;6550;;IT
45.422;11.0567;8620;;IT
45.4588;12.4754;4870;;IT
45.4808;9.1197;23500;;IT
45.5522;8.196;4540;;IT
45.6177;11.4649;3820;;IT
45.7362;9.8421;4720;;IT
45.7573;10.3516;7930;;IT
45.7798;13.6245;3120;;IT
45.8094;12.2113;3940;;IT
45.8571;8.7999;4840;;IT
45.8655;8.3388;4760;;IT
45.9305;9.1572;3610;;IT
46.1299;11.202;2760;;IT
46.1357;9.9182;3180;;IT
46.1933;13.0143;7150;;IT
46.2907;12.1646;2780;;IT
46.6645;11.3893;3380;;IT
54.8917;23.9221;2620;;LT
55.1508;22.955;3220;;LT
55.1694;23.8813;4750;;LT
55.9302;25.3559;3480;;LT
56.9874;24.1059;4750;;LV
49.8153;6.1296;3940;;LX
47.0252;28.8509;3440;;MD
41.9876;21.4902;3480;;MK
35.9375;14.3754;6120;;MT
50.8866;5.9619;3440;;NL
51.1076;5.8626;5720;;NL
51.3712;6.1711;2420;;NL
51.4204;5.401;3420;;NL
51.4375;5.4817;3160;;NL
51.4924;4.0378;3120;;NL
51.5886;4.7813;2900;;NL
51.598;5.0923;2440;;NL
51.686;5.3027;13100;;NL
51.8064;5.2585;12640;;NL
51.8471;5.8635;4450;;NL
51.9176;4.4887;3790;;NL
51.9805;5.9059;2680;;NL
52.023;5.0361;4920;;NL
52.024;5.557;2840;;NL
52.0787;4.3172;4870;;NL
52.0879;5.1162;2680;;NL
52.1326;5.2913;13740;;NL
52.1518;5.0451;2700;;NL
52.1554;4.4916;2760;;NL
52.2208;6.8993;2800;;NL
52.2244;5.1764;7900;;NL
52.3081;4.9442;4600;;NL
52.3728;4.9067;6700;;NL
52.5113;6.0903;2760;;NL
52.6307;4.7505;3120;;NL
52.7308;6.4723;5740;;NL
52.7847;6.9009;2860;;NL
53.218;6.5707;2620;;NL
59.7326;10.7913;6450;;NO
59.9342;10.7994;7780;;NO
50.218;19.002;4160;;PL
51.8135;19.445;10450;;PL
52.1077;21.0815;29210;;PL
52.2658;17.6252;2860;;PL
52.282;21.0386;3000;;PL
37.0213;-7.9338;2680;Madrid;PT
38.525;-8.8986;6120;Madrid;PT
38.7367;-9.1339;19060;Madrid;PT
39.2322;-8.686;2620;Madrid;PT
39.3999;-8.2245;2720;Madrid;PT
39.7425;-8.8064;2760;Madrid;PT
40.2108;-8.4221;5640;Madrid;PT
40.6266;-8.6479;2840;Madrid;PT
40.6447;-7.3044;2780;Madrid;PT
40.6592;-7.9147;3460;Madrid;PT
41.1515;-8.6051;10180;Madrid;PT
41.5453;-8.4199;3940;Madrid;PT
44.3902;26.1161;26080;;RO
44.4403;26.0342;5960;;RO
44.4531;26.1286;7580;;RO
44.5207;26.1358;9080;;RO
45.7945;25.2265;3040;;RO
45.9303;24.3044;18170;;RO
44.0165;21.0059;20720;;RS
44.8262;20.4571;9300;;RS
55.8168;37.4999;145900;;RU
57.387;12.2792;22750;;SE
46.0563;14.5047;10090;;SI
46.5565;15.6499;4900;;SI
48.0498;18.2532;3140;;SK
48.0665;17.155;3490;;SK
48.1976;17.1478;4570;;SK
48.674;20.7849;3120;;SK
48.7536;19.2941;5640;;SK
49.1356;21.1867;3190;;SK
36.7307;31.0436;2780;;TR
37.0369;37.2875;2620;;TR
37.2867;35.7333;3040;;TR
37.8698;32.3994;4320;;TR
38.489;27.2261;22280;;TR
38.7097;35.8409;6160;;TR
39.6242;37.3257;2440;;TR
39.9191;32.753;8560;;TR
40.1914;29.0555;2460;;TR
40.3689;36.5431;3260;;TR
40.9071;39.8005;2480;;TR
41.0105;29.0025;55600;;TR
41.2007;36.1377;2900;;TR
48.3794;31.1656;24400;;UA
48.4371;34.9045;4900;;UA
50.4424;30.5221;7780;;UA
49.2044;-2.137;2860;Birmingham;UK
50.4536;-3.7099;2960;Birmingham;UK
50.4769;-4.4283;4040;Birmingham;UK
50.8499;-0.9419;19360;Birmingham;UK
50.8647;-0.1239;2940;Birmingham;UK
50.9034;-3.7971;2820;Birmingham;UK
50.9553;-1.3683;4090;Birmingham;UK
51.0893;-0.2995;3180;Birmingham;UK
51.097;0.5201;2840;Birmingham;UK
51.1703;-0.7554;6450;Birmingham;UK
51.3326;-0.3905;3440;Birmingham;UK
51.3775;0.0853;9240;Birmingham;UK
51.4156;0.2693;2480;Birmingham;UK
51.4249;-2.6571;3160;Birmingham;UK
51.4389;-0.4269;3460;Birmingham;UK
51.4477;0.0123;2800;Birmingham;UK
51.4535;-0.1893;4960;Birmingham;UK
51.5144;-0.1785;3140;Birmingham;UK
51.5168;-0.1805;3020;Birmingham;UK
51.5313;-0.0258;3100;Birmingham;UK
51.5491;-0.3638;3580;Birmingham;UK
51.5559;-0.1155;2600;Birmingham;UK
51.5678;0.2725;3280;Birmingham;UK
51.5699;-0.1035;3280;Birmingham;UK
51.5805;-0.2073;3910;Birmingham;UK
51.5844;-0.3479;4120;Birmingham;UK
51.6029;0.0771;3360;Birmingham;UK
51.622;-3.3992;8700;Birmingham;UK
51.6633;-0.3879;2740;Birmingham;UK
51.7784;-0.3156;8840;Birmingham;UK
51.7924;0.4802;3440;Birmingham;UK
51.8347;-1.2995;3910;Birmingham;UK
51.8808;-4.4348;2780;Birmingham;UK
51.9679;0.8749;2560;Birmingham;UK
51.9687;-0.153;2660;Birmingham;UK
52.0941;-0.6851;48300;Birmingham;UK
52.2252;0.2378;2400;Birmingham;UK
52.273;-0.8661;3060;Birmingham;UK
52.3304;-1.4821;2800;Birmingham;UK
52.3767;-1.8368;3520;Birmingham;UK
52.4658;-1.9879;3420;Birmingham;UK
52.4664;-1.8886;32500;Birmingham;UK
52.6388;-1.0236;4720;Birmingham;UK
52.6639;1.2331;14430;Birmingham;UK
52.7268;0.128;3260;Birmingham;UK
52.9482;-3.8144;12840;Birmingham;UK
53.0054;-0.801;3100;Birmingham;UK
53.2034;-3.0312;3340;Birmingham;UK
53.2582;-1.4047;2800;Birmingham;UK
53.3608;-1.4674;2600;Birmingham;UK
53.374;-2.5496;2720;Birmingham;UK
53.4236;-1.4576;3260;Birmingham;UK
53.4301;-1.4092;2420;Birmingham;UK
53.4669;-2.2238;3460;Birmingham;UK
53.51;-2.2427;3280;Birmingham;UK
53.5178;-1.4647;2940;Birmingham;UK
53.5278;-0.6153;2440;Birmingham;UK
53.5478;-2.6538;3400;Birmingham;UK
53.6686;-1.458;11700;Birmingham;UK
53.7526;-0.3007;2760;Birmingham;UK
53.7726;-2.7852;2900;Birmingham;UK
53.8316;-2.9804;3340;Birmingham;UK
53.8482;-2.3786;7000;Birmingham;UK
53.859;-1.5386;3130;Birmingham;UK
53.9762;-2.0178;5920;Birmingham;UK
54.1184;-0.7891;3220;Birmingham;UK
54.5486;-1.1267;5760;Birmingham;UK
54.7576;-2.9054;6200;Birmingham;UK
54.8088;-1.7722;2820;Birmingham;UK
54.8533;-1.394;2760;Birmingham;UK
55.2237;-2.0276;6250;Birmingham;UK
55.3781;-3.436;16000;Birmingham;UK
55.4331;-4.509;3020;Birmingham;UK
55.6095;-3.7723;3360;Birmingham;UK
55.7945;-4.2076;6600;Birmingham;UK
55.8453;-4.3112;6500;Birmingham;UK
56.7077;-2.7597;3040;Birmingham;UK
57.2367;-2.7821;2780;Birmingham;UK
57.8682;-4.4448;2620;Birmingham;UK
SUPPLIERS (OPTIONAL)
Latitude;Longitude;Supply_quantity;Warehouse_ID (optional)
PREDEFINED WAREHOUSES (OPTIONAL)
Warehouse_ID;Latitude;Longitude;Move_limit (km);Capacity (optional)
 

Customers: optional fields Warehouse_ID and Group


Suppliers (optional): optional field Warehouse_ID


Predefined warehouses (optional)


Combining both options you can replicate your current network structure, and compare costs of the current structure to costs of alternative structures. Or determine the optimal location of a warehouse given its current customers.

Output tables

CENTERS-OF-GRAVITY
Center-of-Gravity_ID;Latitude;Longitude;Demand_quantity_assigned;%_total_demand;Capacity_%
CUSTOMER ASSIGNMENTS
Latitude;Longitude;Demand_quantity;Warehouse_ID;Group;Center-of-Gravity_ID;Distance*
SUPPLIER ASSIGNMENTS
Latitude;Longitude;Supply_quantity;Warehouse_ID;Center-of-Gravity_ID;Distance*
* Km or miles, dependent on chosen option


Remarks


Using the tool




Minimizing transport costs by locating warehouses in demand Centers-of-Gravity


Demand Centers-of-Gravity are those locations that minimize the sum of weighted distances. Weighted distance is the as-the-crow-flies-distance from warehouse to customer multiplied by demand. E.g. if customer A has a demand of 10 and is located 25 km from its warehouse the weighted distance is 250 km. Summing over all customers gives the sum of weighted distances as an indicator for transport costs. It is a relative figure, not an absolute cost figure. The Centers-of-Gravity algorithm minimizes its value by moving warehouses.

Implicit assumption: transport cost = rate/km × distance. So minimal transport kilometers come with minimal transport costs (and minimal Green House Gas emissions). This assumption is partly valid. E.g. parcel rates are distance independent within a country, FTL pallet rate/km is lower than LTL pallet rate (you may adjust demands for this in your input), macro-economic imbalance cause direction-dependent rates, et cetera.

The sum of weighted distances belonging to the current warehouse setup and customer assignments can be compared to the sum of weighted distances of alternative setups. The ratio between those indicators combined with a current customer transport costs figure will provide a rough estimation of how much can be saved on customer transport by changing the supply chain network structure.


Broader supply chain network design perspective


Core algorithms


Quality of core algorithms & speed


The quality of the algorithms of this Centers-of-Gravity Calculator equals that of Excel Solver and Llamasoft.
This web app runs much faster than Excel Solver (test 2018) and Llamasoft (test 2017), if running in Google Chrome.


Introduction about how to determine a Center-of-Gravity


Introduction to the single CoG algorithm
Customer A has a demand of 10 and customer B a demand of 1, where is the CoG? Somewhere on line A-B, closer to A?


Well, customer A pulls 10 times harder than customer B. If moved towards A over a distance d the sum of weighted distances goal value lowers (10 x d) – (1 x d).


So, the CoG is right on top of customer A, not somewhere in between A and B!


Though the goal value is sum of weighted distances, distances are irrelevant when figuring out in what direction to move the CoG. The overall demand force is leading. In the example it has a length of 9 and points towards customer A.


The overall demand force points the right direction, but does not tell how far to move the CoG.
This far?

Or this far?



How to determine multiple Centers-of-Gravity? The multiple Centers-of-Gravity algorithm


Step 1: locate warehouses at a random location (randomly selected customer location)
Step 2: (re)assign each customer to the closest warehouse
Step 3: move each warehouse to the Center-of-Gravity, given its customers (= apply single Center-of-Gravity algorithm as described further)
Repeat steps 2 and 3 until the goal value does not improve anymore.

Goal value = ∑i Di.Qi
where
Qi is the demand of customer i
Di is the distance between customer i and the warehouse this customer is assigned to.

The animation shows what happens during the algorithm: customers (circles) are assigned to the closest warehouse (triangles), warehouses move to their center-of-gravity, customer are reassigned, warehouses move again, et cetera, until the final situation is reached where none of the asssignments change any more. (At the start of the animation - showing the current situation - you can see that some customers were clearly assigned to the wrong warehouse.)


How to determine a single Center-of-Gravity? The single Center-of-Gravity algorithm in full detail (step 3 of the multiple Centers-of-Gravity algorithm)


Initial Center-of-Gravity position
The Center-of-Gravity is initially positioned at:
X_cog = ∑i Xi .Qi / ∑i Qi
Y_cog = ∑i Yi .Qi / ∑i Qi
where
Xi = x-coordinate of customer i
Yi = y-coordinate of customer i
Qi = Demand quantity of customer i

This inital Center-of-Gravity is often presented as optimal, but this is not true!
Imagine there are only two customers, customer A with demand 10 at position (0 , 0) and B with demand 1 at position (100 , 0). If the Center-of-Gravity moves a distance d towards customer A the goal value improves 10 × d (closer to A) − 1 × d (further from B) = 9 × d. So the optimal position is on top of customer A, not at (9.09 , 0) as given by the formula. The optimal Center-of-Gravity has a goal value of (0×10+100×1) = 100, whereas the initial Center-of-Gravity at (9.09 , 0) has a much higher value of (9.09×10+90.91×1)=182, so 82% higher costs.
In realistic situations with multiple customers, the relative difference will be much smaller - more like 5% - as can be seen in the visual simulation further below.

Though the goal function contains distances, these are irrelevant when determining the optimal Center-of-Gravity.
To optimize 'demand forces' pulling the Center-of-Gravity need to be calculated:
FX = force in x-direction = ∑i (Qi.(X_cog − Xi)/Di) on a flat surface, or ∑i (Qi.cosinus(anglei)) in general
FY = force in y-direction = ∑i (Qi.(Y_cog − Yi)/Di) on a flat surface, or ∑i (Qi.sinus(anglei)) in general.

The above applies for a flat surface. The Earth is a globe. The geographical translation is as follows:
Moving the Center-of-Gravity in force direction will decrease the sum of weighted distances, if moved the right distance
Moving the warehouse in the x and y direction of the force - first normalized by dividing it by its own length - lowers the goal value. The distance to move in that direction - initiated at a large value - is halved each time the new position would result in a worse goal value (a case of 'overtargetting').

Single Center-of-Gravity algorithm
Step 1: locate Center-of-Gravity at its initial position, and initialize step_distance at a large value (e.g. 100km)
Step 2: update Latitudecog to Latitudecog + Flat / √(Flat2 +Flon2) .step_distance, and update Longitudecog to Longitudecog + Flon / √(Flat2 +Flon2) .step_distance
Step 3: calculate the goal value. If it increases, then move back to the previous position, and update step_distance to step_distance/2.
Repeat steps 2 and 3 until step_distance has become sufficiently small (e.g. 1 meter - in most cases the force will then be close to zero).

This algorithm resembles the gradient descent method with force replacing the gradient.


Visual simulation of the single Center-of-Gravity algorithm