Cost matrix for warehouse location problem (in R)

Operations research provides a range of algorithms for determining exact optimal solutions to discrete warehouse location problems. However, these algorithms require a cost matrix, specifying the cost for supplying customer i from warehouse j, for each customer and each warehouse.…