Location of a warehouse (road distance)

Good morning,
I have a dataset with the following columns:
Customer, Location, Province, Latitude, Longitude, Order_frequency
468554,MONTANO LUCINO,CO,45.78544042433004,9.044272270080452,47
…(5000 rows)

I need to find the coordinates of the best place to place a warehouse, in order to minimize distance and/or travel times to all customers, taking into account the frequency of orders.
Can anyone give me some advice on how to do this?
Thank you!

Hi @andreahfp

Welcome to KIME Forum.
Although this is not a direct answer to your question, I would still like to point you to KNIME’s GeoSpatial nodes. I think these nodes hold the key to solving your problem.

For example, look at:

gr. Hans


Hi @andreahfp,

you can achieve this with different levels of detail, but I’d suggest to use a weighted average.

You take the number of orders/weight of orders/or whatever other driver to weight distances. This choice is up to you depending on what is more important to you.

  • Example 1 (number of orders): you have 1 customer in Milano ordering once a week and another one in Torino making one order per month: warehouse should be somewhere in Novara.
  • Example 2 (weight/value/volume of purchased goods): same as above, but orders from the customer in Torino is 10x the ones in Milano: warehouse should be placed somewhere near Torino, then.

Second choice is how you compute distance:

  • you can consider linear distance (quick and costless to compute, good for big datasets, but not precise)
  • you can use real distance (requires an API licence, real result but costly in terms of time and money)
  • you can just take linear distance and increase it by a factor (10-20%) to take into account that real road is slightly longer than linear distance (quick and costless but accuracy is based on the assumption your increasing factor is precise)

Example: distance Milano → Sondrio

  • Linear = 95 km
  • Real (Google Maps) = 140 km
  • Linear with increase = 95 km * 1,2 = 114 km

Hope it helps,
Raffaello Barri
Let’s connect on LinkedIn!

1 Like

Thank you Raffaello!
How can I implement it in Knime?